Allow bash completion script to work with BSD sed
Shorthand \s isn't POSIX compliant; it works with GNU sed, but not BSD sed. Changed \s to the literal whitespace character to fix this issue. Change-Id: I936b372e4022a4717a64cea9a8928b6dc00c6711 Closes-Bug: #1459470 Closes-Bug: #1277492
This commit is contained in:
parent
71f56399cc
commit
c809e068a0
@ -10,9 +10,9 @@ _neutron()
|
||||
|
||||
if [ "x$_neutron_opts" == "x" ] ; then
|
||||
nbc="`neutron bash-completion`"
|
||||
_neutron_opts="`echo "$nbc" | sed -e "s/--[a-z0-9_-]*//g" -e "s/\s\s*/ /g"`"
|
||||
_neutron_flags="`echo " $nbc" | sed -e "s/ [^-][^-][a-z0-9_-]*//g" -e "s/\s\s*/ /g"`"
|
||||
_neutron_opts_exp="`echo "$_neutron_opts" | sed -e "s/\s/|/g"`"
|
||||
_neutron_opts="`echo "$nbc" | sed -e "s/--[a-z0-9_-]*//g" -e "s/[ ][ ]*/ /g"`"
|
||||
_neutron_flags="`echo " $nbc" | sed -e "s/ [^-][^-][a-z0-9_-]*//g" -e "s/[ ][ ]*/ /g"`"
|
||||
_neutron_opts_exp="`echo "$_neutron_opts" | sed -e "s/[ ]/|/g"`"
|
||||
fi
|
||||
|
||||
if [[ " ${COMP_WORDS[@]} " =~ " "($_neutron_opts_exp)" " && "$prev" != "help" ]] ; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user