Provide a mechanism to allow hostname completion for any command.

Added:
  - ssh
  - scp
  - ftp
  - ping
  - telnet
  - curl
  - nc
This commit is contained in:
Scott Wallace 2015-09-29 20:59:44 +01:00
parent 8cfcd70408
commit f77aef9779

View file

@ -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
#--------------------------------------------------------------------------------