about summary refs log tree commit diff
path: root/Completion/Debian/_apt-get
blob: 1b3016e040409c701a8c364b14691648abac1422 (plain) (blame)
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
#compdef apt-get

_apt_arguments _apt-get_sm \
  -h,--help:bool \
  -v,--version:bool \
  -q,--quiet,--silent:intlevel \
  -d,--download-only:bool \
  -b,--compile,--build:bool \
  -s,--simulate,--just-print,--recon,--no-act:bool \
  -y,--yes,--assume-yes:bool \
  -f,--fix-broken:bool \
  -u,--show-upgraded:bool \
  -m,--ignore-missing,--fix-missing:bool \
  --no-download:bool \
  --ignore-hold:bool \
  --no-upgrade:bool \
  --force-yes:bool \
  --print-uris:bool \
  -c,--config-file:configfile \
  -o,--option:arbitem \
  -- \
  \( \
    /$'update\0' \| \
    /$'upgrade\0' \| \
    /$'install\0' /$'[^\0]#\0' !'_deb_packages uninstalled "$expl_packages[@]" || _deb_packages installed "$expl_packages[@]" ' \# \| \
    /$'remove\0' /$'[^\0]#\0' !'_deb_packages installed "$expl_packages[@]"' \# \| \
    /$'dist-upgrade\0' \| \
    /$'dselect-upgrade\0' \| \
    /$'clean\0' \| \
    /$'autoclean\0' \| \
    /$'check\0' \| \
    /$'source\0' /$'[^\0]#\0' !'_deb_packages avail "$expl_packages[@]"' \# \| \
    /$'help\0' \| \
    /"[]"	!'compadd "$expl_action[@]" update upgrade install remove dist-upgrade dselect-upgrade clean autoclean check source help' \
  \)

_apt-get () {
  local expl_action expl_packages
  _description expl_action action
  _description expl_packages 'package'

  _apt-get_sm
}

_apt-get "$@"