[Bash-completion-commits] [SCM] bash-completion branch, master, updated. e308b07526eba5667f17ea04e4e57f38ca6edf9e

Ville Skyttä ville.skytta at iki.fi
Thu Dec 24 14:05:00 UTC 2009


The following commit has been merged in the master branch:
commit e308b07526eba5667f17ea04e4e57f38ca6edf9e
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Thu Dec 24 16:00:34 2009 +0200

    Add ssh -o BindAddress suboption completion.

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

-- 
bash-completion



More information about the Bash-completion-commits mailing list