Allow multiple aliases on same ssh config Host line to complete.

pull/629/head
Serge van Ginderachter 2015-12-19 12:41:29 +01:00
parent 1b881e4958
commit 06e8dcee14
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ _sshcomplete() {
# parse all defined hosts from .ssh/config # parse all defined hosts from .ssh/config
if [ -r "$HOME/.ssh/config" ]; then if [ -r "$HOME/.ssh/config" ]; then
COMPREPLY=($(compgen -W "$(grep ^Host "$HOME/.ssh/config" | awk '{print $2}' )" ${OPTIONS}) ) COMPREPLY=($(compgen -W "$(grep ^Host "$HOME/.ssh/config" | awk '{$1=""; print $0}' )" ${OPTIONS}) )
fi fi
# parse all hosts found in .ssh/known_hosts # parse all hosts found in .ssh/known_hosts