Nifty Terminal Trick – Autocomplete

 

I’ve often wondered why using some Linux machines allowed me to simply press the TAB key after entering a few characters, and the terminal would suggest auto-completions for filenames in the working directory.  It’s a very handy feature and I love it, but never could figure out why it didn’t just work automatically when I used the Terminal is OS X.

Turns out that you can quickly enable this feature by copying a few files according to this tip from Mac OS X Hints.com.

% echo “source /usr/share/tcsh/examples/rc” > ~/.tcshrc
% echo “source /usr/share/tcsh/examples/login” > ~/.login
% echo “source /usr/share/tcsh/examples/logout” > ~/.logout

As far as I know, this doesn’t affect any of your settings, but I didn’t look through these provided sample shell configuration files to make sure. All I know is that I can now TAB to auto-complete and nothing else has been broken so far.

Comments (0) Leave a Comment
  1. No comments yet.

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">
  1. No trackbacks yet.