]> git.pld-linux.org Git - packages/bash-completion.git/commitdiff
- ungh, --verify args are offered
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 6 Mar 2007 21:07:02 +0000 (21:07 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bash-completion-poldek.sh -> 1.7

bash-completion-poldek.sh

index 975fc8e356201e5126f0aff19f1992ae965bd849..19e57962d8ac6a2e9ce5893418becf561ecf3f4b 100644 (file)
@@ -28,13 +28,21 @@ _poldek()
                COMPREPLY=( $( poldek -l | awk "/^$cur/{print \$1}" ) )
                return 0
                ;;
-       --verify)
-               COMPREPLY=( $( compgen -W 'deps conflicts file-conflicts file-orphans file-missing-deps' -- $cur ) )
-               return 0
-               ;;
        esac
 
        case "$cur" in
+       --verify*=*,*)
+               local p=${cur#--verify=*,}
+               p=${p//\\} # those backslashes propagate!!! -- kill them
+               # somewhy bash escapes equal sign, so we must match the backslash too
+               COMPREPLY=( $( compgen -P "${p%,*}," -W 'deps conflicts file-conflicts file-orphans file-missing-deps' -- "${cur##*,}" ) )
+               return 0
+               ;;
+       --verify*)
+               # somewhy bash escapes equal sign, so we must match the backslash too
+               COMPREPLY=( $( compgen -P --verify= -W 'deps conflicts file-conflicts file-orphans file-missing-deps' -- "${cur#--verify*=}" ) )
+               return 0
+               ;;
        --*)
                COMPREPLY=( $( compgen -W '
                --mkidx --makeidx --mt --nocompress --nodesc --nodiff --notimestamp
@@ -45,7 +53,7 @@ _poldek()
                --dump --dumpn --fetch --follow --force --fresh --greedy --hold
                --ignore --justdb --mercy --nodeps --nohold --noignore --nofollow
                --parsable-tr-summary --pm-force --pm-nodeps --pmopt --promoteepoch
-               --uniq --test --erase --greedy --nodeps --nofollow --test --verify
+               --uniq --test --erase --greedy --nodeps --nofollow --test --verify=
                --priconf --split --split-out --ask --cachedir --cmd --conf --log
                --noask --noconf --pmcmd --runas --shell --skip-installed --sudocmd
                --upconf --help --usage --version
@@ -59,5 +67,6 @@ _poldek()
 
        return 0
 }
-complete -F _poldek $filenames poldek
+complete -F _poldek $nospace $filenames poldek
+
 }
This page took 0.100108 seconds and 4 git commands to generate.