From 06e8dcee146d688830bb2c17f456646b6e1b5e0a Mon Sep 17 00:00:00 2001 From: Serge van Ginderachter Date: Sat, 19 Dec 2015 12:41:29 +0100 Subject: [PATCH] Allow multiple aliases on same ssh config Host line to complete. --- completion/available/ssh.completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completion/available/ssh.completion.bash b/completion/available/ssh.completion.bash index 19a52991..4fdf750a 100644 --- a/completion/available/ssh.completion.bash +++ b/completion/available/ssh.completion.bash @@ -14,7 +14,7 @@ _sshcomplete() { # parse all defined hosts from .ssh/config 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 # parse all hosts found in .ssh/known_hosts