What a n00b!

More Tab Complete Awesomeness on Ubuntu 9.04

It's a slightly older post, but after I read Workswithu's report on the four features that they believed set Ubuntu apart, I had to agree whole-heartedly with the fourth one regarding implementation of auto-complete on the shell. As I was reading, I constantly dropped to the shell to discover new tab-complete features that I didn't know about, including apt-get that I really didn't notice but used every day. Anyway, today I discovered yet another.

This kind of defeats the purpose of DNS, but I discovered that if you put a host into the /etc/hosts file on a Ubuntu 9.04, then both SSH and rsync tab-complete for you when you start typing the hostname. I'm not sure about scp, but I'm sure it works the same way.

Extending this functionality further, it would be awesome if I could tab-complete from my known_hosts file, but that doesn't seem to work.

Anyway, if you find yourself SSHing or rsyncing files to a host or set of hosts all the time, this trick can be very time-saving. Perhaps not quite as time-saving as being able to SSH with the click of a mouse, but often its not very convenient to leave the keyboard just to save a few keystrokes at the shell.


Comments powered by Disqus