bash-completion: update patch

*: Use [:blank:] instead of $'\t ' tricks where appropriate

From 657fcf62c7

Closes Homebrew/homebrew#50422.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
master
peshay 2016-03-25 23:04:21 +01:00 committed by Xu Cheng
parent 8bcbb43523
commit 9b2c427c9e
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ index 6601937..5184767 100644
# append any available aliases from config files
if [[ ${#config[@]} -gt 0 && -n "$aliases" ]]; then
- local hosts=$( sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['"$'\t '"']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "${config[@]}" )
+ local hosts=$( sed -ne 's/^['"$'\t '"']*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['"$'\t '"']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "${config[@]}" )
+ local hosts=$( sed -ne 's/^[[:blank:]]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}[[:blank:]]\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "${config[@]}" )
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -P "$prefix$user" \
-S "$suffix" -W "$hosts" -- "$cur" ) )
fi