Add ssh -o BindAddress suboption completion.

This commit is contained in:
Ville Skyttä 2009-12-24 16:00:34 +02:00
parent 7c4de4a3ca
commit e308b07526

View File

@ -3,6 +3,13 @@
have ssh && have ssh &&
{ {
_ssh_bindaddress()
{
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W \
"$( PATH="$PATH:/sbin" ifconfig | \
sed -ne 's/.*addr:\([^[:space:]]*\).*/\1/p' )" -- "$cur" ) )
}
_ssh_ciphers() _ssh_ciphers()
{ {
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W '3des-cbc aes128-cbc \ COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W '3des-cbc aes128-cbc \
@ -64,6 +71,9 @@ _ssh_suboption()
AddressFamily) AddressFamily)
COMPREPLY=( $( compgen -W 'any inet inet6' -- "$cur" ) ) COMPREPLY=( $( compgen -W 'any inet inet6' -- "$cur" ) )
;; ;;
BindAddress)
_ssh_bindaddress
;;
Cipher) Cipher)
COMPREPLY=( $( compgen -W 'blowfish des 3des' -- "$cur" ) ) COMPREPLY=( $( compgen -W 'blowfish des 3des' -- "$cur" ) )
;; ;;
@ -139,8 +149,7 @@ _ssh()
return 0 return 0
;; ;;
-b) -b)
COMPREPLY=( $( compgen -W "$( PATH="$PATH:/sbin" ifconfig | \ _ssh_bindaddress
sed -ne 's/.*addr:\([^[:space:]]*\).*/\1/p' )" -- "$cur" ) )
return 0 return 0
;; ;;
esac esac