bzip2, gzip, python, sysbench: Quote command argument to _parse_help().

This commit is contained in:
Ville Skyttä 2011-04-27 22:22:49 +03:00
parent 92ff96417d
commit c3bddc49e0
4 changed files with 4 additions and 5 deletions

View File

@ -14,7 +14,7 @@ _bzip2()
esac
if [[ "$cur" == -* ]]; then
local helpopts=`_parse_help ${words[0]}`
local helpopts=$( _parse_help "$1" )
COMPREPLY=( $( compgen -W "${helpopts//#/} -2 -3 -4 -5 -6 -7 -8 -9" \
-- "$cur" ) )
return 0

View File

@ -14,8 +14,7 @@ _gzip()
esac
if [[ "$cur" == -* ]]; then
local helpopts=`_parse_help ${words[0]}`
COMPREPLY=( $( compgen -W "$helpopts -1 -2 -3 -4 -5 -6 -7 -8 -9" \
COMPREPLY=( $( compgen -W '$( _parse_help "$1" ) {-1..-9}' \
-- "$cur" ) )
return 0
fi

View File

@ -39,7 +39,7 @@ _python()
if [[ "$cur" != -* ]]; then
_filedir 'py?([co])'
else
COMPREPLY=( $( compgen -W "$( _parse_help $1 -h )" -- "$cur" ) )
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -h )' -- "$cur" ) )
fi
return 0

View File

@ -126,7 +126,7 @@ _sysbench()
--init-rng= --debug= --validate= --help --version"
if [[ $test ]]; then
local help=( $( _parse_help $1 "--test=$test help" ) )
local help=( $( _parse_help "$1" "--test=$test help" ) )
opts+=" ${help[@]/%/=} prepare run cleanup help version"
else
opts+=" --test="