summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreddy Vulto <fvulto@gmail.com>2010-01-17 10:41:13 +0100
committerFreddy Vulto <fvulto@gmail.com>2010-01-17 10:41:13 +0100
commit2f78769d6537e936a4981e641eb75d229da81d98 (patch)
tree8e8371feb652b33e683e55510952268c7ac9abef
parent942b916aa1e3fc85f2e21bfc079ac29f7142ffdc (diff)
downloadbash-completion-2f78769d6537e936a4981e641eb75d229da81d98.tar.gz
Removed awk regexp character classes.
On Debian/Ubuntu, awk (mawk 1.3.3 Nov 1996) is not supporting regexp character classes. See also: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314323 This was causing unit test `_known_hosts_real' to fail. To run the test: ./run unit/_known_hosts_real.exp
-rw-r--r--bash_completion2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash_completion b/bash_completion
index 64780626..6b03e939 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1288,7 +1288,7 @@ _known_hosts_real()
# TODO(?): try to make known hosts files with more than one consecutive
# spaces in their name work (watch out for ~ expansion
# breakage! Alioth#311595)
- tmpkh=( $( awk 'sub("^[[:space:]]*([Gg][Ll][Oo][Bb][Aa][Ll]|[Uu][Ss][Ee][Rr])[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee][[:space:]]+", "") { print $0 }' "${config[@]}" | sort -u ) )
+ tmpkh=( $( awk 'sub("^[ \t]*([Gg][Ll][Oo][Bb][Aa][Ll]|[Uu][Ss][Ee][Rr])[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee][ \t]+", "") { print $0 }' "${config[@]}" | sort -u ) )
for i in "${tmpkh[@]}"; do
# Remove possible quotes
i=${i//\"}