diff --git a/Completion/Debian/Command/_apt b/Completion/Debian/Command/_apt index 19f818c279..7c290e7417 100644 --- a/Completion/Debian/Command/_apt +++ b/Completion/Debian/Command/_apt @@ -417,7 +417,8 @@ _apt-cmd () { /$'(install|download|source|build-dep)\0'/ -'subcmd=${match%?}' \ /$'[^\0]#\0'/ ':packages::_deb_packages -qr "\n\t\- /=+-" "$expl_packages[@]" avail' \# \ \( \ - // '%(.|)/%' -'[[ $subcmd = install ]]' /'[]'/ ':files: :_deb_files -c' \| \ + // '%(.|)/%' -'[[ $subcmd = install ]]' /'[]'/ ':files: :_deb_files' \| \ + // '%(.|)/%' -'[[ $subcmd = build-dep ]]' /'[]'/ ':files: :_deb_files -D' \| \ /$'[^\0/=]#\/'/ /'[]'/ ':apt-releases:release name:_apt_releases' \| \ /$'[^\0/=]#='/ /'[]'/ ':apt-package-versions:package version:_apt_versions_of_binary_package' \| \ \) \ @@ -425,11 +426,12 @@ _apt-cmd () { /$'((|auto)(remove|purge)|reinstall)\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ /$'upgrade\0'/ \| \ /$'autoclean\0'/ \| \ + /$'distclean\0'/ \| \ /$'changelog\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ /$'full-upgrade\0'/ \| \ /$'dist-upgrade\0'/ \| \ - /$'edit-sources\0'/ \| \ - /"[]"/ ':argument-1::compadd "$expl_action[@]" list search showsrc show depends rdepends policy update install reinstall download source build-dep remove upgrade full-upgrade dist-upgrade edit-sources autoclean changelog autopurge autoremove purge' + /$'edit-sources\0'/ /$'[^\0]#\0'/ ':sourcefiles::_values 'sourcefiles' $sources ' \# \| \ + /"[]"/ ':argument-1::compadd "$expl_action[@]" list search showsrc show depends rdepends policy update install reinstall download source build-dep satisfy remove upgrade full-upgrade dist-upgrade edit-sources autoclean distclean changelog autoremove autopurge purge' _apt-cmd () { local expl_action expl_packages subcmd @@ -458,7 +460,12 @@ _apt-get () { --no-download:bool \ --no-install-recommends:bool \ --ignore-hold:bool \ + --with-new-pkgs:bool \ --no-upgrade:bool \ + --only-upgrade:bool \ + --allow-downgrades:bool \ + --allow-remove-essential:bool \ + --allow-change-held-packages:bool \ --force-yes:bool \ --print-uris:bool \ --purge:bool \ @@ -475,27 +482,36 @@ _apt-get () { --arch-only:bool \ --allow-unauthenticated:bool \ --auto-remove:bool \ + -S,--snapshot:_snapshotdates \ -- \ /$'update\0'/ \| \ /$'upgrade\0'/ \| \ \( \ - /$'install\0'\|$'download\0'\|$'source\0'\|$'build-dep\0'/ \ - /$'[^\0]#\0'/ ':packages::_deb_packages -qr "\n\t\- /=" "$expl_packages[@]" avail' \# \ + /$'(install|download|source|build-dep)\0'/ -'subcmd=${match%?}' \ + /$'[^\0]#\0'/ ':packages::_deb_packages -qr "\n\t\- /=+-" "$expl_packages[@]" avail' \# \ \( \ - /$'[^\0/=]#/'/ /'[]'/ ':apt-releases:release name:_apt_releases' \| \ - /$'[^\0/=]#='/ /'[]'/ ':apt-package-versions:package version:_apt_versions_of_binary_package' \ + // '%(.|)/%' -'[[ $subcmd = install ]]' /'[]'/ ':files: :_deb_files' \| \ + // '%(.|)/%' -'[[ $subcmd = build-dep ]]' /'[]'/ ':files: :_deb_files -D' \| \ + /$'[^\0/=]#\/'/ /'[]'/ ':apt-releases:release name:_apt_releases' \| \ + /$'[^\0/=]#='/ /'[]'/ ':apt-package-versions:package version:_apt_versions_of_binary_package' \| \ \) \ \) \| \ /$'(|auto)(purge|remove)\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ /$'dist-upgrade\0'/ \| \ /$'dselect-upgrade\0'/ \| \ /$'clean\0'/ \| \ + /$'clean\0'/ \| \ /$'autoclean\0'/ \| \ + /$'indextargets\0'/ \| \ + /$'distclean\0'/ \| \ /$'changelog\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ /$'check\0'/ \| \ /$'help\0/' \| \ /$'(|un)markauto\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ - /"[]"/ ':argument-1::compadd "$expl_action[@]" update upgrade install remove purge dist-upgrade dselect-upgrade clean autoclean changelog check source build-dep autopurge autoremove help markauto unmarkauto download' + /$'autoremove\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ + /$'autopurge\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ + /$'help\0/' \| \ + /"[]"/ ':argument-1::compadd "$expl_action[@]" update upgrade install reinstall remove purge dist-upgrade dselect-upgrade clean autoclean distclean changelog check source build-dep satisfy indextargets autoremove autopurge help markauto unmarkauto download' _apt-get () { local expl_action expl_packages @@ -589,15 +605,19 @@ _apt-cdrom () { _apt-config () { _apt_arguments _apt-config \ + --empty:bool \ + --format:arbitem \ -h,--help:bool \ -v,--version:bool \ + --audit:bool \ -c,--config-file:configfile \ -o,--option:arbitem \ + --color:bool \ -- \ /$'shell\0'/ \ \( \ /$'[^\0]#\0'/ ':parameters:shell variable to assign:_parameters' \ - /$'[^\0]#\0'/ ':values:configuration key:compadd - ${${(f)"$(apt-config dump 2>&1)"}% *}' \ + /$'[^\0]#\0'/ ':values:configuration key:compadd - ${(u)${(f)"$(apt-config --empty --no-color --format='%f%n' dump 2>&1)"}%%(::|) *}' \ \) \# \| \ /$'dump\0'/ \| \ /"[]"/ ':argument-1:action:compadd shell dump' @@ -619,6 +639,14 @@ ${${${${(M)tmp:#*release*n=*}#*n=}%%,*}:#now} fi } +_apt_sources () { + local sourcelist sourceparts diretc + diretc="${"${"$(apt-config shell x dir::etc)"#*\'}"%\'*}" + sourceparts="${"${"$(apt-config shell x dir::etc::sourceparts)"#*\'}"%\'*}" + print /${diretc}/$sourceparts/*.{list,sources}(N:t) +} +sources=( $(_apt_sources) ) + _apt_releases () { local update_policy @@ -707,4 +735,22 @@ _apt-mark () { _apt-mark "$@" } +_snapshotdates() { + local expl + local -a waybackdates + + getdates() { + whence -p python3 &>/dev/null || return 0 + local timespan='-6month' + local timestamp="$(date +%Y%m%d --date="${timespan}")" + local url="http://snapshot.debian.org/mr/timestamp/?archive=debian&after=${timestamp}" + python3 -c 'import sys,urllib.request,json;[print(x) for x in json.loads(urllib.request.urlopen(sys.argv[1]).read())["result"]["debian"]]' "$url" 2>/dev/null || : + } + snapshotdates=( + ${(u)$(getdates)%T*} + ) + _wanted list expl 'wayback date(s)' compadd ${expl} -- ${snapshotdates} +} + + _apt "$@" diff --git a/Completion/Debian/Command/_apt-file b/Completion/Debian/Command/_apt-file index 5b24707d2d..edc572d6b0 100644 --- a/Completion/Debian/Command/_apt-file +++ b/Completion/Debian/Command/_apt-file @@ -28,6 +28,7 @@ case $state in 'update:resynchronize package contents' {find,search}:'search in which package file is included' {list,show}:'list contents of a package' + 'list-indices:list the known content indices' 'purge:remove all Contents-<ARCH>.gz files in cache directory' ) _describe -t commands 'apt-list command' cmds @@ -46,7 +47,7 @@ case $state in list|show) _deb_packages avail ;; - update|purge) + update|purge|list-indices) # do nothing ;; *) diff --git a/Completion/Debian/Command/_bug b/Completion/Debian/Command/_bug index 436d294f90..2752482cad 100644 --- a/Completion/Debian/Command/_bug +++ b/Completion/Debian/Command/_bug @@ -10,7 +10,7 @@ _bug_commonargs=( ) _rb_commonargs=( - '(-B --bts)'{-B,--bts=}'[use alternate BTS]:system:(debian gnome kde tdyc kde-debian)' + '(-B --bts)'{-B,--bts=}'[use alternate BTS]:system:(debian ubuntu guug default Grml)' '(-l --ldap)'{-l,--ldap}'[enable LDAP support]' '(-l --ldap)--no-ldap[disable LDAP support]' '(--proxy --http_proxy)'--{http_,}'proxy=:proxy host:_hosts' diff --git a/Completion/Debian/Command/_debmany b/Completion/Debian/Command/_debmany new file mode 100644 index 0000000000..88d9f2feff --- /dev/null +++ b/Completion/Debian/Command/_debmany @@ -0,0 +1,3 @@ +#compdef debmany + +_deb_packages avail diff --git a/Completion/Debian/Command/_debsnap b/Completion/Debian/Command/_debsnap index b9393cac46..40fc0eb572 100644 --- a/Completion/Debian/Command/_debsnap +++ b/Completion/Debian/Command/_debsnap @@ -10,7 +10,7 @@ _arguments \ '(-d --destdir)'{-d+,--destdir=}'[set download directory]:download directory:_files -/' \ '(-f --force)'{-f,--force}'[allow non-empty destination directory]' \ '(-v --verbose)'{-v,--verbose}'[print configuration and report progress]' \ - --list"[list versions; don't download]" \ + '(-l --list)'{-l,--list}"[list versions; don't download]" \ --binary'[operate on binary packages (default: source packages)]' \ '*'{-a+,--architecture=}'[specify architectures to download]:architecture to download:_deb_architectures' \ --first='[download all versions newer than this]:version number (lower bound):->versions' \ diff --git a/Completion/Debian/Command/_dhomepage b/Completion/Debian/Command/_dhomepage new file mode 100644 index 0000000000..f4ec1bd082 --- /dev/null +++ b/Completion/Debian/Command/_dhomepage @@ -0,0 +1,13 @@ +#compdef dhomepage + +local arguments + +arguments=( + '(-v,--vcs)'{-v,--vcs}'[Open VCS-Homepage instead]' + '(-e,--echo)'{-e,--echo}'[Only print the URL]' + {-h,--help}'[Show help]' + '--version[Show version information]' + ':package:_deb_packages avail' +) + +_arguments -S $arguments diff --git a/Completion/Debian/Command/_dpkg b/Completion/Debian/Command/_dpkg index 617644993a..4e1ad6b578 100644 --- a/Completion/Debian/Command/_dpkg +++ b/Completion/Debian/Command/_dpkg @@ -19,12 +19,14 @@ _dpkg_deb_only_actions=( _dpkg_deb_actions=( '(--build -b)'{--build,-b}'[build archive]:directory:_files -/' '(--contents -c)'{--contents,-c}'[list contents]: :_deb_files' - '(--info -I)'{--info,-I}'[show info]: :_deb_files' - '(--field -f)'{--field,-f}'[show fields]: :_deb_files' '(--control -e)'{--control,-e}'[extract control]: :_deb_files' '(--extract -x)'{--extract,-x}'[extract files]: :_deb_files' '(--vextract -X)'{--vextract,-X}'[extract and list files]: :_deb_files' + '(--raw-extract -R)'{--raw-extract,-R}'[extracts files and control]: :_deb_files' + '(--field -f)'{--field,-f}'[show fields]: :_deb_files' '--fsys-tarfile[output fs tarfile]: :_deb_files' + '--ctrl-tarfile[output ctrl tarfile]: :_deb_files' + '(--info -I)'{--info,-I}'[show info]: :_deb_files' ) _dpkg_common_actions=( @@ -39,36 +41,43 @@ _dpkg_actions=( '--configure[reconfigure specified packages]:*:package:->configure' '(--remove -r)'{--remove,-r}'[remove package]:*:package:->remove' '(--purge -P)'{--purge,-P}'[purge package]:*:package:->purge' + '(--verify -V)'{--verify,-V}'[verify package]:*:package:->verify' + '(--audit -C)'{--audit,-C}'[check for broken pkgs]' '--update-avail[update available]:package file:_files' '--merge-avail[merge available]:package file:_files' '(--record-avail -A)'{--record-avail,-A}'[record available]:*:package files:->record_avail' '--forget-old-unavail[forget uninstalled unavailable]' '--clear-avail[clear available]' - '(--audit -C)'{--audit,-C}'[check for broken pkgs]' '--get-selections[get selections]:pattern:' '--set-selections[set selections]' + '--clear-selections[clear selections]' '--yet-to-unpack[list uninstalled]' - '--print-architecture[print target architecture]' - '--print-installation-architecture' - '--print-foreign-architectures[print list of extra architectures]' + '--predep-package[predep package]' '--add-architecture[add extra architecture]:architecture:->add_architecture' '--remove-architecture[remove extra architecture]:architecture:->remove_architecture' + '--print-architecture[print target architecture]' + '--print-foreign-architectures[print list of extra architectures]' + '--assert--[assert feature]:what:(help support-predepends working-epoch long-filenames multi-conrep multi-arch versioned-provides protected-field)' + '--validate--[validate thing]:what:(pkgname trigname archname version)' '--compare-versions[compare version numbers]:*::expression:= ->compare_versions' ) _dpkg_options=( '--abort-after[abort after errors]:number of errors:' - '--root=[alternative root]:root:_files -/' - '--instdir=[change inst root but not data dir]:_files -/' - '(--selected-only -O)'{--selected-only,-O}'[skip unselected packages]' - '(--skip-same-version -E)'{--skip-same-version,-E}'[skip packages with same version as installed]' '(--refuse-downgrade -G)'{--refuse-downgrade,-G}'[skip packages with earlier version than installed]' '(--auto-deconfigure -B)'{--auto-deconfigure,-B}'[install can break other packages]' '--no-act[show potential actions but do not follow through]' '-D+[debug options]:debug options:(h 1 2 3)' '--debug=[debug options]:debug options:(help 1 2 3)' + --{force,refuse,no-force}'--[forcing options]:what:(all downgrade configure-any hold remove-reinstreq remove-protected remove-essential depends depends-version breaks conflicts confmiss confnew confold confdef confask overwrite overwrite-dir overwrite-diverted statoverride-add statoverride-remove security-mac unsafe-io script-chrootless architecture bad-version bad-path not-root bad-verify)' '--ignore-depends=[ignore depends involving package]:package:_deb_packages avail' - --{force,refuse,no-force}'--[forcing options]:what:(all downgrade configure-any hold bad-path not-root overwrite overwrite-diverted bad-verify depends-version depends confnew confold confdef confmiss conflicts architecture overwrite-dir remove-reinstreq remove-essential help)' + '--no-act[show potential actions but do not follow through]' + '--dry-run[show potential actions but do not follow through]' + '--simulate[show potential actions but do not follow through]' + '--instdir=[change inst root but not data dir]:_files -/' + '--root=[alternative root]:root:_files -/' + '(--selected-only -O)'{--selected-only,-O}'[skip unselected packages]' + '(--skip-same-version -E)'{--skip-same-version,-E}'[skip packages with same version as installed]' ) _dpkg_options_recursive=( '(--recursive -R)'{--recursive,-R}'[recursive]' ) @@ -82,11 +91,11 @@ _dpkg_deb_and_query_only_options=( ) _dpkg_query_actions=( + '(--list -l)'{--list,-l}'[list packages]:*:packages:->list' '(--status -s)'{--status,-s}'[display package status]:*:packages:->status' - '(--print-avail -p)'{--print-avail,-p}'[display available details]:packages:_deb_packages avail' '(--listfiles -L)'{--listfiles,-L}'[list owned files]:*:packages:->listfiles' - '(--list -l)'{--list,-l}'[list packages]:*:packages:->list' '(--search -S)'{--search,-S}'[search for file owner]:*:pattern:->search' + '(--print-avail -p)'{--print-avail,-p}'[display available details]:packages:_deb_packages avail' '--admindir=[data directory]:directory:_files -/' ) @@ -147,7 +156,7 @@ case "$state" in - nonrecur \ '*: :_deb_files' ;; - remove|status|listfiles) + remove|status|listfiles|verify) _call_function ret _dpkg_$state && return ret _arguments -C -A "-*" -s "$_dpkg_options[@]" \ '*:package:_deb_packages installed' diff --git a/Completion/Debian/Command/_dpkg-info b/Completion/Debian/Command/_dpkg-info new file mode 100644 index 0000000000..548378a5bd --- /dev/null +++ b/Completion/Debian/Command/_dpkg-info @@ -0,0 +1,3 @@ +#compdef dpkg-info + +_deb_packages avail diff --git a/Completion/Debian/Command/_madison b/Completion/Debian/Command/_madison index dfdf1b4386..81c060374e 100644 --- a/Completion/Debian/Command/_madison +++ b/Completion/Debian/Command/_madison @@ -3,12 +3,15 @@ _arguments \ '(-a --architecture)'{-a,--architecture=}':arch:_sequence _deb_architectures -a "all source" -' \ '(-b --binary)'{-b,--binary-type=}':type:(deb udeb)' \ - '(-c --component)'{-c,--component=}':component:_values -s , "component list" main contrib non-free' \ + '(-c --component)'{-c,--component=}':component:_values -s , "component list" main contrib non-free non-free-firmware' \ '(-g --greaterorequal)'{-g,--greaterorequal} \ '(-G --greaterthan)'{-G,--greaterthan} \ '(-h --help)'{-h,--help} \ + '(-s --suite)'{-s,--suite=}':suite:_values -s , "suite list" stable testing unstable oldstable oldoldstable' \ '(-r --regex)'{-r,--regex} \ - '(-s --suite)'{-s,--suite=}':suite:_values -s , "suite list" oldstable stable testing unstable' \ '(-S --source-and-binary)'{-S,--source-and-binary} \ + '(-u --url)'{-u,--url=}':url:_values -s , "url alias" debian new qa ubuntu udd archive ports' \ + '--version' \ + '(--no-conf --noconf)'{--no-conf,--noconf} \ '*:package:_deb_packages avail' diff --git a/Completion/Debian/Command/_sbuild b/Completion/Debian/Command/_sbuild index 459738d5d3..21544d5ccb 100644 --- a/Completion/Debian/Command/_sbuild +++ b/Completion/Debian/Command/_sbuild @@ -33,6 +33,7 @@ _sbuild_signing_keys() { } _sbuild() { + _arguments \ '(-h --help)'{-h,--help}'[show help message]' \ '(-V --version)'{-V,--version}'[show version information]' \ @@ -67,8 +68,8 @@ _sbuild() { '(-j --jobs)'{-j=,--jobs=}'[jobs to run simultaneously]:number of jobs' \ '--debbuildopt=[option to dpkg-buildpackage]:option' \ '--debbuildopts=[options to dpkg-buildpackage]:options' \ - '--dpkg-source-opt=[option to dpkg-source]:option' \ - '--dpkg-source-opts=[options to dpkg-source]:options' \ + \*'--dpkg-source-opt=[option to dpkg-source]:option' \ + \*'--dpkg-source-opts=[options to dpkg-source]:options' \ '--mail-log-to=[send log to mail]:recipient:_email_addresses -c' \ '--mailfrom=[mail from]:sender:_email_addresses -c' \ '(-n --nolog)'{-n,--nolog}'[no build log file]' \ @@ -124,7 +125,7 @@ _sbuild() { '--aspcud-criteria=[Optimization for aspcud]:criteria' \ '(--resolve-alternatives --no-resolve-alternatives)--resolve-alternatives[allow alternatives in Build-Depends*]' \ '(--resolve-alternatives --no-resolve-alternatives)--no-resolve-alternatives[disallow alternatives in Build-Depends*]' \ - '--extra-package=[make a package or directory available to the resolver]:package:_files -g "*deb(-.)"' \ + \*'--extra-package=[make a package or directory available to the resolver]:package:_files -g "*deb(-.)"' \ '--extra-repository=[add a repository to the resolver]:url' \ '--extra-repository-key=[add key to the resolver]:key:_files -g "*.asc(-.)"' \ '--build-path=[place to build the package inside chroot]:path:_files -/' \ diff --git a/Completion/Debian/Command/_schroot b/Completion/Debian/Command/_schroot index 117df45ef0..759aee2155 100644 --- a/Completion/Debian/Command/_schroot +++ b/Completion/Debian/Command/_schroot @@ -9,19 +9,25 @@ _arguments -S \ '(-a --all)'{-a,--all}'[select all chroots and active sessions]' \ '--all-chroots[select all chroots]' \ '--all-sessions[select all active sessions]' \ + '--all-source-chroots[select all source chroots]' \ + '--exclude-aliases[do not include aliases]' \ '*'{-c,--chroot=}'[use specified chroot]:chroot:->chroot' \ '(-d --directory)'{-d,--directory=}'[directory to use]:dir:_files -W / -P /' \ '(-u --user)'{-u,--user=}'[username (default current user)]:user:_users' \ + '(-s --shell)'{-s,--shell=}'[shell to use as login shell]:shell:->shells' \ '(-l --list)'{-l,--list}'[list available chroots]' \ '(-i --info)'{-i,--info}'[show information about selected chroots]' \ '--location[print location of selected chroots]' \ '--config[dump configuration of selected chroots]' \ '(-p --preserve-environment)'{-p,--preserve-environment}'[preserve user environment]' \ + '(-o --option)'{-o,--option}'[set option]' \ '(-q --quiet)'{-q,--quiet}'[quiet]' \ '(-v --verbose)'{-v,--verbose}'[verbose]' \ '(-V --version)'{-V,--version}'[version]' \ + '--automatic-session[begin, run and end a session automatically]' \ '(-b --begin-session)'{-b,--begin-session}'[begin a session; returns a session ID]' \ '(-r --run-session)'{-r,--run-session}'[run an existing session]' \ + '(-n --session-name)'{-n,--session-name}'[session name]' \ '--recover-session[recover an existing session]' \ '(-e --end-session)'{-e,--end-session}'[end an existing session]' \ '(-f --force)'{-f,--force}'[force operation]' \ @@ -33,4 +39,8 @@ case "$state" in _wanted tag expl 'chroot' \ compadd $(schroot -l -a) ;; + (shells) + _wanted -C $context shells expl shell compadd ${(f)^"$(</etc/shells)"}(N) + return + ;; esac diff --git a/Completion/Debian/Command/_wanna-build b/Completion/Debian/Command/_wanna-build deleted file mode 100644 index 779906afb4..0000000000 --- a/Completion/Debian/Command/_wanna-build +++ /dev/null @@ -1,44 +0,0 @@ -#compdef wanna-build - -_arguments \ - '(-v --verbose)'{-v,--verbose}'[verbose]' \ - '--take[take package for building]' \ - '(-f --failed)'{-f,--failed}'[record as failed]' \ - '(-u --uploaded)'{-u,--uploaded}'[record as uploaded]' \ - '(-n --no-build)'{-n,--no-build}'[record as undesired]' \ - '--dep-wait[record as waiting for source dependencies]' \ - '--merge-quinn[merge quinn-diff output into database]' \ - '--merge-partial-quinn[merge partial quinn-diff output into database]' \ - '--merge-packages[merge Packages files into database]' \ - '--merge-sources[merge Sources files into database]' \ - '--merge-all' \ - '--pretend-avail[pretend that given packages are available now]' \ - '(-i --info)'{-i,--info=}':source package:_deb_packages avail' \ - '(-l --list)'{-l,--list=}':state:(needs-build building uploaded failed installed dep-wait not-for-us all failed-removed dep-wait-removed install-wait reupload-wait)' \ - '(-m --message)'{-m,--message=}':message:' \ - '(-o --override)'{-o,--override}"[override another user's lock]" \ - '(-U --user)'{-U,--user=}':user name:' \ - '--import:ASCII file:_files' \ - '--export:ASCII file:_files' \ - '--create-db[create database]' \ - '--correct-compare' \ - '(-N --no-propagation)'{-N,--no-propagation} \ - '(-D --no-down-propagation)'{-D,--no-down-propagation} \ - '--give-back[give package back]' \ - '--forget' \ - '--forget-user' \ - '--binNMU:version:' \ - '--perm-build-priority:priority:' \ - '--build-priority:priority:' \ - '(-d --dist)'{-d,--dist=}':distribution:(stable testing unstable all)' \ - '(-O --order)'{-O,--order=}':ordering:(P S p s n c b)' \ - '(-b --database)'{-b,--database=}':database:' \ - '(-A --arch)'{-A,--arch=}':architecture:' \ - '(-c --category)'{-c,--category=}':category:(uploaded-fixed-pkg fix-expected reminder-sent nmu-offered easy medium hard compiler-error none)' \ - '(-a --min-age)'{-a,--min-age=}':minimum age:' \ - '--max-age:maximum age:' \ - '--manual-edit' \ - '--maintlock-create' \ - '--maintlock-remove' \ - '--clean-db' \ - ':package_version:_deb_packages avail' diff --git a/Completion/Debian/Command/_which-pkg-broke b/Completion/Debian/Command/_which-pkg-broke new file mode 100644 index 0000000000..4a71f52c59 --- /dev/null +++ b/Completion/Debian/Command/_which-pkg-broke @@ -0,0 +1,3 @@ +#compdef which-pkg-broke + +_deb_packages avail diff --git a/Completion/Debian/Type/_deb_architectures b/Completion/Debian/Type/_deb_architectures index 1429112a8a..85bd7b23f8 100644 --- a/Completion/Debian/Type/_deb_architectures +++ b/Completion/Debian/Type/_deb_architectures @@ -4,6 +4,6 @@ local extra expl zparseopts -E -D -a extra a: _description architectures expl 'architecture' -compadd "$@" "$expl[@]" alpha amd64 arm64 armel armhf hppa hurd-i386 i386 ia64 \ - kfreebsd-amd64 kfreebsd-i386 m68k mips mipsel powerpc powerpcspe ppc64 \ - ppc64el s390x sh4 sparc sparc64 x32 ${=extra[2]} +compadd "$@" "$expl[@]" alpha amd64 arm arm64 armel armhf hppa hurd-i386 i386 \ + ia64 kfreebsd-amd64 loong64 loongarch6 m68k mips mips64el mipsel powerpc \ + ppc64 ppc64el riscv64 s390x sh4 sparc sparc64 x32 ${=extra[2]} diff --git a/Completion/Debian/Type/_deb_files b/Completion/Debian/Type/_deb_files index e84871cc4b..7102ade21d 100644 --- a/Completion/Debian/Type/_deb_files +++ b/Completion/Debian/Type/_deb_files @@ -5,13 +5,15 @@ # the following: # # -c Include .changes and .dsc files +# -D Only .dsc files (e.g. apt-get build-dep ./foo.dsc) -local -a _expl _fopts _c _exts=( deb ddeb udeb ) +local -a _expl _fopts _c _D _exts=( deb ddeb udeb ) zparseopts -a _fopts -D -E - \ - c=_c 1 2 F+: J+: M+: n P+: q r+: R+: S+: V+: W+: X+: + c=_c D=_D 1 2 F+: J+: M+: n P+: q r+: R+: S+: V+: W+: X+: (( $#_c )) && _exts+=( changes dsc ) +(( $#_D )) && _exts+=( dsc ) _description files _expl 'Debian package' _files "${(@)_fopts}" "${(@)_expl}" -g "*.(${(j<|>)_exts})(-.)" diff --git a/Completion/Linux/Command/_losetup b/Completion/Linux/Command/_losetup index d8e792aaff..affbc58f34 100644 --- a/Completion/Linux/Command/_losetup +++ b/Completion/Linux/Command/_losetup @@ -27,7 +27,7 @@ _arguments -s -S \ - '(resize)' \ {-c,--set-capacity}'[reread the size of the file associated with the loop device]' \ - 'detach' \ - '(-)'{--delete,--detach,-d}'[detach from specified loop device]' \ + '(-)'{--detach,-d}'[detach from specified loop device]' \ "$device" \ - '(detach-all)' \ {-D,--detach-all}'[detach all associated loop devices]' \ diff --git a/Completion/Unix/Command/_fortune b/Completion/Unix/Command/_fortune index c0eca56a3f..f26d1edc75 100644 --- a/Completion/Unix/Command/_fortune +++ b/Completion/Unix/Command/_fortune @@ -1,6 +1,6 @@ #compdef fortune -_arguments \ +_arguments -S \ '-a[choose from all lists of maxims, both offensive and not]' \ '-c[show the cookie file from which the fortune came]' \ '-e[consider all fortune files to be of equal size]' \ @@ -12,4 +12,4 @@ _arguments \ '-s[short apothegms only]' \ '-i[ignore case for -m patterns]' \ '-w[wait before termination for a time based on msg length]' \ - '*:databases' + '*:databases:_values -S " " "fortune db" /usr/share/games/fortunes/*(N:r:t)' diff --git a/Completion/Unix/Command/_libvirt b/Completion/Unix/Command/_libvirt index bd605b9c98..9c10f71e8f 100644 --- a/Completion/Unix/Command/_libvirt +++ b/Completion/Unix/Command/_libvirt @@ -18,7 +18,7 @@ interact_cmds=(cd echo exit quit connect) typeset -A dom_opts dom_opts=( - console " " + console --state-running destroy " " managedsave " " reboot " " @@ -197,7 +197,7 @@ case $state in return 1 fi # Allow passing domain without --domain with few of the most used commands - if [[ $cmd == (destroy|edit|reboot|reset|start|shutdown) ]]; then + if [[ $cmd == (destroy|edit|reboot|reset|start|shutdown|console|guestinfo) ]]; then if [[ $words[CURRENT-1] == $cmd ]]; then values=( $(_call_program domains "noglob virsh $conn_opt list ${dom_opts[$cmd]:-"--all"} --name") ) [[ -n $values ]] && _wanted domains expl domain compadd ${=values} && return 0 diff --git a/Completion/Unix/Command/_rsync b/Completion/Unix/Command/_rsync index 81d25a3f4a..1657d411e5 100644 --- a/Completion/Unix/Command/_rsync +++ b/Completion/Unix/Command/_rsync @@ -78,7 +78,7 @@ _rsync_info() { local opts opts=( ${${(M)${(f)"$(_call_program values $words[1] --info=help)"}:#*Mention*}/ ##Me/[me} ) (( $#opts )) && opts=( '(ALL NONE HELP)'${^opts}\] ) - _values -s , 'info option' $opts ALL NONE HELP + _values -s , 'info option' $opts ALL NONE HELP PROGRESS2 } _rsync_debug() { diff --git a/Completion/Unix/Command/_smartmontools b/Completion/Unix/Command/_smartmontools index fe64966646..c7e8fa6a38 100644 --- a/Completion/Unix/Command/_smartmontools +++ b/Completion/Unix/Command/_smartmontools @@ -9,13 +9,23 @@ _arguments -s -S \ "w[print all words]" "(b v)n[suppress printing bits]" "(b n)v[print all bits from valid words]"' \ + '-j[output as json]' \ + '--json=[output in various json formats or yaml]: : _values -S "" "output format" + "(b v)c[compact]" + "(b v)g[grep/gron]" + "(b v)o[original]" + "(b v)s[sorted]" + "(b v)v[verbose]" + "(b v)y[yaml]" + "(b v)i[implemented dev]" + "(b v)u[unimplemented dev]"' \ '(H)*'{-g+,--get=}'[get device setting]:setting:(all aam apm lookahead security wcache rcache wcreorder)' \ '(H -a --all -x --xall -H --health -i --info -c --capabilities -A --attributes --scan --scan-open)'{-a,--all}'[show all SMART information for device]' \ '(H -x --xall -a --all -H --health -i --info -c --capabilities -A --attributes --scan --scan-open)'{-x,--xall}'[show all information for device]' \ '(H 1 --scan-open --identify -x --xall -a --all -H --health -i --info -c --capabilities -A --attributes)--scan[scan for devices]' \ '(H 1 --scan --identify -x --xall -a --all -H --health -i --info -c --capabilities -A --attributes)--scan-open[scan for devices and try to open each device]' \ '(H -q --quietmode)'{-q+,--quietmode=}'[set smartctl quiet mode]:quiet mode:(errorsonly silent noserial)' \ - '(H -d --device)'{-d+,--device=}'[specify device type]:device type:(ata scsi nvme sat usbcypress usbjmicron usbprolific usbsunplus marvell areca 3ware hpt megaraid cciss auto test)' \ + '(H -d --device)'{-d+,--device=}'[specify device type]:device type:(auto test ata scsi nvme sat usbcypress usbjmicron usbprolific usbsunplus sntasmedia sntjmicron sntrealtek marvell megaraid aacraid 3ware areca cciss hpt sssraid intelliprop jmb39x jms56x)' \ '(H)*'{-T+,--tolerance=}'[specify how tolerant smartctl should be of ATA SMART command failures]:tolerance:(normal conservative permissive verypermissive)' \ '(H -b --badsum)'{-b+,--badsum=}'[set action if checksum error is detected]:action:(warn exit ignore)' \ '(H)*'{-r+,--report=}'[report transactions]:transaction type:(ioctl ataioctl scsiioctl nvmeioctl)' \ @@ -28,7 +38,7 @@ _arguments -s -S \ '(H -c --capabilities)'{-c,--capabilities}'[show device SMART capabilities]' \ '(H -A --attributes)'{-A,--attributes}'[show device SMART vendor-specific attributes and values]' \ '(H)*'{-f+,--format=}'[set output format for attributes]:format:(old brief hex,id hex,val hex)' \ - '(H)*'{-l+,--log=}'[show device log]:log:(error selftest selective directory xerror xselftest background sasphy sataphy scttemp scttempsts scttemphist scttempint scterc devstat ssd gplog smartlog nvmelog)' \ + '(H)*'{-l+,--log=}'[show device log]:log:(error selftest selective directory xerror xselftest background sasphy sataphy scttemp scttempsts scttemphist scttempint scterc devstat ssd gplog smartlog nvmelog farm)' \ '(H)*'{-v+,--vendorattribute=}'[set display option for vendor attribute]:vendor attribute:->vendorattrs' \ '(H -F --firmwarebug)'{-F+,--firmwarebug=}'[use firmware bug workaround]:bug:(none nologdir samsung samsung2 samsung3 xerrorlba swapid)' \ '(H -P --presets)'{-P+,--presets=}'[specify whether to use drive-specific presets]:preset usage:(use ignore show showall)' \ diff --git a/Completion/Unix/Command/_zfs b/Completion/Unix/Command/_zfs index ef4b80a415..c5a5d737ee 100644 --- a/Completion/Unix/Command/_zfs +++ b/Completion/Unix/Command/_zfs @@ -16,6 +16,8 @@ local -a ds_propnames ro_ds_props rw_ds_props ci_ds_props # dataset properties local -a po_propnames ro_po_props rw_po_props ci_po_props # pool properties local -a ro_vdev_props rw_vdev_props +local -a scriptnames + _pick_variant -r implementation -c 'zpool upgrade -v' openzfs='This system supports ZFS pool feature flags' solaris ds_types=( filesystem snapshot volume all ) @@ -303,7 +305,7 @@ esac delegatable_perms+=( allow clone create destroy diff hold key keychange mount promote receive release rename rollback send share snapshot groupquota groupused userprop - userused ${ci_ds_props%%:*} + userused refreservation ${ci_ds_props%%:*} ) key_properties=( @@ -318,6 +320,7 @@ ci_ds_props+=( $rw_ds_props ) ds_propnames=( ${rw_ds_props%%:*} ) po_propnames=( ${ro_po_props%%:*} ${ci_po_props%%:*} ${rw_po_props%%:*} ) +scriptnames=( ${ZPOOL_SCRIPTS_PATH}/*(N:r:t) /etc/zfs/zpool.d/*(N:r:t) ~/.zpool.d/*(N:r:t) ) case $service in zfs|zpool|zstream) @@ -1080,7 +1083,7 @@ case $service:$words[1] in zpool:iostat) if [[ $implementation = openzfs ]]; then args=( - '-c[run scripts on each vdev]:script:_files -W "($ZPOOL_SCRIPTS_PATH /etc/zfs/zpool.d ~/.zpool.d)"' + '-c+[run scripts on each vdev]: :_values -s , "scriptname" $scriptnames' '-g[display vdev GUIDs instead of normal device names]' '-H[suppress headers and tab-delimit fields]' '-L[display real paths for vdevs resolving all symbolic links]' @@ -1249,7 +1252,7 @@ case $service:$words[1] in args=( '--power[display vdev enclosure slot power status]' '-D[display a histogram of deduplication statistics]' - '-c[run scripts on each vdev]:script:_files -W "($ZPOOL_SCRIPTS_PATH /etc/zfs/zpool.d ~/.zpool.d)"' + '-c+[run scripts on each vdev]: :_values -s , "scriptname" $scriptnames' '-e[only show unhealthy vdevs]' '-i[display vdev initialization status]' '-g[display vdev GUIDs instead of the normal device names]' @@ -1285,7 +1288,7 @@ case $service:$words[1] in zpool:upgrade) _arguments -A "-*" -S \ '(- *)-v[display ZFS versions and descriptions]' \ - "(-v)-V+[upgrade to given version]:version" \ + '(-v)-V+[upgrade to given version]:version' \ '(-v *)-a[upgrade all pools]' \ '(-a -v)*:pool:_zfs_pool' ;; diff --git a/Completion/X/Command/_x_utils b/Completion/X/Command/_x_utils index 4b98ec48e9..356bda4180 100644 --- a/Completion/X/Command/_x_utils +++ b/Completion/X/Command/_x_utils @@ -77,7 +77,7 @@ xev) '-s[use save-under]' \ '-name:window name' \ '-rv' \ - '*-event:event mask:(keyboard mouse expose visibility structure substructure focus property colormap owner_grab_button randr)' + '*-event:event mask:(keyboard mouse expose visibility structure substructure focus property colormap owner_grab_button randr button)' ;; xhost) local type tmp match