aboutsummaryrefslogtreecommitdiff
path: root/zsh-completion/_importare
blob: f389d500ae7ed25cdc8fd7da576f1d9d745adecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#compdef importare
#
# vim: set et sw=4 sts=4 ts=4 ft=zsh :
# ZSH completion for adjutrix
# Written by Baptiste Daroussin <baptux at free.fr>

_importare() {
    local actions action_options general_options source_options metadata_options install_options deplist_descriptions deplist_options
    actions=(
        --install
        --version -V
        --help -h
    )
    general_options=(
        '--log-level[Specify the log level]:log level:((debug\:"Show debug output (noisy)" qa\:"Show QA messages and warnings only (default)" warning\:"Show warnings only" silent\:"Suppress all log messages (UNSAFE)"))'
        '(--no-colour --no-color)'{--no-colour,--no-color}"[Do not use colour]"
        "(--environment -E)"{-E,--environment}"[Environment specification]:environment specification: "
        "--compact[Display output using one line per entry]"
    )
    source_options=(
        "(--location -l)"{-l,--location}"[Location of source image]:Repository:_files -/"
    )
    metadata_options=(
        "(--description -D)"{-D,--description}"[Specify a package description]:Description:"
        "(--build-dependency -B)"{-B,--build-dependency}"[Specify a build dependency]:Build dependency:_paludis_packages installed"
        "(--run-dependency -R)"{--run-dependency,-R}"[Specify a run dependency]:Run dependency:_paludis_packages installed"
        "(--preserve-metadata -P)"{-P,--preserve-metadata}"[If replacing a package, copy its description and dependencies]"
    )
    install_options=(
        "(--pretend -p)"{--pretend,-p}"[Pretend only]"
        "(--destinations -d)"{--destinations,-d}"[Use specified destinations instead of defaults]:Destinations:_paludis_packages repositories"
        "--show-reasons[Show why packages are being (un)installed]:Verbosity:((none\:Don\'t\ show\ any\ information summary\:Show\ a\ summary full\:Show\ full\ output))"
        "--show-use-descriptions[Show descriptions of USE flags]:Which:((none\:Don\'t\ show\ any\ descriptions new\:Show\ for\ new\ use\ flags changed\:Show\ for\ new\ and\ changed\ flags all\:Show for all flags))"
        "--show-package-descriptions[Show package descriptions]:When:((none\:Don\'t\ show\ any\ descriptions new\:Show\ descriptions\ for\ new\ packages all\:Show\ descriptions\ for\ all\ packages))"
        "--continue-on-failure[Whether to continue after a fetch or install error]:When:((if-fetch-only\:If\ fetching\ only never\:Never if-satisfied\:If\ remaining\ packages\ dependencies\ are\ satisfied if-independent\:If\ independent\ of\ failed\ and\ skipped\ packages always\:Always))"
        "--skip-phase[Skip phases with a given name]:Phase: "
        "--abort-at-phase[Abort when a phase with a given name is encountered]:Phase: "
        "--skip-until-phase[Skip all phases until a phase with a given name is encountered]:Phase: "
        "--change-phases-for[Control which packages to change phases for]:Target:((all\:'All packages' first\:'Only the first package on the list' last\:'Only the last package on the list'))"
    )
    deplist_descriptions='
        pre\:"As pre dependencies"
        pre-or-post\:"As pre dependencies, or post dependencies where needed"
        post\:"As post dependencies"
        try-post\:"As post dependencies, with no error for failures"
        discard\:"Discard (default)"'
    deplist_options=(
        "--dl-blocks[How to handle blocks]:How:(accumulate error discard)"
        "--dl-override-masks[Zero or more mask kinds that can be overridden as necessary]:What:(none tilde-keyword unkeyworded profile repository license)"
        "--dl-suggested[How to handle suggested dependencies]:How:(show install discard)"
        "--dl-downgrade[When to downgrade packages]:When:(as-needed warning error)"
        "--dl-reinstall[When to reinstall packages]:When:(never always if-use-changed)"
        "--dl-reinstall-scm[When to reinstall scm packages]:When:(never always daily weekly)"
        "--dl-reinstall-targets[When to reinstall targets]:When:(auto never always)"
        "--dl-upgrade[When to upgrade packages]:When:(always as-needed)"
        "--dl-deps-default[Override default behaviour for all dependency classes]:How:(($deplist_descriptions))"
        "--dl-installed-deps-pre[How to handle pre dependencies for installed packages]:How:(($deplist_descriptions))"
        "--dl-installed-deps-runtime[How to handle runtime dependencies for installed packages]:How:(($deplist_descriptions))"
        "--dl-installed-deps-post[How to handle post dependencies for installed packages]:How:(($deplist_descriptions))"
        "--dl-uninstalled-deps-pre[How to handle pre dependencies for uninstalled packages]:How:(($deplist_descriptions))"
        "--dl-uninstalled-deps-post[How to handle post dependencies for uninstalled packages]:How:(($deplist_descriptions))"
        "--dl-uninstalled-deps-runtime[How to handle runtime dependencies for uninstalled packages]:How:(($deplist_descriptions))"
        "--dl-uninstalled-deps-suggested[How to handle suggested dependencies for uninstalled packages]:How:(($deplist_descriptions))"
        "--dl-circular[How to handle circular dependencies]:How:(error discard)"
        "--dl-fall-back[When to fall back to installed packages]:When:(as-needed-except-targets as-needed never)"
        "--dl-new-slots[When to pull in new slots (works with --dl-upgrade)]:When:(always as-needed)"
    )
    action_options=(
        "($actions)"{-i,--install}"[Install one or more packages]"
        "(: -)"{--version,-V}"[Display program version]"
        "(: -)"{--help,-h}"[Display program help]"
    )
    _arguments -s \
        $general_options[@] $source_options[@] $metadata_options[@] $install_options[@] $deplist_options[@] $action_options[@] && return 0
}