Terminal directory navigation with the tab key

May 13, '02 09:19:29AM

Contributed by: Mikey-San

One of my favourite lines in my ~/.tcshrc file is this line:

bindkey "^I" complete-word-fwd
It's been discussed on macosxhints before. What I've just now discovered -- yeah, I'm slow -- is that it gets a little cooler if you have a working shift or right arrow key.

Go somewhere and type 'ls' and hit tab. You'll start cycling through the directory's contents alphabetically. When you hit a folder with stuff in it, hit shift-tab (or the right arrow key). Start hitting tab again, and now you cycle through the contents of the directory that was on the 'ls' line. This also works with other commands, of course. Spiffy, eh?

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020513091929764