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