~ubuntu-branches/ubuntu/saucy/apt-xapian-index/saucy

« back to all changes in this revision

Viewing changes to axi-cache.sh

  • Committer: Bazaar Package Importer
  • Author(s): Enrico Zini
  • Date: 2010-05-16 09:33:58 UTC
  • mfrom: (4.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: james.westby@ubuntu.com-20100516093358-xvbshas89apqnvgj
Tags: 0.35
* Tolerate (and if --verbose, report) .desktop file with invalid popcon
  fields
* Added missing import. Closes: #581736
* Run update-python-modules -p before updating the index in postinst.
  Closes: #581811

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
    case "$prev" in
25
25
        *axi-cache*)
26
 
            COMPREPLY=( $(compgen -W "help more search show again" -- "$cur") )
 
26
            COMPREPLY=( $(compgen -W "help more search show again showpkg showsrc depends rdepends policy madison" -- "$cur") )
27
27
            return 0
28
28
            ;;
29
29
        --sort)
36
36
        search|again)
37
37
            if [[ "$cur" == -* ]]; then
38
38
                COMPREPLY=( $(compgen -W "--sort --tags" -- "$cur") )
39
 
            else
40
 
                if [ -n "$cur" ]; then
41
 
                    #unset COMP_WORDS[$COMP_CWORD]
42
 
                    COMPREPLY=( $(compgen -W "$(${COMP_WORDS[@]} --tabcomplete=partial)" -- "$cur") )
43
 
                else
44
 
                    if [ "$prev" != "$cmd" ]; then
45
 
                        COMPREPLY=( $(compgen -W "$(${COMP_WORDS[@]} --tabcomplete=plain)" -- "$cur") )
46
 
                    fi
47
 
                fi
 
39
                return 0
48
40
            fi
49
41
            ;;
50
 
        show)
 
42
        show|showpkg|showsrc|depends|rdepends|policy|madison)
51
43
            if [[ "$cur" == -* ]]; then
52
44
                COMPREPLY=( $(compgen -W "--last" -- "$cur") )
53
 
            else
54
 
                if [ -n "$cur" ]; then
55
 
                    #unset COMP_WORDS[$COMP_CWORD]
56
 
                    COMPREPLY=( $(compgen -W "$(${COMP_WORDS[@]} --tabcomplete=partial)" -- "$cur") )
57
 
                else
58
 
                    COMPREPLY=( $(compgen -W "$(${COMP_WORDS[@]} --tabcomplete=plain)" -- "$cur") )
59
 
                fi
 
45
                return 0
60
46
            fi
61
47
            ;;
62
48
        *)
 
49
            return 0
63
50
            ;;
64
51
    esac
65
52
 
 
53
    if [ -n "$cur" ]; then
 
54
        #unset COMP_WORDS[$COMP_CWORD]
 
55
        COMPREPLY=( $(compgen -W "$(${COMP_WORDS[@]} --tabcomplete=partial)" -- "$cur") )
 
56
    else
 
57
        COMPREPLY=( $(compgen -W "$(${COMP_WORDS[@]} --tabcomplete=plain)" -- "$cur") )
 
58
    fi
 
59
 
66
60
    return 0
67
61
} &&
68
62
complete -F _axi_cache axi-cache