[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 7914d17468dad5a4b2d018e54ef02406414fe975
Ville Skyttä
ville.skytta at iki.fi
Tue Jan 19 17:10:32 UTC 2010
The following commit has been merged in the master branch:
commit 7914d17468dad5a4b2d018e54ef02406414fe975
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Tue Jan 19 19:09:15 2010 +0200
Avoid use of POSIX character classes with awk for mawk compatibility.
diff --git a/bash_completion b/bash_completion
index c914498..3a3e69c 100644
--- a/bash_completion
+++ b/bash_completion
@@ -598,7 +598,7 @@ _available_interfaces()
fi
COMPREPLY=( $( eval PATH="$PATH:/sbin" $cmd 2>/dev/null | \
- awk '/^[^[:space:]]/ { print $1 }' ) )
+ awk '/^[^ \t]/ { print $1 }' ) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]/%[[:punct:]]/}' -- "$cur" ) )
}
@@ -1657,7 +1657,7 @@ _filedir_xspec()
_expand || return 0
# get first exclusion compspec that matches this command
- xspec=$( awk "/^complete[[:space:]]+.*[[:space:]]${1##*/}([[:space:]]|\$)/ { print \$0; exit }" \
+ xspec=$( awk "/^complete[ \t]+.*[ \t]${1##*/}([ \t]|\$)/ { print \$0; exit }" \
$BASH_COMPLETION )
# prune to leave nothing but the -X spec
xspec=${xspec#*-X }
diff --git a/contrib/cvsps b/contrib/cvsps
index 5f92867..a9566f6 100644
--- a/contrib/cvsps
+++ b/contrib/cvsps
@@ -12,23 +12,22 @@ _cvsps()
;;
-s)
COMPREPLY=( $( compgen -W "$( cvsps 2>/dev/null |
- awk '/^PatchSet:?[[:space:]]/ { print $2 }' )" -- "$cur" ) )
+ awk '/^PatchSet:?[ \t]/ { print $2 }' )" -- "$cur" ) )
return 0
;;
-a)
COMPREPLY=( $( compgen -W "$( cvsps 2>/dev/null |
- awk '/^Author:[[:space:]]/ { print $2 }' )" -- "$cur" ) )
+ awk '/^Author:[ \t]/ { print $2 }' )" -- "$cur" ) )
return 0
;;
-b)
COMPREPLY=( $( compgen -W "$( cvsps 2>/dev/null |
- awk '/^Branch:[[:space:]]/ { print $2 }' )" -- "$cur" ) )
+ awk '/^Branch:[ \t]/ { print $2 }' )" -- "$cur" ) )
return 0
;;
-r)
COMPREPLY=( $( compgen -W "$( cvsps 2>/dev/null |
- awk '/^Tag:[[:space:]]+[^(]/ { print $2 }' )" \
- -- "$cur" ) )
+ awk '/^Tag:[ \t]+[^(]/ { print $2 }' )" -- "$cur" ) )
return 0
;;
-p)
diff --git a/contrib/wireless-tools b/contrib/wireless-tools
index d1bae79..0f034e7 100644
--- a/contrib/wireless-tools
+++ b/contrib/wireless-tools
@@ -33,13 +33,13 @@ _iwconfig()
;;
channel)
COMPREPLY=( $( compgen -W "$( iwlist ${COMP_WORDS[1]} channel | \
- awk '/^[[:space:]]*Channel/ {print $2}' )" -- "$cur" ) )
+ awk '/^[ \t]*Channel/ {print $2}' )" -- "$cur" ) )
return 0
;;
freq)
COMPREPLY=( $( compgen -W "$( iwlist ${COMP_WORDS[1]} channel | \
- awk '/^[[:space:]]*Channel/ {print $4"G"}')" -- "$cur" ) )
+ awk '/^[ \t]*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 '/^[ \t]*[0-9]/ {print $1"M"}' )" -- "$cur" ) )
return 0
;;
rts|frag)
--
bash-completion
More information about the Bash-completion-commits
mailing list