bash autocomplete for SSH
If you are like me, and you SSH to machines through out the day, you want this. Ok. You __need__ this.
The following one liner, parses your .bash_history file and attempts to autocomplete the host you are trying to SSH to. Add this line to your .bash_profile/.bashrc file.
complete -W "$(echo $(grep '^ssh ' .bash_history | sort -u | sed 's/^ssh //'))" ssh
Of course the lookup is limited to machines you have already SSH’d to. But whatevs, it __will__ save you time and keystrokes. Time which you could use to watch re-runs of My Little Pony.
-
developed6ok liked this
-
emileeyou89 liked this
-
jankowskihi6 liked this
-
stelabouras liked this
-
benryyip liked this
-
2citizen liked this
-
kyhikari liked this
-
sjaeckel liked this
-
kiwihead reblogged this from sriblogstoo
-
jacob liked this
-
matiskay liked this
-
whereshallwehavelunch liked this
-
gsiener liked this
-
parkeyparker liked this
-
ambivalens liked this
-
nickthejam liked this
-
omgmog reblogged this from sriblogstoo
-
cderivan reblogged this from sriblogstoo
-
sriblogstoo posted this