11 case "${COMP_WORDS[1]}" in
13 if [[ "$cur" == -* ]]; then
14 COMPREPLY=( $( compgen -W '--nodeps --nofollow --test' -- $cur ) )
16 _rpm_installed_packages
23 cur=${COMP_WORDS[COMP_CWORD]}
24 prev=${COMP_WORDS[COMP_CWORD-1]}
28 COMPREPLY=( $( poldek -l | awk "/^$cur/{print \$1}" ) )
35 local p=${cur#--verify=*,}
36 p=${p//\\} # those backslashes propagate!!! -- kill them
37 # somewhy bash escapes equal sign, so we must match the backslash too
38 COMPREPLY=( $( compgen -P "${p%,*}," -W 'deps conflicts file-conflicts file-orphans file-missing-deps' -- "${cur##*,}" ) )
42 # somewhy bash escapes equal sign, so we must match the backslash too
43 COMPREPLY=( $( compgen -P --verify= -W 'deps conflicts file-conflicts file-orphans file-missing-deps' -- "${cur#--verify*=}" ) )
47 COMPREPLY=( $( compgen -W '
48 --mkidx --makeidx --mt --nocompress --nodesc --nodiff --notimestamp
49 --dn --dt --sn --prefix --source --st --clean --clean-pkg
50 --clean-whole --cleana --sl --stl --update --up --update-whole
51 --upa --caplookup --pset --downgrade --install --reinstall
52 --upgrade --install-dist --reinstall-dist --root --upgrade-dist
53 --dump --dumpn --fetch --follow --force --fresh --greedy --hold
54 --ignore --justdb --mercy --nodeps --nohold --noignore --nofollow
55 --parsable-tr-summary --pm-force --pm-nodeps --pmopt --promoteepoch
56 --uniq --test --erase --greedy --nodeps --nofollow --test --verify=
57 --priconf --split --split-out --ask --cachedir --cmd --conf --log
58 --noask --noconf --pmcmd --runas --shell --skip-installed --sudocmd
59 --upconf --help --usage --version
63 COMPREPLY=( $( compgen -W '-F -N -O -P -Q -V -e -i -l -m -n -q -r -s -t -u -v' -- $cur ) )
69 complete -F _poldek $nospace $filenames poldek