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
parent
8bcbb43523
commit
9b2c427c9e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue