diff --git a/completions/bzip2 b/completions/bzip2 index f8f970af..ad816be6 100644 --- a/completions/bzip2 +++ b/completions/bzip2 @@ -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 diff --git a/completions/gzip b/completions/gzip index e2e482ea..3913c83b 100644 --- a/completions/gzip +++ b/completions/gzip @@ -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 diff --git a/completions/python b/completions/python index b0a93e19..fb5f71aa 100644 --- a/completions/python +++ b/completions/python @@ -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 diff --git a/completions/sysbench b/completions/sysbench index 85e88967..f4c58bf5 100644 --- a/completions/sysbench +++ b/completions/sysbench @@ -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="