[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-151-g1709686

Ville Skyttä ville.skytta at iki.fi
Thu Apr 28 18:45:55 UTC 2011


The following commit has been merged in the master branch:
commit c3bddc49e02260ace5f070d62c141d95b6537513
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Wed Apr 27 22:22:49 2011 +0300

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

diff --git a/completions/bzip2 b/completions/bzip2
index f8f970a..ad816be 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 e2e482e..3913c83 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 b0a93e1..fb5f71a 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 85e8896..f4c58bf 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="

-- 
bash-completion



More information about the Bash-completion-commits mailing list