aboutsummaryrefslogtreecommitdiff
blob: c86ebb0c4dace467a5026050e162c2bac10f42eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#compdef ekeyword

local -a arguments=(
    '(- :)'{-h,--help}'[Show this help message and exit]'
    '(-m --manifest)'{-m,--manifest}'[Run `ebuild manifest` on the ebuild after modifying it]'
    '(-n --dry-run)'{-n,--dry-run}'[Show what would be changed, but do not commit]'
    '(-v --verbose)'{-v,--verbose}'[Be verbose while processing things]'
    '(-q --quiet)'{-q,--quiet}'[Be quiet while processing things (only show errors)]'
    '(--format)'--format':Select output format for showing differences:_values -V ekeywordsfmt "ekeywords formats" auto color-inline inline short-multi long-multi'
    '(- :)'{-V,--version}'[Show version information]'
)

(( $+functions[_ekeywordargs] )) ||  _ekeywordargs() {
    _files -g \*.ebuild

    local -a keywords=(all $(_gentoo_arches))

    compset -P '(\^|\~)'
    _values -V "keywords" "gentoo arches" ${keywords[@]}
}

_arguments ${arguments[@]} "*:ekeywordargs:_ekeywordargs"