I'm setting up my company's new servers (installing Ubuntu 12.04, the current LTS release) and since a lot of configuration/features have to be "mirrored" from our old servers, I've set up SSH public key authentication so I can simply copy stuff with
(and without entering the password each time) from the old server(s) to the new one(s). And I just got amazed by this: entered the start of the command specifying the server like this:
then I hit (accidentally) tab ... and voala! The builtin (out-of-the-box) command completion listed all the contents of the
directory on the other server! Brilliant. That's what I call user (or admin
P.S.: obviously this is nothing breakthrough-like ... but since I've never seen path completion from a remote server in default installations of any distribution, it just surprised me (in a good way
P.S.2: it turns out this is fairly old stuff.
The feature (code) definitely already existed in 2005 as can be seen in this forum post
. However bash completion only got into Ubuntu with Lucid (10.04 in 2010). It's part of the
package and the code for supporting remote path completion with
was part of the package from day one. So I guess it's just me who didn't notice it til now.
I suppose it's because I rarely use public key authentication for SSH (including
). I've changed the title of this post to reflect the actual Ubuntu version which first featured this
P.S.3: Bash itself already had the completion support for quite some time, but the example completion code for supporting
only made it into v4.0, which was released in February of 2009. So Ubuntu was not really late adopting it a year later.