zondag 8 januari 2012

rsync and scp autocompletion

Apparantly, rsync and scp boast tab autocompletion !

When you have configured passwordless SSH access (by copying over your public key) and you use these tools, tab autocompletion works as expected.

For example, typing the following on a bash shell:

rsync localfile.txt exampleserver:/examp<TAB>

will automatically autocomplete the foldername.
In the example's case, it becomes:

rsync localfile.txt exampleserver:/examplefolder/

The same goes for scp, like:

scp localfile.txt exampleserver:/examp<TAB>


rsync localfile.txt exampleserver:/examplefolder

rsync and scp are able to do this because the passwordless SSH allows them to see what files can be found on the other server without asking for a password.

On my LAN network, it takes about 1 second to autocomplete, which is perfectly acceptable for me. It certainly beats having to open a seperate SSH session and manually making a lising ;-)

Geen opmerkingen:

Een reactie plaatsen