fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerMerge pull request #1152274ce965f3

master
4.6 KiB71 linesraw
1#completion for apt-get
2
3function __fish_apt_no_subcommand -d 'Test if apt has yet to be given the subcommand'
4    for i in (commandline -xpc)
5        if contains -- $i update upgrade dselect-upgrade dist-upgrade install remove purge autoremove autopurge source build-dep check clean autoclean changelog
6            return 1
7        end
8    end
9    return 0
10end
11
12function __fish_apt_use_package -d 'Test if apt command should have packages as potential completion'
13    for i in (commandline -xpc)
14        if contains -- $i contains install remove purge autoremove autopurge build-dep changelog
15            return 0
16        end
17    end
18    return 1
19end
20
21complete -c apt-get -n __fish_apt_use_package -a '(__fish_print_apt_packages)' -d Package
22
23complete -c apt-get -s h -l help -d 'Display help and exit'
24complete -f -n __fish_apt_no_subcommand -c apt-get -a update -d 'Update sources'
25complete -f -n __fish_apt_no_subcommand -c apt-get -a upgrade -d 'Upgrade or install newest packages'
26complete -f -n __fish_apt_no_subcommand -c apt-get -a dselect-upgrade -d 'Use with dselect front-end'
27complete -f -n __fish_apt_no_subcommand -c apt-get -a dist-upgrade -d 'Distro upgrade'
28complete -f -n __fish_apt_no_subcommand -c apt-get -a install -d 'Install one or more packages'
29complete -f -n __fish_apt_no_subcommand -c apt-get -a changelog -d 'Display changelog of one or more packages'
30complete -f -n __fish_apt_no_subcommand -c apt-get -a purge -d 'Remove and purge one or more packages'
31complete -f -n __fish_apt_no_subcommand -c apt-get -a remove -d 'Remove one or more packages'
32complete -f -n __fish_apt_no_subcommand -c apt-get -a source -d 'Fetch source packages'
33complete -f -n __fish_apt_no_subcommand -c apt-get -a build-dep -d 'Install/remove packages for dependencies'
34complete -f -n __fish_apt_no_subcommand -c apt-get -a check -d 'Update cache and check dependencies'
35complete -f -n __fish_apt_no_subcommand -c apt-get -a clean -d 'Clean local caches and packages'
36complete -f -n __fish_apt_no_subcommand -c apt-get -a autoclean -d 'Clean packages no longer be downloaded'
37complete -f -n __fish_apt_no_subcommand -c apt-get -a autoremove -d 'Remove packages no longer needed as dependencies'
38complete -f -n __fish_apt_no_subcommand -c apt-get -a autopurge -d 'Remove packages no longer needed as dependencies and delete their config files'
39complete -c apt-get -l no-install-recommends -d 'Do not install recommended packages'
40complete -c apt-get -l no-install-suggests -d 'Do not install suggested packages'
41complete -c apt-get -s d -l download-only -d 'Download Only'
42complete -c apt-get -s f -l fix-broken -d 'Correct broken dependencies'
43complete -c apt-get -s m -l fix-missing -d 'Ignore missing packages'
44complete -c apt-get -l no-download -d 'Disable downloading packages'
45complete -c apt-get -s q -l quiet -d 'Quiet mode'
46complete -c apt-get -s s -l simulate -l just-print -l dry-run -l recon -l no-act -d 'Perform a simulation'
47complete -c apt-get -s y -l yes -l assume-yes -d 'Automatic yes to prompts'
48complete -c apt-get -l assume-no -d 'Automatic no to prompts'
49complete -c apt-get -s u -l show-upgraded -d 'Show upgraded packages'
50complete -c apt-get -s V -l verbose-versions -d 'Show full versions for packages'
51complete -c apt-get -s b -l compile -l build -d 'Compile source packages'
52complete -c apt-get -l install-recommends -d 'Install recommended packages'
53complete -c apt-get -l install-suggests -d 'Install suggested packages'
54complete -c apt-get -l ignore-hold -d 'Ignore package Holds'
55complete -c apt-get -l no-upgrade -d "Do not upgrade packages"
56complete -c apt-get -l force-yes -d 'Force yes'
57complete -c apt-get -l print-uris -d 'Print the URIs'
58complete -c apt-get -l purge -d 'Use purge instead of remove'
59complete -c apt-get -l reinstall -d 'Reinstall packages'
60complete -c apt-get -l list-cleanup -d 'Erase obsolete files'
61complete -c apt-get -s t -l target-release -l default-release -d 'Control default input to the policy engine'
62complete -c apt-get -l trivial-only -d 'Only perform operations that are trivial'
63complete -c apt-get -l no-remove -d 'Abort if any packages are to be removed'
64complete -c apt-get -l only-source -d 'Only accept source packages'
65complete -c apt-get -l diff-only -d 'Download only diff file'
66complete -c apt-get -l tar-only -d 'Download only tar file'
67complete -c apt-get -l arch-only -d 'Only process arch-dependent build-dependencies'
68complete -c apt-get -l allow-unauthenticated -d 'Ignore non-authenticated packages'
69complete -c apt-get -s v -l version -d 'Display version and exit'
70complete -r -c apt-get -s c -l config-file -d 'Specify a config file'
71complete -r -c apt-get -s o -l option -d 'Set a config option'