Fix ssh autocompletion to ignore port info from known_hosts files #668

wants to merge 1 commit into


None yet

5 participants


The completion improvement I did gets rid of the annoying markup created by ssh when using non-standard ports to ssh into servers.
It removes the "[]:" from around the host, which is actually what you need when looking for completion.


Nice! Great, was searching for this for some time! Anyway to auto complete the host + the known port?
for example

ssh user@
ssh -p 22 (if there was any saved port..)


That would definitely be nice, although it would take some coordination to make it happen considering when autocomplete is used for scp, you do need to go back right after the host, add a ":" and then let the user type the specific path desired.

loopj commented Nov 30, 2013

Any update on merging this? It would be super useful


Can someone rebase this?

blueyed commented Mar 13, 2014

Please consider just using zsh's default: #2602

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment