From f77aef977933b1731dc3e26c83c7701f8ffe865a Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Tue, 29 Sep 2015 20:59:44 +0100 Subject: [PATCH] Provide a mechanism to allow hostname completion for any command. Added: - ssh - scp - ftp - ping - telnet - curl - nc --- .bash/auto_complete.d/ssh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.bash/auto_complete.d/ssh b/.bash/auto_complete.d/ssh index 521db46..49bbbc2 100644 --- a/.bash/auto_complete.d/ssh +++ b/.bash/auto_complete.d/ssh @@ -20,8 +20,8 @@ _ssh() { fi } -complete -o bashdefault -o default -o nospace -F _ssh ssh 2>/dev/null \ - || complete -o default -o nospace -F _ssh ssh -complete -o bashdefault -o default -o nospace -F _ssh scp 2>/dev/null \ - || complete -o default -o nospace -F _ssh scp +for CMD in ssh scp telnet nc ftp ping curl; do + complete -o bashdefault -o default -o nospace -F _ssh ${CMD} 2>/dev/null \ + || complete -o default -o nospace -F _ssh ${CMD} +done #--------------------------------------------------------------------------------