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