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

David Paleino d.paleino at gmail.com
Fri Oct 16 17:46:57 UTC 2009


The following commit has been merged in the master branch:
commit dbb351052406199ed7942b2fbb2b1eea5c387b4b
Author: David Paleino <d.paleino at gmail.com>
Date:   Mon Oct 12 13:01:28 2009 +0200

    Fixed "freq" and "rate" completion for iwconfig
    
      Should be tested on bash < 4; on bash4 it gave:
    
        awk: /^[[:space:]]*Channel/ {print $4\"G\"}
        awk:                                 ^ backslash not last character on line
    
      (similarly for "rate")

diff --git a/CHANGES b/CHANGES
index d6617ae..9620941 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,7 @@ bash-completion (1.x)
   * Don't use pidof in _known_hosts_real() to detect whether Avahi is
     available, since it's not available on MacOS X. Thanks to Rainer
     Müller <raimue at codingfarm.de> (bash-completion MacPorts maintainer)
+  * Fixed "freq" and "rate" completion for iwconfig
 
  -- David Paleino <d.paleino at gmail.com>  Sun, 11 Oct 2009 11:11:57 +0200
 
diff --git a/contrib/wireless-tools b/contrib/wireless-tools
index 22da1b2..4c46894 100644
--- a/contrib/wireless-tools
+++ b/contrib/wireless-tools
@@ -39,7 +39,7 @@ _iwconfig()
 
         freq)
             COMPREPLY=( $( compgen -W "$( iwlist ${COMP_WORDS[1]} channel | \
-                awk '/^[[:space:]]*Channel/ {print $4\"G\"}')" -- "$cur" ) )
+                awk '/^[[:space:]]*Channel/ {print $4"G"}')" -- "$cur" ) )
             return 0
             ;;
         ap)
@@ -55,7 +55,7 @@ _iwconfig()
             COMPREPLY=( $( compgen -W 'auto fixed' -- "$cur" ) )
             COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W \
                 "$( iwlist ${COMP_WORDS[1]} rate | \
-                awk '/^[[:space:]]*[0-9]/ {print $1\"M\"}' )" -- "$cur" ) )
+                awk '/^[[:space:]]*[0-9]/ {print $1"M"}' )" -- "$cur" ) )
             return 0
             ;;
         rts|frag)

-- 
bash-completion



More information about the Bash-completion-commits mailing list