summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2010-01-19 19:09:15 +0200
committerVille Skyttä <ville.skytta@iki.fi>2010-01-19 19:09:15 +0200
commit7914d17468dad5a4b2d018e54ef02406414fe975 (patch)
treeb0bc4357c022ad383b645f79906d44f1f254047e
parent0b6baead5c270c362db3c84eb25fb46b5285827f (diff)
downloadbash-completion-7914d17468dad5a4b2d018e54ef02406414fe975.tar.gz
Avoid use of POSIX character classes with awk for mawk compatibility.
-rw-r--r--bash_completion4
-rw-r--r--contrib/cvsps9
-rw-r--r--contrib/wireless-tools6
3 files changed, 9 insertions, 10 deletions
diff --git a/bash_completion b/bash_completion
index c9144988..3a3e69ca 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 5f928678..a9566f64 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 d1bae793..0f034e7e 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)