[Bash-completion-commits] [bash-completion] 01/03: gphoto2: Fix split argument handing, and colon treatment in --port args

Ville Skyttä scop-guest at moszumanska.debian.org
Sun Nov 16 10:26:56 UTC 2014


This is an automated email from the git hooks/post-receive script.

scop-guest pushed a commit to branch master
in repository bash-completion.

commit 7d66285b42f7847e1b5dedf5ed7c4536cb2bb288
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sun Nov 16 12:09:54 2014 +0200

    gphoto2: Fix split argument handing, and colon treatment in --port args
---
 completions/gphoto2 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/completions/gphoto2 b/completions/gphoto2
index 02ddf78..cc2ce5e 100644
--- a/completions/gphoto2
+++ b/completions/gphoto2
@@ -3,7 +3,7 @@
 _gphoto2()
 {
     local cur prev words cword split
-    _init_completion -s || return
+    _init_completion -s -n : || return
 
     case $prev in
         --debug-logfile)
@@ -25,6 +25,7 @@ _gphoto2()
         --port)
             COMPREPLY=( $(compgen -W "$( gphoto2 --list-ports 2>/dev/null | \
                 tail -n +4 | awk '{ print $1 }'  )" -- "$cur") )
+            __ltrim_colon_completions "$cur"
             return 0
             ;;
         --camera)
@@ -40,8 +41,11 @@ _gphoto2()
             ;;
     esac
 
+    $split && return
+
     if [[ "$cur" == -* ]]; then
         COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+        [[ $COMPREPLY == *= ]] && compopt -o nospace
         return 0
     fi
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git



More information about the Bash-completion-commits mailing list