From 780c96697257a32bf50808be04dd0c79da48e345 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sun, 3 Jun 2018 23:58:06 +0200 Subject: 42920: new dkms completion --- Completion/Linux/Command/_dkms | 162 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 Completion/Linux/Command/_dkms (limited to 'Completion/Linux') diff --git a/Completion/Linux/Command/_dkms b/Completion/Linux/Command/_dkms new file mode 100644 index 000000000..7ea34aa2e --- /dev/null +++ b/Completion/Linux/Command/_dkms @@ -0,0 +1,162 @@ +#compdef dkms + +local curcontext="$curcontext" ign cmds opts ret=1 +local -a state line expl args subcmds dirs +local -A opt_args + +subcmds=( + 'add:add a module/version combination to the tree for builds and installs' + 'remove:remove a module from the tree' + 'build:compile a module for a kernel' + "install:install a build module for it's corresponding kernel" + 'uninstall:uninstall a module for a kernel' + 'match:install every module that is installed for a template kernel for another kernel' + 'mkdriverdisk:create a floppy driver disk image for use when updated drivers are needed to install an OS' + 'mktarball:tar up files in the DKMS tree for a specific module' + 'ldtarball:extract a tarball created with mktarball into the DKMS tree' + 'mkrpm:create an RPM package for a module' + 'mkdeb:create a debian binary package for a module' + 'mkdsc:create a debian source package for a module' + 'mkkmp:create a Kernel Module Package source RPM for a module' + 'status:display the current status of modules, versions and kernels within the tree' + 'autoinstall:try to install the latest revision of all modules that have been installed for other kernel revisions' +) + +args=( + '(1)-m[specify module]:module:->modules' + '(1)-v[specify module version]:version' + '(-q --quiet)'{-q,--quiet}'[suppress output]' + '(--all)*'{-a,--arch}'[specify system architecture]:architecture:->architectures' + '*--directive=:directive' + '--dkmstree=:path:_directories' + '--installtree=:path:_directories' + '--sourcetree=:path:_directories' + '--dkmsframework=:path:_directories' + '1: : _describe -t commands command subcmds' +) + +cmd=${${${subcmds%%:*}:*words}[1]} +if [[ -n $cmd ]]; then + curcontext="${curcontext%:*}-$cmd:" +else + # exclude sub-commands based on any options specified so far + for cmds opts in \ + '(remove|build|install|uninstall|match|status|mk(^kmp))' 'k' \ + '(add|remove)' '-rpm_safe_upgrade' \ + 'mk(driverdisk|kmp)' '-spec' \ + 'mk(deb|dsc|rpm)' '-legacy-postinst' \ + 'mk(tarball|rpm|deb|dsc)' '-(source|binary)-only' \ + '(match|build|mkkmp)' '(k|-no-(prepare|clean)-kernel|-kernelsourcedir)' \ + '(|un)install' '-no-(depmod|initrd)' \ + 'mkdriverdisk' '([dr]|-distro|-release|-size|-media)' \ + '(add|build|install|ldtarball)' '-force' \ + 'match' '-templatekernel' \ + '*tarball' '-archive' \ + '(match|build|mkkmp)' '(j*|-no-(prepare|clean)-kernel|-kernelsourcedir)' \ + '(remove|build|install|status|mk(^kmp))' '-all' \ + 'build' '-config' + do + [[ -n ${(M)words:#-${~opts}*} ]] && + subcmds=( ${(M)subcmds:#${~cmds}:*} ) + done + args+=( '(1 -)'{-V,--version}'[display version information]' ) + ign='!' # hide some uncommon options but handle their arguments +fi + +case $cmd in + remove|build|install|uninstall|mk*|status) + args+=( ': :->modules' ) + ;| + |remove|build|install|uninstall|match|status|mk(^kmp)) + args+=( '(--all)*-k[specify kernel version]:kernel:->kernels' ) + ;| + |add|remove) args+=( "${ign}--rpm_safe_upgrade" ) ;| + |mk(driverdisk|kmp)) + args+=( "${ign}--spec=:spec file:_files -g '*.spec(-.)'" ) + ;| + |(mk|ld)tarball) + args+=( "${ign}--archive=:tarball:_files -g '*.tar(-.)'" ) + ;| + |mk(deb|dsc|rpm)) + args+=( "${ign}--legacy-postinst=:value [1]:(0 1)" ) + ;| + |mk(tarball|rpm|deb|dsc)) args+=( "${ign}(--source-only --binaries-only)--"{source,binaries}-only ) ;| + |match|build|mkkmp) + args+=( #TODO: check ignore needed in absence of parameters + "${ign}--no-prepare-kernel" + "${ign}--no-clean-kernel" + '--kernelsourcedir=:directory:_directories' + "${ign}-j+[specify maximum number of jobs to use when building]:jobs" + ) + ;| + |(|un)install) + args+=( + "${ign}--no-depmod" + "${ign}--no-initrd" + ) + ;| + |add) + args+=( + '-c[specify location of dkms.conf file]:location:_files' + ) + ;| + |remove|build|install|status|mk(^kmp)) + args+=( '(-a --arch -k)--all[specify all relevant kernels/arches]' ) + ;| + |build) + args+=( "${ign}--config=:kernel config file:_files" ) + ;| + |add|build|install|ldtarball) + args+=( '--force[force overwriting of extant files]' ) + ;| + |match) + args+=( "${ign}--templatekernel=:kernel:->kernels" ) + ;| + |mkdriverdisk) + args+=( + "${ign}(-d --distro)"{-d,--distro=}':distribution:(redhat'{,1,2,3}' suse unitedlinux)' + "${ign}(-r --release)"{-r,--release=}':release' + "${ign}--size=:size (kb) [1440]" + "${ign}--media=:media type [floppy]:(floppy iso tar)" + ) + ;| + add) + args+=( + '2:path:_directories' + '3:tarball:_files -g "*.tar(-.)"' + ) + ;; + install) + args+=( + '2:rpm file:_files -g "*.rpm(-.)"' + ) + ;; +esac + +_arguments -C $args && ret=0 + +case $state in + modules) + dirs=( ${(e)opt_args[--dkmstree]:-/var/lib/dkms}/*/*(/) ) + dirs=( ${${(M)dirs%/*/*}#/} ) + _description modules expl module + _multi_parts -i "$expl[@]" / dirs && ret=0 + ;; + kernels) + if compset -P 1 '*/'; then + _description architectures expl architecture + compadd "$expl[@]" /lib/modules/$IPREFIX/build/arch/*(/:t) && ret=0 + else + compset -S '/*' + dirs=( /lib/modules/*(/:t) ) + _description -V kernels expl kernel + compadd "$expl[@]" -r "/ \t\n\-" ${(on)dirs} && ret=0 + fi + ;; + architectures) + _description architectures expl architecture + compadd "$expl[@]" /lib/modules/$(uname -r)/build/arch/*(/:t) && ret=0 + ;; +esac + +return ret -- cgit v1.2.3 From dbbe7794ef50b93ce78fa07efa146dcf26e231fc Mon Sep 17 00:00:00 2001 From: dana Date: Thu, 7 Jun 2018 14:52:56 -0500 Subject: 42948: new opkg completion --- Completion/Linux/Command/_opkg | 462 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 462 insertions(+) create mode 100644 Completion/Linux/Command/_opkg (limited to 'Completion/Linux') diff --git a/Completion/Linux/Command/_opkg b/Completion/Linux/Command/_opkg new file mode 100644 index 000000000..5feadc11a --- /dev/null +++ b/Completion/Linux/Command/_opkg @@ -0,0 +1,462 @@ +#compdef opkg ipkg + +# Notes: +# +# - This function has been designed with opkg in mind, but much of it should +# also work with ipkg. +# +# - Caching doesn't appear to save a HUGE amount of time given the scale of most +# opkg repos (compared to e.g. APT) and the resources available to the devices +# that use them. +# +# - _opkg_pkg_* functions can be called with --update to update their respective +# cache files without actually completing. +# +# - Lots of code redundancy here (@todo). +# +# Notable styles supported: +# +# % zstyle ':completion:*:opkg:*' use-cache +# Set to yes to enable caching of package names. Usually disabled by default. +# +# % zstyle ':completion:*:opkg:*' cache-path +# Set to a directory path to override the default cache-file directory. +# +# % zstyle ':completion:*:opkg:*' cache-persists +# Set to yes to keep cache data in memory for the remainder of the shell +# session. Most completion functions do this always, but opkg tends to be used +# on fairly resource-constrained devices, so it's disabled by default here. +# +# % zstyle ':completion:*:opkg:*' status-paths ... +# Set to one or more paths or glob patterns to override the defaults used when +# checking cache validity. If any of the specified files has been modified +# more recently than the cache, the cache is considered invalid. +# +# % zstyle ':completion:*:opkg:*' conf-paths ... +# Set to one or more paths or glob patterns to override the defaults used when +# searching opkg configuration data. + +## +# Check cache validity. +__opkg_cache_policy() { + local -a tmp + + # Always invalidate if it's been over a week + tmp=( $1(#qmw+1N) ) + (( $#tmp )) && return 0 + + zstyle -a ":completion:$curcontext:" status-paths tmp + + if (( $#tmp )); then + tmp=( $~tmp(#qN) ) + else + tmp=( + {/opt,/usr,/var}/lib/{i,o}pkg/status(#q-.N) + {/opt,/usr,/var}/lib/{i,o}pkg/lists/packages(#q-.N) + /opt/var/opkg-lists/packages(#q-.N) + ) + fi + + # Always invalidate if we found no status files + (( $#tmp )) || return 0 + + # Invalidate if any status file is newer than the cache file + for 2 in $tmp; do + [[ $2 -nt $1 ]] && return 0 + done + + return 1 +} + +## +# Search opkg config files. +__opkg_grep_conf() { + local -aU tmp + + zstyle -a ":completion:$curcontext:" conf-paths tmp + + if (( $#tmp )); then + tmp=( $~tmp(#qN) ) + else + tmp=( + {,/opt}/etc/{i,o}pkg*.conf(#q-.N) + {,/opt}/etc/{i,o}pkg/*.conf(#q-.N) + ) + fi + + (( $#tmp )) || return 1 + + GREP_OPTIONS= command grep -sE "$@" $tmp +} + +## +# Complete architecture/priority pair. +# +# Architecture names are essentially arbitrary (up to the packager), so we can't +# really complete every possibility here — but we'll account for most of the +# popular ones. +_opkg_arch_prio() { + local -a copts=( "$@" ) + local -aU tmp + + [[ -prefix *: ]] && { + _message priority + return + } + + # Already configured arches + tmp=( ${(f)"$( _call_program architectures $svc print-architecture )"} ) + tmp=( ${${tmp##arch[ ]##}%% *} ) + + tmp+=( + # 'Meta' arches + all any noarch + # Arches supported by entware-ng + armv5soft armv7soft mipselsf x86-32 x86-64 + # Arches mentioned in the optware-ng source + arm armeb fsg3be hpmv2 i686 ixp4xxbe ixp4xxle mssii nslu2 powerpc qemux86 + slugosbe slugosle + # Arches mentioned in the Ångström distribution's narcissus source + a780 ac100 akita am180x-evm am3517-crane am3517-evm am37x-evm archos5 + archos5it arm arm-oabi armeb armv4 armv4b armv4t armv4tb armv5 armv5-vfp + armv5e armv5e-vfp armv5eb armv5t armv5t-vfp armv5te armv5te-vfp armv5teb + armv6 armv6-vfp armv6t-vfp armv7 armv7-vfp armv7a armv7a-vfp armv7a-vfp-neon + armv7at2-vfp armv7at2-vfp-neon armv7t2-vfp at32stk1000 at91sam9263ek + atngw100 avr32 beagleboard beaglebone bug20 c6a816x-evm c6a816x_evm c7x0 + cm-t35 collie da830-omapl137-evm da850-omapl138-evm davinci-dvevm dht-walnut + dm355-evm dm355-leopard dm357-evm dm365-evm dm3730-am3715-evm dm37x-evm + dm6446-evm dm6467-evm dm6467t-evm dns323 eee701 efika h2200 h3900 h4000 + h5000 hawkboard htcalpine hx4700 i386 i486 i586 i686 igep0020 iwmmxt + ixp4xxbe ixp4xxle kuropro lsppchd lsppchg lspro mini2440 mini6410 mips + mv2120 n1200 n2100 neuros-osd2 nokia800 om-gta01 om-gta02 omap3-pandora + omap3-touchbook omap3evm omap4430-panda omap4430_panda omap5912osk omapzoom + omapzoom2 omapzoom36x openrd-base openrd-client overo palmt650 poodle + powerpc ppc ppc405 ppc603e qemuarm qemumips qemuppc qemux86 sheevaplug + simpad smartq5 spitz tosa ts409 tsx09 usrp-e1xx x86 + ) + + _values -O copts -w -S : architecture ${^tmp}:priority +} + +## +# Complete destination name. +_opkg_dest() { + local -a copts=( "$@" ) + local -aU tmp + + tmp=( ${(f)"$( __opkg_grep_conf '^\s*dest\s+\S+\s+\S+' )"} ) + tmp=( ${tmp##[[:space:]]#dest[[:space:]]##} ) + tmp=( ${tmp%%[[:space:]]*} ) + + (( $#tmp )) || { + _message destination + return + } + _values -O copts -w destination $tmp +} + +## +# Complete destination-name/path pair. +_opkg_dest_path() { + local -a copts=( "$@" ) + local -aU tmp + + tmp=( ${(f)"$( __opkg_grep_conf '^\s*dest\s+\S+\s+\S+' )"} ) + tmp=( ${tmp##[[:space:]]#dest[[:space:]]##} ) + tmp=( ${tmp%%[[:space:]]*} ) + + (( $#tmp )) || { + _message destination:path + return + } + _values -O copts -w -S : destination ${^tmp}': :_directories' +} + +## +# Complete any package name. +_opkg_pkg_all() { + local -a upd copts + + zparseopts -a upd -D -E -update + copts=( "$@" ) + + { (( ! $#_opkg_cache_pkg_all )) || _cache_invalid opkg-pkg-all } && + ! _retrieve_cache opkg-pkg-all && { + _opkg_cache_pkg_all=( ${(f)"$( _call_program pkg-all ${svc:-opkg} list )"} ) + _opkg_cache_pkg_all=( ${(@)_opkg_cache_pkg_all##[[:space:]]*} ) + _opkg_cache_pkg_all=( ${(@)_opkg_cache_pkg_all%%[[:space:]]*} ) + _store_cache opkg-pkg-all _opkg_cache_pkg_all + } + (( $#upd )) && return 0 + + (( $#_opkg_cache_pkg_all )) || { + _message package + return + } + _values -O copts -w package $_opkg_cache_pkg_all +} + +## +# Complete installed package name. +_opkg_pkg_inst() { + local -a upd copts + + zparseopts -a upd -D -E -update + copts=( "$@" ) + + { (( ! $#_opkg_cache_pkg_inst )) || _cache_invalid opkg-pkg-inst } && + ! _retrieve_cache opkg-pkg-inst && { + _opkg_cache_pkg_inst=( ${(f)"$( + _call_program pkg-inst ${svc:-opkg} list-installed + )"} ) + _opkg_cache_pkg_inst=( ${(@)_opkg_cache_pkg_inst##[[:space:]]*} ) + _opkg_cache_pkg_inst=( ${(@)_opkg_cache_pkg_inst%%[[:space:]]*} ) + _store_cache opkg-pkg-inst _opkg_cache_pkg_inst + } + (( $#upd )) && return 0 + + (( $#_opkg_cache_pkg_inst )) || { + _message 'installed package' + return + } + _values -O copts -w 'installed package' $_opkg_cache_pkg_inst +} + +## +# Complete new (installable) package name. +_opkg_pkg_new() { + local -a upd copts + + zparseopts -a upd -D -E -update + copts=( "$@" ) + + { (( ! $#_opkg_cache_pkg_new )) || _cache_invalid opkg-pkg-new } && + ! _retrieve_cache opkg-pkg-new && { + _opkg_pkg_all --update + _opkg_pkg_inst --update + _opkg_cache_pkg_new=( ${_opkg_cache_pkg_all:|_opkg_cache_pkg_inst} ) + _store_cache opkg-pkg-new _opkg_cache_pkg_new + } + (( $#upd )) && return 0 + + (( $#_opkg_cache_pkg_new )) || { + _message 'installable package' + return + } + _values -O copts -w 'installable package' $_opkg_cache_pkg_new +} + +## +# Complete upgradeable package name. +_opkg_pkg_upgr() { + local -a upd copts + + zparseopts -a upd -D -E -update + copts=( "$@" ) + + { (( ! $#_opkg_cache_pkg_upgr )) || _cache_invalid opkg-pkg-upgr } && + ! _retrieve_cache opkg-pkg-upgr && { + _opkg_cache_pkg_upgr=( ${(f)"$( + _call_program pkg-upgr ${svc:-opkg} list-upgradable + )"} ) + _opkg_cache_pkg_upgr=( ${(@)_opkg_cache_pkg_upgr##[[:space:]]*} ) + _opkg_cache_pkg_upgr=( ${(@)_opkg_cache_pkg_upgr%%[[:space:]]*} ) + _store_cache opkg-pkg-upgr _opkg_cache_pkg_upgr + } + (( $#upd )) && return 0 + + (( $#_opkg_cache_pkg_upgr )) || { + _message 'upgradable package' + return + } + _values -O copts -w 'upgradable package' $_opkg_cache_pkg_upgr +} + +_opkg() { + local curcontext=$curcontext ret=1 cache_policy help variant svc=$words[1] + local -a line state state_descr args tmp + local -A opt_args val_args + + if + zstyle -t ":completion:*:*:$service:*" cache-persists && + (( ! $+opkg_cache_pkg_all )) + then + typeset -gaU _opkg_cache_pkg_all + typeset -gaU _opkg_cache_pkg_inst + typeset -gaU _opkg_cache_pkg_new + typeset -gaU _opkg_cache_pkg_upgr + else + local -aU _opkg_cache_pkg_all + local -aU _opkg_cache_pkg_inst + local -aU _opkg_cache_pkg_new + local -aU _opkg_cache_pkg_upgr + fi + + zstyle -s ":completion:*:*:$service:*" cache-policy cache_policy + [[ -n $cache_policy ]] || + zstyle ":completion:*:*:$service:*" cache-policy __opkg_cache_policy + + # Options are ordered by long name. Alternative names not listed in the usage + # help are (mostly) ignored + args=( + '*--add-arch=[register architecture with priority]: :_opkg_arch_prio' + '*--add-dest=[register destination with path]: :_opkg_dest_path' + '--autoremove[remove unnecessary packages]' + '--combine[combine upgrade and install operations]' + '(-f --conf)'{-f+,--conf=}'[specify opkg config file]:config file:_files' + '(-d --dest)'{-d+,--dest=}'[specify root directory for package operations]: :_opkg_dest' + '--download-only[make no changes (download only)]' + '--force-checksum[ignore checksum mismatches]' + '--force-downgrade[allow package downgrades]' + '--force-depends[ignore failed dependencies]' + '(--force-maintainer --ignore-maintainer)--force-maintainer[overwrite local config files with upstream changes]' + '--force-overwrite[overwrite files from other packages]' + '--force-postinstall[always run postinstall scripts]' + '--force-reinstall[reinstall packages]' + # This is obnoxiously long; maybe add --force-removal-* to ignored-patterns + '--force-removal-of-dependent-packages[remove packages and all dependencies]' + '--force-remove[ignore failed prerm scripts]' + '--force-space[disable free-space checks]' + '(--force-maintainer --ignore-maintainer)--ignore-maintainer[ignore upstream changes to config files]' + '(-l --lists-dir)'{-l+,--lists-dir=}'[specify package-list directory]:list directory:_directories' + '(--noaction --test)'{--noaction,--test}'[make no changes (test only)]' + '--nodeps[do not follow dependencies]' + # Undocumented variant + '!(-o --offline --offline-root)--offline=:root directory:_directories' + '(-o --offline --offline-root)'{-o+,--offline-root=}'[specify root directory for offline package operations]:root directory:_directories' + '(-A --query-all)'{-A,--query-all}'[query all packages (not just installed)]' + '--recursive[remove packages and all their dependencies]' + '--size[show package sizes]' + '(-t --tmp-dir)'{-t+,--tmp-dir=}'[specify temp directory]:temp directory:_directories' + '(-V --verbosity)'{-V+,--verbosity=}'[specify output verbosity level]: :->verbosity-levels' + '(: -)'{-v,--version}'[display version information]' + '1: :->commands' + '*::: :->extra' + ) + + # There are a few different variants of opkg, but we'll concern ourselves + # mainly with OpenWRT/Entware vs (up-stream) Yocto + _pick_variant -r variant openwrt=--nocase yocto --help + + if [[ $variant == openwrt ]]; then + args+=( + '--cache=[specify cache directory]:cache directory:_directories' + '--nocase[match patterns case-insensitively]' + ) + else + args+=( + '*--add-exclude=[register package for exclusion]: :_opkg_pkg_all' + '--cache-dir=[specify cache directory]:cache directory:_directories' + '--host-cache-dir[do not place cache in offline root directory]' + '--no-install-recommends[do not install recommended packages]' + '--prefer-arch-to-version[prefer higher architecture priorities to higher versions]' + '--volatile-cache[use volatile download cache]' + ) + fi + + _arguments -s -S -C : $args && ret=0 + + case $state in + commands) + tmp=( + 'compare-versions[compare version numbers]' + 'configure[configure unpacked package]' + 'depends[display dependencies of package]' + 'download[download package]' + 'files[display files belonging to package]' + 'find[search package names and descriptions]' + 'flag[flag package]' + 'info[display package information]' + 'install[install package]' + 'list[display available packages]' + 'list-changed-conffiles[display user-modified config files]' + 'list-installed[display installed packages]' + 'list-upgradable[display upgradable packages]' + 'print-architecture[display installable architectures]' + 'remove[remove package]' + 'search[display packages providing file]' + 'status[display package status]' + 'update[update list of available packages]' + 'upgrade[upgrade installed package]' + 'whatconflicts[display what conflicts with package]' + 'whatdepends[display what depends on package]' + 'whatdependsrec[display what depends on package (recursive)]' + 'whatprovides[display what provides package]' + 'whatrecommends[display what recommends package]' + 'whatreplaces[display what replaces package]' + 'whatsuggests[display what suggests package]' + ) + [[ $variant == openwrt ]] || + tmp+=( 'clean[clean internal cache]' ) + + _values sub-command $tmp && ret=0 + ;; + verbosity-levels) + _values 'verbosity level' \ + '0[show errors only]' \ + '1[show normal messages (default)]' \ + '2[show informational message]' \ + '3[show debug messages (level 1)]' \ + '4[show debug messages (level 2)]' \ + && ret=0 + ;; + extra) + case $line[1] in + compare-versions) + case $CURRENT in + 1|3) _message 'version string' && ret=0 ;; + 2) + _values operator \ + '<<[earlier]' \ + '<=[earlier or equal]' \ + '=[equal]' \ + '>=[later or equal]' \ + '>>[later]' \ + && ret=0 + ;; + esac + ;; + configure|files|list-*|status) + (( CURRENT == 1 )) && _opkg_pkg_inst && ret=0 + ;; + depends|what*) + if [[ -n ${opt_args[(I)-A|--query-all]} ]]; then + _opkg_pkg_all && ret=0 + else + _opkg_pkg_inst && ret=0 + fi + ;; + download) + _opkg_pkg_all && ret=0 + ;; + find|info|list) + (( CURRENT == 1 )) && _opkg_pkg_all && ret=0 + ;; + flag) + if (( CURRENT == 1 )); then + _values flag hold noprune user ok installed unpacked && ret=0 + else + _opkg_pkg_inst && ret=0 + fi + ;; + install) + _opkg_pkg_new && ret=0 + ;; + remove) + _opkg_pkg_inst && ret=0 + ;; + search) + (( CURRENT == 1 )) && _files && ret=0 + ;; + upgrade) + _opkg_pkg_upgr && ret=0 + ;; + esac + ;; + esac + + (( ret && $#state )) && _message 'no more arguments' && ret=0 + return ret +} + +_opkg "$@" -- cgit v1.2.3 From afd008d96bee0993ebbca697f93917b0897207bd Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Thu, 21 Jun 2018 13:28:24 +0200 Subject: 43073: various completion option updates --- ChangeLog | 14 ++++++++++ Completion/Linux/Command/_cryptsetup | 6 +++-- Completion/Linux/Command/_kpartx | 6 ++--- Completion/Linux/Command/_ss | 10 ++++--- Completion/Linux/Command/_sysstat | 12 +++++---- Completion/Linux/Command/_tune2fs | 2 +- Completion/Unix/Command/_ansible | 52 +++++++++++++++++++++++++----------- Completion/Unix/Command/_git | 49 ++++++++++++++++++++++----------- Completion/Unix/Command/_lynx | 33 ++++++++++++++--------- Completion/Unix/Command/_mpc | 18 ++++++++++++- Completion/Unix/Command/_readelf | 3 ++- Completion/Unix/Command/_sqlite | 27 ++++++++++++++++--- Completion/Unix/Command/_subversion | 5 +++- Completion/Unix/Command/_tmux | 8 ++++-- Completion/Unix/Command/_user_admin | 1 + Completion/Unix/Command/_wget | 11 ++++---- Completion/Unix/Command/_xxd | 4 +-- Completion/X/Command/_qiv | 20 +++++++++++--- Completion/Zsh/Command/_which | 7 ++--- Completion/Zsh/Command/_zed | 1 + 20 files changed, 209 insertions(+), 80 deletions(-) (limited to 'Completion/Linux') diff --git a/ChangeLog b/ChangeLog index 34b6f7ebb..fff2b6d28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2018-06-18 Oliver Kiddle + + * 43073: Completion/Linux/Command/_cryptsetup, + Completion/Linux/Command/_sysstat, Completion/Linux/Command/_ss, + Completion/Linux/Command/_kpartx, Completion/Linux/Command/_tune2fs, + Completion/Unix/Command/_ansible, Completion/Unix/Command/_git, + Completion/Unix/Command/_lynx, Completion/Unix/Command/_mpc, + Completion/Unix/Command/_readelf, Completion/Unix/Command/_sqlite, + Completion/Unix/Command/_subversion, Completion/Unix/Command/_tmux, + Completion/Unix/Command/_user_admin, Completion/Unix/Command/_wget, + Completion/Unix/Command/_xxd, Completion/X/Command/_qiv, + Completion/Zsh/Command/_which, Completion/Zsh/Command/_zed: + various completion option updates + 2018-06-20 Peter Stephenson * 43077: Src/builtin.c: failure of math evaluation didn't diff --git a/Completion/Linux/Command/_cryptsetup b/Completion/Linux/Command/_cryptsetup index ea7152ea1..351859586 100644 --- a/Completion/Linux/Command/_cryptsetup +++ b/Completion/Linux/Command/_cryptsetup @@ -33,7 +33,7 @@ _arguments -s \ '(--use-random)--use-urandom[use /dev/urandom to generate volume key]' \ '--shared[share device with another non-overlapping crypt segment]' \ '--uuid=[set device UUID]:uuid' \ - '--allow-discards[allow discards (aka TRIM) requests for device]' \ + '--allow-discards[allow discard (aka TRIM) requests for device]' \ '--header=[device or file with separated LUKS header]:file:_files' \ '--test-passphrase[do not activate device, just check passphrase]' \ '--tcrypt-hidden[use hidden header (hidden TCRYPT device)]' \ @@ -64,6 +64,7 @@ _arguments -s \ '--persistent[set activation flags persistent for device]' \ '--label=[set label for the LUKS2 device]:label' \ '--subsystem=[set subsystem label for the LUKS2 device]:subsystem' \ + '--unbound[create unbound (no assigned data segment) LUKS2 keyslot]' \ '(- : *)--version[show version information]' \ '(- : *)'{-\?,--help}'[display help information]' \ '(- : *)--usage[display brief usage]' \ @@ -86,6 +87,7 @@ case $state in 'luksAddKey:add a new key' 'luksRemoveKey:remove a key' 'luksChangeKey:change a key' + 'luksConvertKey:convert a key to new pbkdf parameters' 'luksKillSlot:wipe key from slot' 'luksUUID:print/change device UUID' 'isLuks:check if device is a LUKS partition' @@ -112,7 +114,7 @@ case $state in erase|convert|config|repair|(luks(AddKey|Erase|RemoveKey|DelKey|UUID|Dump)|isLuks)) args=( $device ) ;; - luks(Format|AddKey|RemoveKey|ChangeKey)) + luks(Format|AddKey|RemoveKey|ChangeKey|ConvertKey)) args=( $device ':key file:_files' ) ;; luksHeader*) args=( $device '--header-backup-file:file:_files' );; diff --git a/Completion/Linux/Command/_kpartx b/Completion/Linux/Command/_kpartx index 11c614c01..8f09c416d 100644 --- a/Completion/Linux/Command/_kpartx +++ b/Completion/Linux/Command/_kpartx @@ -1,6 +1,6 @@ #compdef kpartx -_arguments -s -w : \ +_arguments -s -S : \ '-a[add partition mappings]' \ '-r[read-only partition mappings]' \ '-d[delete partition mappings]' \ @@ -9,6 +9,6 @@ _arguments -s -w : \ '-p[set device name-partition number delimiter]' \ '-f[force creation of mappings]' \ '-g[force GUID partition table]' \ - '-v[Operate verbosely]' \ - '-s[don'\''t return until the partitions are created]' \ + '-v[operate verbosely]' \ + '-n[return before the partitions are created]' '!(-n)-s' \ '1: : _files' diff --git a/Completion/Linux/Command/_ss b/Completion/Linux/Command/_ss index dff289947..b1bfa207c 100644 --- a/Completion/Linux/Command/_ss +++ b/Completion/Linux/Command/_ss @@ -18,6 +18,7 @@ _arguments -C -s \ "($info -m --memory)"{-m,--memory}'[show socket memory usage]' \ "($info -p --processes)"{-p,--processes}'[show process using each socket]' \ "($info -i --info)"{-i,--info}'[show internal TCP information]' \ + "($info)--tipcinfo[show internal tipc socket information]" \ "($info -s --summary)"{-s,--summary}'[print summary statistics]' \ "($info -b --bpf)"{-b,--bpf}'[show bpf filter socket information]' \ "($info -E --events)"{-E,--events}'[continually display sockets as they are destroyed]' \ @@ -33,13 +34,14 @@ _arguments -C -s \ "($info -d --dccp)"{-d,--dccp}'[display DCCP sockets]' \ "($info -w --raw)"{-w,--raw}'[display RAW sockets]' \ "($info -x --unix)"{-x,--unix}'[display Unix domain sockets]' \ + "($info)--tipc[display only TIPC sockets]" \ "($info)--vsock[display only vsock sockets]" \ - "($info -f --family)"{-f,--family}'[display sockets of specified type]:family:(unix inet inet6 link netlink unix vsock)' \ + "($info -f --family)"{-f+,--family=}'[display sockets of specified type]:family:(unix inet inet6 link netlink unix vsock tipc)' \ "($info -K --kill)"{-K,--kill}'[forcibly close sockets, display what was closed]' \ "($info -H --no-header)"{-H,--no-header}'[suppress header line]' \ - "($info -A --query --socket)"{-A,--query,--socket}'[specify socket tables to show]: :_values -s , socket\ table all inet tcp udp raw unix packet netlink unix_dgram unix_stream unix_seqpacket packet_raw packet_dgram vsock_stream vsock_dgram' \ - "($info -D)"{-D,--diag=}'[dump raw info to file]:file:_files' \ - "($info -F)"{-F,--filter=}'[read filter information from a file]:file:_files' \ + "($info -A --query --socket)"{-A+,--query=,--socket=}'[specify socket tables to show]: :_values -s , socket\ table all inet tcp udp raw unix packet netlink unix_dgram unix_stream unix_seqpacket packet_raw packet_dgram vsock_stream vsock_dgram tipc' \ + "($info -D)"{-D+,--diag=}'[dump raw info to file]:file:_files' \ + "($info -F)"{-F+,--filter=}'[read filter information from a file]:file:_files' \ "($info)*: :->filter" && ret=0 if [[ -n $state ]]; then diff --git a/Completion/Linux/Command/_sysstat b/Completion/Linux/Command/_sysstat index 855bf0a70..8b7929ddd 100644 --- a/Completion/Linux/Command/_sysstat +++ b/Completion/Linux/Command/_sysstat @@ -9,7 +9,7 @@ _mpstat() { '(-A)-N[specify NUMA nodes]:NUMA node' \ '(-A)-n[report summary CPU statistics based on NUMA node placement]' \ '-o[display statistics in JSON]:format:(JSON)' \ - '(-A)-P[specify processor number]:processor: _values -s "," processor ON ALL {0..$(_call_program processors getconf _NPROCESSORS_ONLN)}' \ + '(-A)-P[specify processor number]:processor: _values -s "," processor ALL {0..$(_call_program processors getconf _NPROCESSORS_ONLN)}' \ '-u[report CPU utilization]' \ '(- 1 2)-V[display version information]' \ '1: : _guard "^-*" interval' \ @@ -85,29 +85,31 @@ _sar() { '-F[display statistics for mounted filesystems]' \ '-f[extract records from file]:record:_files' \ '-H[report hugepages utilization]' \ - '-h[display help]' \ + '(--human -p)-h[make output easier to read: implies --human and -p]' \ + '(- 1 2)--help[display usage information]' \ '--human[print sizes in human readable format]' \ '*-I[report statistics for interrupts]:interrupts: _values -s "," interrupts 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 SUM ALL XALL' \ '-i[select records as close as possible to interval]:interval' \ '-j[display persistent device names]:type:(ID LABEL PATH UUID)' \ '-m[report power management statistics]:keywords: _values -s "," keywords CPU FAN FREQ IN TEMP USB ALL' \ - '-n[report network statistics]:keywords: _values -s "," keywords DEV EDEV NFS NFSD SOCK IP EIP ICMP EICMP TCP ETCP UDP SOCK6 IP6 EIP6 ICMP6 EICMP6 UDP6 ALL' \ + '-n[report network statistics]:keywords: _values -s "," keywords DEV EDEV NFS NFSD SOCK IP EIP ICMP EICMP TCP ETCP UDP SOCK6 IP6 EIP6 ICMP6 EICMP6 UDP6 FC SOFT ALL' \ '-o[save readings to file in binary form]:file:_files' \ '-P[report per-processor statistics]:processor: _values -s "," processors ALL' \ '-p[pretty-print device names]' \ '-q[report queue length and load averages]' \ '-R[report memory statistics]' \ - '-r[report memory utilization statistics]' \ + '-r[report memory utilization statistics]:: :(ALL)' \ '-S[report swap space utilization]' \ '-s[set starting time of report]:start time (HH\:MM\:SS)' \ '--sadc[print name of data collector]' \ '-t[display timestamps in original local time of file creator]' \ - '-u[report CPU utilization]: :(ALL)' \ + '-u[report CPU utilization]:: :(ALL)' \ '(- 1 2)-V[display version information]' \ '-v[report status of kernel tables]' \ '-W[report swapping statistics]' \ '-w[report task creation and system switching activity]' \ '-y[report TTY device activity]' \ + '-z[omit output for any devices lacking activity during sample period]' \ '1: : _guard "^-*" interval' \ '2: : _guard "^-*" count' } diff --git a/Completion/Linux/Command/_tune2fs b/Completion/Linux/Command/_tune2fs index af120e279..3d64f266c 100644 --- a/Completion/Linux/Command/_tune2fs +++ b/Completion/Linux/Command/_tune2fs @@ -24,7 +24,7 @@ _arguments -s -S \ '-m+[set the percentage of reserved filesystem blocks]:percentage' \ '-M+[set the last-mounted directory for the filesystem]:directory:_files -/' \ '-o+[mount options]:options:_values -s , debug bsdgroups user_xattr acl uid16 journal_data journal_data_ordered journal_data_writeback nobarrier block_validity discard nodelalloc' \ - '-O+[set or clear filesystem features]: :_values -s , feature dir_index dir_nlink encrypt extentextent extra_isize filetype flex_bg has_journalhuge_file large_file metadata_csum mmp project quota read-only resize_inode sparse_super uninit_bg' \ + '-O+[set or clear filesystem features]: :_values -s , feature 64bit dir_index dir_nlink ea_inode encrypt extent extra_isize filetype flex_bg has_journal large_dir huge_file large_file metadata_csum metadata_csum_seed mmp project quota read-only resize_inode sparse_super uninit_bg' \ '-r+[set the number of reserved filesystem blocks]:number' \ '-Q+[set quota feature on the superblock]: :_values -s , "quota option" usrquota grpquota prjquota' \ '-s+[set sparse super feature]:state:((0\:off 1\:on))' \ diff --git a/Completion/Unix/Command/_ansible b/Completion/Unix/Command/_ansible index f05dac8a6..330ef66b7 100644 --- a/Completion/Unix/Command/_ansible +++ b/Completion/Unix/Command/_ansible @@ -30,7 +30,7 @@ case $service in '(-D --diff)'{-D,--diff}'[show differences when changing small files and templates]' '(-b --become)'{-b,--become}'[escalate privileges on remote system]' '(-f --forks)'{-f+,--forks=}'[specify number of parallel processes to use]:processes [5]' - '--become-method=[specify privilege escalation method to use]:method [sudo]:(sudo su pbrun pfexec doas dzdo ksu runas pmrun)' + '--become-method=[specify privilege escalation method to use]:method [sudo]:(sesu sudo su pbrun pfexec doas dzdo ksu runas pmrun enable)' '--become-user=[specify remote user for running operations]:user:_users' "--syntax-check[perform a syntax check on the playbook, but don't execute it]" '!(-R --su-user -U --sudo-user)'{-R,-U,--su-user,--sudo-user}':user [root]:_users' @@ -39,17 +39,20 @@ case $service in ansible|ansible-console|ansible-inventory|ansible-playbook|ansible-pull|ansible-vault) args+=( '--ask-vault-pass[ask for vault password]' - '--new-vault-id=[specify new vault identity to use for rekey]:vault id' - '--new-vault-password-file=[specify new vault password file to use for rekey]:file:_files' '--vault-id=[specify vault identity to use]:vault identity' '--vault-password-file=[specify vault password file]:vault password file:_files' ) ;| ansible|ansible-console|ansible-inventory|ansible-playbook|ansible-pull) args+=( - '--list-hosts[output list of matching hosts]' - '(-i --inventory)'{-i+,--inventory=}'[specify inventory host file]:inventory file:_files' + '(-i --inventory)'{-i+,--inventory=}'[specify inventory host file or host list]: : _alternative "files\:inventory file\:_files" + "hosts\:host\: _sequence _hosts"' '!(-i --inventory)--inventory-file=:inventory file:_files' + ) + ;| + ansible|ansible-console|ansible-playbook|ansible-pull) + args+=( + '--list-hosts[output list of matching hosts]' '(-l --limit)'{-l+,--limit=}'[further limit hosts to an additional pattern]:host subset:->hosts' ) ;| @@ -58,21 +61,22 @@ case $service in '(-e --extra-vars)'{-e+,--extra-vars=}'[set additional variables]:key=value or YAML/JSON' ) ;| - ansible-playbook|ansible-pull) + ansible|ansible-console|ansible-inventory) args+=( - '(-t --tags)'{-t,--tags}'[only run plays and tasks tagged with these values]' - "--skip-tags[only run plays and tasks whose tags don't match]" + '--playbook-dir=[specify substitute playbook directory]:directory:_directories' ) ;| - ansible|ansible-pull) + ansible-playbook|ansible-pull) args+=( - '(-m --module-name)'{-m+,--module-name=}'[specify module]:module:->plugins' + '(-t --tags)'{-t,--tags}'[only run plays and tasks tagged with these values]' + "--skip-tags[only run plays and tasks whose tags don't match]" ) ;| ansible) args+=( '(-a --args)'{-a+,--args=}'[specify command or module arguments]:arguments:->args' '(-B --background)'{-B+,--background=}'[run asynchronously, failing after specified time]:fail timeout (seconds)' + '(-m --module-name)'{-m+,--module-name=}'[specify module]:module:->plugins' '(-o --one-line)'{-o,--one-line}'[condense output]' '(-P --poll)'{-P+,--poll=}'[specify the poll interval if using -B]:interval (seconds) [15]' '(-t --tree)'{-t+,--tree=}'[specify directory for log output]:directory:_directories' @@ -98,14 +102,16 @@ case $service in ;; ansible-doc) args+=( - '(-l --list)'{-l,--list}'[list available plugins]' - '(-s --snippet)'{-s,--snippet}'[show playbook snippet for specified plugins]' + '(-l --list -F --list_files -s --snippet)'{-l,--list}'[list available plugins]' + '(-l --list -F --list_files -s --snippet)'{-F,--list_files}'[show plugin names and their source files without summaries]' + '(-l --list -F --list_files -s --snippet)'{-s,--snippet}'[show playbook snippet for specified plugins]' '(-t --type)'{-t+,--type=}'[choose plugin type]:plugin type [module]:(cache callback connection inventory lookup module strategy vars)' '*:plugin:->plugins' ) ;; ansible-inventory) args+=( + '--export[when doing an --list, represent in a way that is optimized for export]' '(-y --yaml)--graph[output inventory graph]' '--host[output specific host information]' '--list[output all hosts information]' @@ -125,7 +131,7 @@ case $service in ;; ansible-playbook) args+=( - '--flush-cache[clear the fact cache]' + '--flush-cache[clear the fact cache for every host in inventory]' '--force-handlers[run handlers even if a task fails]' '--list-tags[list all available tags]' '--list-tasks[list all tasks that would be executed]' @@ -139,6 +145,7 @@ case $service in "--check[don't make any changes]" '(-d --directory)'{-d+,--directory=}'[specify directory to checkout repository to]:directory:_directories' '--full[do a full instead of a shallow clone]' + '(-m --module-name)'{-m+,--module-name=}'[specify repository module used for checking out repository]:module:(git subversion hg bzr)' '--accept-host-key[adds the hostkey for the repo url if not already added]' '--purge[purge checkout after playbook run]' '(-f --force)'{-f,--force}'[run the playbook even if the repository could not be updated]' @@ -153,6 +160,8 @@ case $service in ;; ansible-vault) args=( -A "-*" $args + '--new-vault-id=[specify new vault identity to use for rekey]:vault id' + '--new-vault-password-file=[specify new vault password file to use for rekey]:file:_files' '*::args:->vault' ) ;; @@ -200,9 +209,15 @@ case $state in plugins) plugvar=_ansible_${plug}_plugins typeset -ga ${plug} - (( ${(P)#plugvar} )) || set -A ${plugvar} \ - ${${(f)"$(_call_program plugins ansible-doc -t $plug -l)"}/ ##/:} - _describe -t plugins "${plug} plugin" $plugvar && ret=0 + if zstyle -T ":completion:${curcontext}:plugins" verbose; then + (( ${(P)#plugvar} )) || set -A ${plugvar} \ + ${${(f)"$(_call_program plugins ansible-doc -t $plug -l)"}/ ##/:} + _describe -t plugins "${plug} plugin" $plugvar && ret=0 + else + (( ${(P)#plugvar} )) || set -A ${plugvar} \ + ${${(f)"$(_call_program plugins ansible-doc -t $plug -F)"}%% *} + _wanted plugins expl "${plug} plugin" compadd -a $plugvar && ret=0 + fi ;; galaxy) curcontext="${curcontext%:*}-${line[1]}:" @@ -265,6 +280,11 @@ case $state in curcontext="${curcontext%:*}-${line[1]}:" args=() case $line[1] in + encrypt*|edit|rekey) + args+=( + '--encrypt-vault-id=[specify vault id to use to encrypt (required if more than one vault-id is provided)]:vault id' + ) + ;| (de|en)crypt*) args=( '--output=[specify output file name]:file:_files' ) ;| encrypt_string) args+=( diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index b92a320df..38b872ea0 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -871,6 +871,7 @@ _git-fetch () { '(-n --no-tags -t --tags)'{-n,--no-tags}'[disable automatic tag following]' \ '(--all -m --multiple)'{-m,--multiple}'[fetch from multiple remotes]' \ '(-P --prune-tags)'{-P,--prune-tags}'[prune local tags no longer on remote and clobber changed tags]' \ + \*{-o+,--server-option=}'[send specified string to the server when using protocol version 2]:option' \ '--filter=[object filtering]:filter:_git_rev-list_filters' \ '*:: :->repository-or-group-or-refspec' && ret=0 @@ -959,9 +960,10 @@ _git-gc () { _arguments -S -s \ '--aggressive[more aggressively optimize]' \ '--auto[check whether housekeeping is required]' \ - '( --no-prune)--prune=[prune loose objects older than given date]: :__git_datetimes' \ + '( --no-prune)--prune=-[prune loose objects older than given date]::date [2 weeks ago]:__git_datetimes' \ '(--prune )--no-prune[do not prune any loose objects]' \ - '(-q --quiet)'{-q,--quiet}'[suppress progress reporting]' + '(-q --quiet)'{-q,--quiet}'[suppress progress reporting]' \ + '--keep-largest-pack[repack all other packs except the largest pack]' \ } (( $+functions[_git-grep] )) || @@ -1768,7 +1770,10 @@ _git-status () { '--ignored=-[show ignored files as well]:mode [traditional]:(traditional matching no)' \ '(-z --null --column --no-column)'{-z,--null}'[use NUL termination on output]' \ '(--no-column -z --null)--column=-[display in columns]::column.status option:((always\:"always show in columns" never\:"never show in columns" auto\:"show in columns if the output is to the terminal" column\:"fill columns before rows (default)" row\:"fill rows before columns" plain\:"show in one column" dense\:"make unequal size columns to utilize more space" nodense\:"make equal size columns"))' \ - '(--column)--no-column[do not display in columns]' \ + "(--column)--no-column[don't display in columns]" \ + "(--no-renames -M --find-renames)--no-renames[don't detect renames]" \ + '(--no-renames -M --find-renames)-M[detect renames]' \ + '(--no-renames -M --find-renames)--find-renames=-[detect renames, optionally set similarity index]::similarity' \ '*: :__git_ignore_line_inside_arguments _files' } @@ -2155,16 +2160,18 @@ _git-config () { '(--global --system -f --file --blob)--local[use local config file]' \ '(--global --system --local --blob)'{-f+,--file=}'[use given config file]:config file:_files' \ '(--global --system --local -f --file)--blob=[read config from given blob object]:blob:__git_blobs' \ - '( --int --bool-or-int --path --expiry-date)--bool[setting is a boolean]' \ - '(--bool --bool-or-int --path --expiry-date)--int[setting is an integer]' \ - '(--bool --int --path --expiry-date)--bool-or-int[setting is an integer]' \ - '(--bool --int --bool-or-int --expiry-date)--path[setting is a path]' \ - '(--bool --int --bool-or-int --path )--expiry-date[setting is an expiry date]' \ + '(-t --type --bool --int --bool-or-int --path --expiry-date)'{-t+,--type=}'[ensure that incoming and outgoing values are canonicalize-able as the given type]:type:(bool int bool-or-int path expiry-date color)' \ + '(-t --type --int --bool-or-int --path --expiry-date)--bool[setting is a boolean]' \ + '(-t --type --bool --bool-or-int --path --expiry-date)--int[setting is an integer]' \ + '(-t --type --bool --int --path --expiry-date)--bool-or-int[setting is an integer]' \ + '(-t --type --bool --int --bool-or-int --expiry-date)--path[setting is a path]' \ + '(-t --type --bool --int --bool-or-int --path)--expiry-date[setting is an expiry date]' \ '(-z --null)'{-z,--null}'[end values with NUL and newline between key and value]' \ '(--get --get-all --get-urlmatch --replace-all --add --unset --unset-all --rename-section --remove-section -e --edit --get-color --get-colorbool)--name-only[show variable names only]' \ '(--includes)'--no-includes"[don't respect \"include.*\" directives]" \ '(--no-includes)'--includes'[respect "include.*" directives in config files when looking up values]' \ '(--global --system --local -f --file --blob --get-urlmatch --replace-all --add --unset --unset-all --rename-section --remove-section -e --edit --get-color --get-colorbool)--show-origin[show origin of config]' \ + '(2 --add -e --edit -l --list --name-only --rename-section --remove-section --replace-all --unset --unset-all)--default=[with --get, use specified default value when entry is missing]:default' \ $name_arg \ $value_arg \ '::value regex' \ @@ -3708,11 +3715,17 @@ _git-replace () { '(: * --raw -f --force)'{-l,--list}'[list replace refs]:pattern' \ {-d,--delete}'[delete existing replace refs]:*:replacement:__git_objects' \ '(* 2 --format)'{-e,--edit}'[edit existing object and replace it with the new one]' \ - '(--raw --format)'{-g,--graft}'[rewrite the parents of a commit]' + '(--raw --format)'{-g,--graft}'[rewrite the parents of a commit]' \ + '--convert-graft-file[convert existing graft file]' } # Ancillary Commands (Interrogators) +(( $+functions[_git-annotate] )) || +_git-annotate() { + _git-blame "$@" +} + (( $+functions[_git-blame] )) || _git-blame () { local curcontext=$curcontext state line ret=1 @@ -3744,6 +3757,8 @@ _git-blame () { '(-n --show-number)'{-n,--show-number}'[show the line number in the original commit]' \ '-s[suppress author name and timestamp]' \ '-w[ignore whitespace when finding lines]' \ + '(--color-by-age)--color-lines[color redundant metadata from previous line differently]' \ + '(--color-lines)--color-by-age[color lines by age]' \ '--indent-heuristic[use indent-based heuristic to improve diffs]' \ $revision_options \ ':: :__git_revisions' \ @@ -3831,10 +3846,11 @@ _git-get-tar-commit-id () { _git-help () { _arguments -S -s \ '( -g --guides -i --info -m --man -w --web)'{-a,--all}'[show all available commands]' \ - '(-a --all -g --guides -m --man -w --web)'{-i,--info}'[show all available commands]' \ - '(-a --all -g --guides -i --info -w --web)'{-m,--man}'[show all available commands]' \ - '(-a --all -g --guides -i --info -m --man )'{-w,--web}'[show all available commands]' \ + '(-a --all -g --guides -m --man -w --web)'{-i,--info}'[display manual for the command in info format]' \ + '(-a --all -g --guides -i --info -w --web)'{-m,--man}'[display manual for the command in man format]' \ + '(-a --all -g --guides -i --info -m --man )'{-w,--web}'[display manual for the command in HTML format]' \ '(-g --guides)'{-g,--guides}'[prints a list of useful guides on the standard output]' \ + '(-v --verbose)'{-v,--verbose}'[print command descriptions]' \ ': : _alternative commands:command:_git_commands "guides:git guides:(attributes glossary ignore modules revisions tutorial workflows)"' } @@ -4703,6 +4719,7 @@ _git-pack-objects () { $thin_opt \ '--shallow[create packs suitable for shallow fetches]' \ '--honor-pack-keep[ignore objects in local pack with .keep file]' \ + '--keep-pack=[ignore named pack]:pack' \ '--compression=-[specify compression level]: :__git_compression_levels' \ '--keep-true-parents[pack parents hidden by grafts]' \ '--use-bitmap-index[use a bitmap index if available to speed up counting objects]' \ @@ -5037,7 +5054,9 @@ _git-ls-remote () { "--refs[don't show peeled tags]" \ '--exit-code[exit with status 2 when no matching refs are found in the remote repository]' \ '--get-url[expand the URL of the given repository taking into account any "url..insteadOf" config setting]' \ + '*--sort=[specify field name to sort on]:field:__git_ref_sort_keys' \ '--symref[show underlying ref in addition to the object pointed by it]' \ + \*{-o+,--server-option=}'[send specified string to the server when using protocol version 2]:option' \ ': :__git_any_repositories' \ '*: :__git_references' } @@ -6407,7 +6426,7 @@ __git_heads () { (( $+functions[__git_heads_local] )) || __git_heads_local () { - local gitdir + local f gitdir declare -a heads heads=(${(f)"$(_call_program headrefs git for-each-ref --format='"%(refname:short)"' refs/heads 2>/dev/null)"}) @@ -7742,8 +7761,8 @@ _git() { '(: -)--man-path[print the manpath for the man pages for this version of Git and exit]' \ '(: -)--info-path[print the path where the info files are installed and exit]' \ '(: -)--html-path[display path to HTML documentation and exit]' \ - '(-p --paginate)'{-p,--paginate}'[pipe output into $PAGER]' \ - '--no-pager[do not pipe git output into a pager]' \ + '(-p --paginate -P --no-pager)'{-p,--paginate}'[pipe output into a pager]' \ + '(-p --paginate -P --no-pager)'{-P,--no-pager}"[don't pipe git output into a pager]" \ '--git-dir=-[path to repository]: :_directories' \ '--work-tree=-[path to working tree]: :_directories' \ '--namespace=-[set the Git namespace]: :_directories' \ diff --git a/Completion/Unix/Command/_lynx b/Completion/Unix/Command/_lynx index 6c4d57f6f..d25b03975 100644 --- a/Completion/Unix/Command/_lynx +++ b/Completion/Unix/Command/_lynx @@ -1,7 +1,5 @@ #compdef lynx -# Lynx Version 2.8.7rel.1 (05 Jul 2009) - local curcontext="$curcontext" state line ret=1 typeset -A opt_args @@ -26,7 +24,9 @@ _arguments -C \ '-cmd_log=[log keystroke commands to the given file]:keystroke log:_files' \ '-cmd_script=[read keystroke commands from the given file (see -cmd_log)]:keystroke log:_files' \ '-color[forces color mode on, if available]' \ - '-connect_timeout=[set the N-second connection timeout (18000)]:connection timeout (seconds):' \ + '-collapse_br_tags[toggle collapsing of BR tags (on)]' \ + '-connect_timeout=[set the N-second connection timeout]:connection timeout (seconds) [18000]' \ + '-convert_to=[convert input]:format:_mime_types' \ '-cookie_file=[specifies a file to use to read cookies]:cookie file:_files' \ '-cookie_save_file=[specifies a file to use to store cookies]:cookie file:_files' \ '-cookies[toggles handling of Set-Cookie headers (on)]' \ @@ -34,7 +34,8 @@ _arguments -C \ '-crawl[with -traversal, output each page to a file with -dump, format output as with -traversal, but to stdout]' \ '-curses_pads[uses curses pad feature to support left/right shifting (on)]' \ '-debug_partial[incremental display stages with MessageSecs delay (off)]' \ - '-delay=[set NNN-second delay at statusline message (0.000)]:delay (seconds):' \ + '-default_colors[use terminal default foreground/background colors (on)]' \ + '-delay=[set NNN-second delay at statusline message]:delay (seconds) [0.000]' \ "-display=[set the display variable for X exec'ed programs]:display:_x_display" \ '-display_charset=[charset for the terminal output]:character set:' \ "-dont_wrap_pre[inhibit wrapping of text in
 when -dump'ing and -crawl'ing, mark wrapped lines in interactive session (off)]" \
@@ -47,7 +48,7 @@ _arguments -C \
   '-fileversions[include all versions of files in local VMS directory listings]' \
   '-force_empty_hrefless_a[force HREF-less 'A' elements to be empty (close them as soon as they are seen) (off)]' \
   '-force_html[forces the first document to be interpreted as HTML (off)]' \
-  '-force_secure[toggles forms-based vs old-style options menu (on)]' \
+  '-force_secure[toggle forcing of the secure flag for SSL cookies (off)]' \
   '-forms_options[toggles forms-based vs old-style options menu (on)]' \
   '-from[toggle transmission of From headers (on)]' \
   '-ftp[disable ftp access (off)]' \
@@ -57,11 +58,13 @@ _arguments -C \
   '-hiddenlinks=[hidden links: options are merge, listonly, or ignore]:option:(merge listonly ignore)' \
   "-historical[toggles use of '>' or '-->' as terminator for comments (off)]" \
   '-homepage=[set homepage separate from start page]:URL:->html' \
+  '-html5_charsets[toggle use of HTML5 charset replacements]' \
   '-image_links[toggles inclusion of links for all images (off)]' \
   '-index=[set the default index file to URL]:URL:->html' \
   '-ismap[toggles inclusion of ISMAP links when client-side MAPs are present (off)]' \
   '-justify[do justification of text (off)]' \
   '-link=[starting count for lnk#.dat files produced by -crawl (0)]:starting count:' \
+  '-list_inline[with -dump, show links inline with text]' \
   '-listonly[with -dump, forces it to show only the list of links (off)]' \
   '-localhost[disable URLs that point to remote hosts (off)]' \
   '-locexec[enable local program execution from local files only (if lynx was compiled with local execution enabled)]' \
@@ -91,6 +94,7 @@ _arguments -C \
   '-nostatus[disable the miscellaneous information messages (off)]' \
   '-notitle[disable the title at the top of each page (off)]' \
   '-nounderline[disable underline video-attribute]' \
+  "-nozap=[disable checks for the 'z' key]:duration:(all initially full)" \
   '-number_fields[force numbering of links as well as form input fields (off)]' \
   '-number_links[force numbering of links (off)]' \
   '-partial[toggles display partial pages while downloading (on)]' \
@@ -105,7 +109,7 @@ _arguments -C \
   '-pseudo_inlines[toggles pseudo-ALTs for inlines with no ALT string (on)]' \
   '-raw[toggles default setting of 8-bit character translations or CJK mode for the startup character set (off)]' \
   '-realm[restricts access to URLs in the starting realm (off)]' \
-  '-read_timeout=[set the N-second read-timeout (18000)]:timeout (seconds):' \
+  '-read_timeout=[set the N-second read-timeout]:timeout (seconds) [18000]' \
   '-reload[flushes the cache on a proxy server (only the first document affected) (off)]' \
   '-restrictions=[use -restrictions to see list]:options:->restrictions' \
   '-resubmit_posts[toggles forced resubmissions (no-cache) of forms with method POST when the documents they returned are sought with the PREV_DOC command or from the History List (off)]' \
@@ -113,6 +117,9 @@ _arguments -C \
   '-scrollbar[toggles showing scrollbar (off)]' \
   '-scrollbar_arrow[toggles showing arrows at ends of the scrollbar (on)]' \
   '-selective[require .www_browsable files to browse directories]' \
+  '-session=[resume from specified file on startup and save session to it on exit]:session file:_files' \
+  '-sessionin=[resume session from specified file on startup]:session file:_files' \
+  '-sessionout=[save session to specified file on exit]:session file:_files' \
   '-short_url[enables examination of beginning and end of long URL in status line (off)]' \
   "-show_cfg[show 'LYNX.CFG' setting (off)]" \
   '-show_cursor[toggles hiding of the cursor in the lower right corner (on)]' \
@@ -131,16 +138,18 @@ _arguments -C \
   '-trace[turns on Lynx trace mode (off)]' \
   '-trace_mask=[customize Lynx trace mode]:trace mask:(0 1 2 3 4 5 6 7)' \
   '-traversal[traverse all http links derived from startfile]' \
+  '-trim_blank_lines[toggle trimming of leading/trailing/collapsed-br blank lines (on)]' \
   '-trim_input_fields[trim input text/textarea fields in forms (off)]' \
   '-underline_links[toggles use of underline/bold attribute for links (off)]' \
   '-underscore[toggles use of _underline_ format in dumps (off)]' \
+  '-unique_urls[toggle use of unique-urls setting for -dump and -listonly options (off)]' \
   '-use_mouse[turn on mouse support (off)]' \
   '-useragent=[set alternate Lynx User-Agent header]:user-agent header:' \
   '-validate[accept only http URLs (meant for validation) implies more restrictions than -anonymous, but goto is allowed for http and https (off)]' \
   '-verbose[toggles [LINK\], [IMAGE\] and [INLINE\] comments with filenames of these images (on)]' \
   '(- *)-version[print Lynx version information]' \
   '-vikeys[enable vi-like key movement (off)]' \
-  '-width=[screen width for formatting of dumps (default is 80)]:number of columns:' \
+  '-width=[specify screen width for formatting of dumps]:number of columns [80]' \
   '-with_backspaces[emit backspaces in output if -dumping or -crawling]' \
   '-xhtml-parsing[enable XHTML 1.0 parsing (off)]' \
   ':URL:->html' && ret=0
@@ -148,12 +157,12 @@ _arguments -C \
 case "$state" in
 restrictions)
   _values -s ',' 'restriction' \
-    \? all bookmark bookmark_exec change_exec_perms chdir default \
-    dired_support disk_save dotfiles download editor exec exec_frozen \
+    \? all bookmark bookmark_exec change_exec_perms chdir compileopts_info \
+    default dired_support disk_save dotfiles download editor exec exec_frozen \
     externals file_url goto inside_ftp inside_news inside_rlogin \
-    inside_telnet jump lynx_cgi mail multibook news_post options_save \
-    outside_ftp outside_news outside_rlogin outside_telnet print shell \
-    suspend telnet_port useragent && return
+    inside_telnet jump lynxcfg_info lynxcfg_xinfo lynxcgi mail multibook \
+    news_post options_save outside_ftp outside_news outside_rlogin \
+    outside_telnet print shell suspend telnet_port useragent && return
   ;;
 html)
   _alternative 'files:file:_files -g "*.x#html#(-.)"' 'urls:URL:_urls' && return
diff --git a/Completion/Unix/Command/_mpc b/Completion/Unix/Command/_mpc
index 45d93550d..4f200c69e 100644
--- a/Completion/Unix/Command/_mpc
+++ b/Completion/Unix/Command/_mpc
@@ -37,6 +37,7 @@ _mpc_command() {
     disable:"disable an output"
     enable:"enable an output"
     toggleoutput:"toggle an output"
+    outputset:"set output attributes"
     idle:"wait until an event occurs"
     idleloop:"loop waiting for events"
     insert:"insert a song after the currently playing song in the playlist"
@@ -73,6 +74,7 @@ _mpc_command() {
     stop:"stop the currently playing playlists"
     toggle:"toggles Play/Pause, plays if stopped"
     update:"scan music directory for updates"
+    rescan:"rescan music directory (including unchanged files)"
     version:"report version of MPD"
     volume:"set volume"
     status:"display MPD status"
@@ -222,6 +224,16 @@ _mpc_toggleoutput() {
   _mpc_helper_outputs
 }
 
+_mpc_outputset() {
+  if (( CURRENT == 2 )); then
+    _mpc_helper_outputs
+  else
+    _values -w -S = attribute \
+      'dop:setting:(1 0)' \
+      'allowed_formats:formats'
+  fi
+}
+
 _mpc_move() {
   if (( $#words <= 3 )); then
     _mpc_helper_songnumbers
@@ -318,6 +330,10 @@ _mpc_update() {
   _mpc_helper_files
 }
 
+_mpc_rescan() {
+  _mpc_helper_files
+}
+
 if [[ $service = *MPD_HOST* ]]; then
   _hosts
   return
@@ -339,7 +355,7 @@ if [[ $state = formats ]]; then
   compset -P '([^%]|%[^%]#%)#'
   _wanted metadata expl 'metadata delimiter' compadd -p % -S % \
     artist album albumartist comment composer date disc genre performer title \
-    track time file position mtime mdate && ret=0
+    track time file position id prio mtime mdate && ret=0
 fi
 
 return ret
diff --git a/Completion/Unix/Command/_readelf b/Completion/Unix/Command/_readelf
index 282431462..ce78baf27 100644
--- a/Completion/Unix/Command/_readelf
+++ b/Completion/Unix/Command/_readelf
@@ -7,6 +7,7 @@ _pick_variant -r variant elftoolchain=elftoolchain elfutils=elfutils binutils --
 
 args=(
   '(-a --all)'{-a,--all}'[show all tables]'
+  '(-g --section-groups)'{-g,--section-groups}'[show section groups]'
   '(-h --file-header)'{-h,--file-header}'[show file header]'
   '(-l --program-headers --segments)'{-l,--program-headers,--segments}'[show program headers]'
   '(-S --section-headers --sections)'{-S,--section-headers,--sections}'[show sections header]'
@@ -31,7 +32,6 @@ args=(
 case $variant in
   elftoolchain|binutils)
     args+=(
-      '(-g --section-groups)'{-g,--section-groups}'[show section groups]'
       '(-t --section-details)'{-t,--section-details}'[show section details]'
       '(-e --headers)'{-e,--headers}'[show file, program and sections headers]'
       '(-s --syms --symbols)'{-s,--syms,--symbols}'[show symbol table]'
@@ -49,6 +49,7 @@ case $variant in
   ;;
   elfutils)
     args+=(
+      '--dwarf-skeleton=[find skeleton compile units (with -w)]:file:_files'
       '--elf-section[used specified section as ELF input data]::section'
       '(-e --exception)'{-e,--exception}'[show sections for exception handling]'
       '(-N --numeric-addresses)'{-N,--numeric-addresses}"[don't find symbol names for addresses in DWARF data]"
diff --git a/Completion/Unix/Command/_sqlite b/Completion/Unix/Command/_sqlite
index 58f7a9116..4604fb40c 100644
--- a/Completion/Unix/Command/_sqlite
+++ b/Completion/Unix/Command/_sqlite
@@ -1,6 +1,6 @@
 #compdef sqlite sqlite3
 
-local ret opt display_opt sqlite3
+local opt display_opt sqlite3 ign
 local -a options output_modes exclusive dashes
 
 [[ $service = sqlite3 ]] && sqlite3=true || unset sqlite3
@@ -31,16 +31,18 @@ for display_opt in $output_modes ; do
   options+=( "($exclusive)"$^dashes"-${opt}[set output mode to $display_opt]" )
 done
 
+(( $#words == 2 )) || ign='!'
 options+=(
   $^dashes'-separator[set output field separator]:output field separator [|]'
   $^dashes'-nullvalue[set text string for null values]:string'
-  '(- :)'$^dashes'-version[show SQLite version]'
-  '(- :)'$^dashes'-help[show help]'
+  "$ign(- :)"$^dashes'-version[show SQLite version]'
+  "$ign(- :)"$^dashes'-help[show help]'
   '1:SQLite database file:_files'
-  '(- :)2:SQL to run'
+  '(- :)2: :_guard "^-*" "SQL to run"'
 )
 
 (( $+sqlite3 )) && options+=(
+  $^dashes'-A+[run .archive with arguments and exit]'
   $^dashes'-append[append the database to the end of the file]'
   $^dashes'-bail[stop after hitting an error]'
   $^dashes'-cmd[run specified command before reading stdin]:sqlite meta-command'
@@ -53,6 +55,23 @@ options+=(
   $^dashes'-readonly[open the database read-only]'
   $^dashes'-stats[print memory stats before each finalize]'
   $^dashes'-vfs[use specified default VFS]:vfs:(unix-dotfile unix-excl unix-none unix-namedsem)'
+  $^dashes'-zip[open the file as a ZIP Archive]'
 )
 
+if [[ -n $words[(r)-A*] ]]; then
+  options=( -s -w : '(-A --A)'${^dashes}-A "(-f --file -a --append)"${(M)options:#1:*}
+    '(-v --verbose)'{-v,--verbose}'[print each filename as it is processed]'
+    '(1 -a --append -f --file)'{-f+,--file=}'[specify archive file]:archive file:_files'
+    '(1 -a --append -f --file)'{-a,--append=}'[operate on specified file opened using the apndvfs VFS]:archive file:_files'
+    '(-C --directory)'{-C+,--directory=}'[change to specified directory to read/extract files]:directory:_directories'
+    '(-n --dryrun)'{-n,--dryrun}'[show the SQL that would have occurred]'
+    '*:file:_files'
+    + '(commands)' \
+    '(-c --create)'{-c,--create}'[create a new archive]'
+    '(-u --update)'{-u,--update}'[update or add files to an existing archive]'
+    '(-t --list)'{-t,--list}'[list contents of archive]'
+    '(-x --extract)'{-x,--extract}'[extract files from archive]'
+  )
+fi
+
 _arguments $options
diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion
index b7e10c06b..e16be7e59 100644
--- a/Completion/Unix/Command/_subversion
+++ b/Completion/Unix/Command/_subversion
@@ -26,7 +26,7 @@ _svn () {
 
   _arguments -C -A "-*" \
     '(-)--help[print help information]' \
-    '(- *)--version[print client version information]' \
+    '(*)--version[print client version information]' \
     '1: :->cmds' \
     '*:: :->args' && ret=0
 
@@ -169,6 +169,9 @@ _svn () {
               '*:file:_files -g "(.svn|*)(/e:_svn_deletedfiles:,e:_svn_status:)"'
             )
           ;;
+	  (unshelve)
+	    args+=( '1:shelf name:compadd - ${${(f)"$(_call_program shelves svn unshelve -q --list)"}%%      *}' )
+	  ;;
           (*)
             case $usage in
               *(SRC|DST|TARGET|URL*PATH)*)
diff --git a/Completion/Unix/Command/_tmux b/Completion/Unix/Command/_tmux
index 730959e84..ae3446a08 100644
--- a/Completion/Unix/Command/_tmux
+++ b/Completion/Unix/Command/_tmux
@@ -235,6 +235,7 @@ _tmux-choose-client() {
 _tmux-choose-tree() {
   [[ -n ${tmux_describe} ]] && print "put a window into tree choice mode" && return
   _arguments -s \
+    '-G[include all sessions in any session groups in the tree rather than only the first]' \
     '-N[start without the preview]' \
     '-F+[specify format for each list item]:format:__tmux-formats' \
     '-f+[filter items]:filter format:__tmux-formats' \
@@ -562,6 +563,8 @@ _tmux-paste-buffer() {
 _tmux-pipe-pane() {
   [[ -n ${tmux_describe} ]] && print "pipe output from a pane to a shell command" && return
   _arguments -s -A "-*" -S \
+    '-I[write stdout from command to the pane as if it were typed]' \
+    '-O[pipe output from the pane to the command (default unless -I used)]' \
     '-o[only open a pipe if none is currently opened]' \
     '-t+[specify target pane]:pane:__tmux-panes' \
     ':shell command:_cmdstring'
@@ -658,12 +661,13 @@ _tmux-save-buffer() {
 }
 
 _tmux-select-layout() {
-  [[ -n ${tmux_describe} ]] && print "choose a layout for a window" && return
+  [[ -n ${tmux_describe} ]] && print "choose a layout for a pane" && return
   _arguments -s -A "-*" -S \
+    '-E[spread the current pane and any panes next to it out evenly]' \
     '-n[behave like next-layout]' \
     '-o[revert to previous layout]' \
     '-p[behave like previous-layout]' \
-    '-t+[specify a target window]:target window:__tmux-windows' \
+    '-t+[specify a target pane]:target pane:__tmux-panes' \
     ':layout:(even-horizontal even-vertical main-horizontal main-vertical tiled)'
 }
 
diff --git a/Completion/Unix/Command/_user_admin b/Completion/Unix/Command/_user_admin
index 7eeec7e9b..fe28c13f5 100644
--- a/Completion/Unix/Command/_user_admin
+++ b/Completion/Unix/Command/_user_admin
@@ -150,6 +150,7 @@ case ${service%???}:${(M)service%???}:$OSTYPE in
   *:*:linux*)
     args+=(
       '(-R --root)'{-R,--root=}'[specify directory to chroot into]:directory:_directories'
+      '(-P --prefix)'{-P,--prefix=}"[specify root directory to apply changes in but don't chroot]:directory:_directories"
       '(-D -U -L -p --password)'{-p+,--password=}'[specify encrypted password]:encrypted password'
       '(-)'{-h,--help}'[display help information]'
     )
diff --git a/Completion/Unix/Command/_wget b/Completion/Unix/Command/_wget
index 1a7e2d0a3..2a4e722d8 100644
--- a/Completion/Unix/Command/_wget
+++ b/Completion/Unix/Command/_wget
@@ -22,6 +22,7 @@ _arguments -C -s \
   '(--config)--no-config' '--rejected-log=:file:_files' \
   '(--tries -t)'{--tries=,-t+}'[set number of retries]:number of retries' \
   '--retry-connrefused[retry even if connection is refused]' \
+  '--retry-on-http-error=[specify list of HTTP errors to retry]:http error' \
   '(--output-document -O)'{--output-document=,-O+}'[specify file to write documents to]:output file:_files' \
   '(--continue -c)'{--continue,-c}'[continue getting an existing file]'  \
   '--start-pos=:offset' '--show-progress' \
@@ -38,8 +39,7 @@ _arguments -C -s \
   '(--wait -w)'{--wait=,-w+}'[specify wait between retrievals]:time (seconds)' \
   '(--random-wait)--waitretry=:time (seconds)' \
   '(--waitretry)--random-wait[random wait time between retrievals]' \
-  '(--proxy -Y --no-proxy)'{--proxy=,-Y+}'[explicitly turn on proxy]' \
-  '(--proxy -Y --no-proxy)--no-proxy[explicitly turn off proxy]' \
+  '--no-proxy[explicitly turn off proxy]' \
   '(--quota -Q)'{--quota=,-Q+}'[set retrieval quota]:number' \
   '--bind-address=[specify address to bind to (hostname or IP)]:bind address:_bind_addresses' \
   '--limit-rate=[specify limit to download rate]:download rate limit' \
@@ -48,7 +48,7 @@ _arguments -C -s \
   '--ignore-case[ignore case when matching files/directories]' \
   '(-4 --inet4-only -6 --inet6-only)'{-4,--inet4-only}'[connect only to IPv4 addresses]' \
   '(-4 --inet4-only -6 --inet6-only)'{-6,--inet6-only}'[connect only to IPv6 addresses]' \
-  '--prefer-family[connect first to addresses of specified family]:address family:(IPv6 IPv4 none)' \
+  '--prefer-family=[connect first to addresses of specified family]:address family:(IPv6 IPv4 none)' \
   '(--http-user --ftp-user)--user[set both ftp and http user]:user' \
   '(--http-password --ftp-password)--password[set both ftp and http password]:password' \
   '(--password --http-password --ftp-password)--ask-password:[prompt for passwords]' \
@@ -67,7 +67,7 @@ _arguments -C -s \
   '(--user)--http-user=:user' \
   '(--password --ask-password)--http-password=:password' \
   '--no-cache[disallow server-cached data]' \
-  '--default-page=[specify default page name, normally index.html]' \
+  '--default-page=[specify default page name, normally index.html]:default page [index.html]' \
   '(--adjust-extension -E)'{--adjust-extension,-E}'[save all HTML/CSS documents with proper extensions]' \
   "--ignore-length[ignore \`Content-Length' header field]" \
   '*--header=[send a custom HTTP header]:header:->header' \
@@ -93,7 +93,7 @@ _arguments -C -s \
   "--auth-no-challenge[send basic HTTP authentication without first waiting for server's challenge]" \
   '--secure-protocol=[choose secure protocol]:protocol:(SSLv2 SSLv3 TLSv1 TLSv1_1 TLSv1_2 PFS)' \
   --https-only \
-  "--no-check-certificate=[don't check the server certificate]" \
+  "--no-check-certificate[don't check the server certificate]" \
   '--certificate=[specify client certificate]:client certificate file:_files' \
   '--certificate-type=[specify client certificate type]:certificate type:(PEM DER)' \
   '--private-key=[specify private key file]:key file:_files' \
@@ -104,6 +104,7 @@ _arguments -C -s \
   '--pinnedpubkey=:file:_files' \
   '--random-file[specify file with random data for seeding generator]:file:_files' \
   '--egd-file=[specify filename of EGD socket]:file:_files' \
+  '--ciphers=[set the priority string (GnuTLS) or cipher list string (OpenSSL) directly]:string' \
   '--no-hsts[disable HSTS]' \
   '--hsts-file[specify path of HSTS database]:file:_files' \
   '(--user)--ftp-user=:user' \
diff --git a/Completion/Unix/Command/_xxd b/Completion/Unix/Command/_xxd
index 1b1613a64..0034be519 100644
--- a/Completion/Unix/Command/_xxd
+++ b/Completion/Unix/Command/_xxd
@@ -26,7 +26,7 @@ arguments=(
   '(         -E -EBCDIC -i -include -p -postscript -plain -ps -r -revert              )'{-E,-EBCDIC}'[print human-readable part in EBCDIC rather than ASCII]'
   '(-i -include -p -postscript -plain -ps -r -revert)'{-e,-endian}'[little-endian dump]'
   '(-b -bits -E -EBCDIC -i -include -p -postscript -plain -ps -r -revert              )'{-i,-include}'[output in C include file style]'
-  '(-b -bits -E -EBCDIC -i -include -p -postscript -plain -ps                         )'{-p,-postscript,-plain,-ps}'[read or write a plain hexdump (no line numbers or ASCII rendering)]'
+  '(-b -bits -E -EBCDIC -i -include -p -postscript -plain -ps -C -capitalize          )'{-p,-postscript,-plain,-ps}'[read or write a plain hexdump (no line numbers or ASCII rendering)]'
 
   '(-b -bits -E -EBCDIC -i -include                           -r -revert -u -uppercase)'{-r,-revert}'[reverse mode\: read a hex dump and output binary data]'
   '(-b -bits                                                  -r -revert -u -uppercase)'{-u,-uppercase}'[output upper-case hex digits]'
@@ -34,7 +34,7 @@ arguments=(
   '(- :)'{-h,-help}'[display usage message]'
   '(- :)'{-v,-version}'[show program version]'
   '*'{-a,-autoskip}"[a single '*' replaces runs of NUL (toggleable)]"
-
+  '(-C -capitalize)'{-C,-capitalize}'[capitalize variable names in C include file style]'
   {-c+,-cols}'[specify number of octets per line]: :_guard "[0-9a-fA-Fx]#" "number of octets per line"'
   {-g+,-groupsize}'[specify the number of octets per group]: :_guard "[0-9]#" "number of octets per group"'
   {-l+,-len}'[specify number of octets to output]: :_guard "[0-9]#" "number of octets to output"'
diff --git a/Completion/X/Command/_qiv b/Completion/X/Command/_qiv
index d10407584..35ceec09a 100644
--- a/Completion/X/Command/_qiv
+++ b/Completion/X/Command/_qiv
@@ -5,7 +5,9 @@ _arguments -s \
   '(- *)'{-v,--version}'[display version information]' \
   '--display:display:_x_display' \
   \*{-F,--file}'[read file names from file]:file:_files' \
+  '(-B --browse)'{-B,--browse}'[scan directory of file for browsing]' \
   '(-e --center)'{-e,--center}'[disable window centering]' \
+  '(-C --cycle)'{-C,--cycle}"[don't cycle after last image]" \
   '(-w --fixed_width -W --fixed_zoom)'{-w,--fixed_width}'[use window with specified width]:width' \
   '(-w --fixed_width -W --fixed_zoom)'{-W,--fixed_zoom}'[use window with specified zoom factor]:zoom (percentage)' \
   '(-x -y -z --root --root_t --root_s -f --file *)'{-x,--root}'[use image as the current desktop background, centered]:image file:_files' \
@@ -13,6 +15,7 @@ _arguments -s \
   '(-x -y -z --root --root_t --root_s -f --file *)'{-z,--root_s}'[use image as the current desktop background, stretched]:image file:_files' \
   '(-m --maxpect)'{-m,--maxpect}'[expand image to fit screen size]' \
   '(-t --scale_down)'{-t,--scale_down}'[shrink images to fit screen size]' \
+  "--trashbin[move files to user's trash bin instead of .qiv-trash when deleting]" \
   '(-b --brightness)'{-b,--brightness}'[set brightness]:brightness (-32..32)' \
   '(-c --contrast)'{-c,--contrast}'[set contrast]:contrast (-32..32)' \
   '(-g --gamma)'{-g,--gamma}'[set gamma]:gamma (-32..32)' \
@@ -21,7 +24,7 @@ _arguments -s \
   '(-i --no_statusbar -I --statusbar)'{-I,--statusbar}'[enable statusbar]' \
   '(-p --transparency)'{-p,--transparency}'[enable transparency]' \
   '(-a --do_grab)'{-a,--do_grab}'[grab the pointer in windowed mode]' \
-  '(-G --disable_grab)'{-G,--disable_grab}'[disable pointer grabbing]' \
+  '(-G --disable_grab)'{-G,--disable_grab}'[disable pointer grabbing in fullscreen mode]' \
   '(-o --bg_color)'{-o,--bg_color}'[set root background color]:color:_x_color' \
   '(-s --slide)'{-s,--slide}'[start slideshow immediately]' \
   '(-r --random)'{-r,--random}'[shuffle images for slideshow]' \
@@ -31,6 +34,17 @@ _arguments -s \
   '(-f --fullscreen)'{-f,--fullscreen}'[use fullscreen window on startup]' \
   '(-P --ignore_path_sort)'{-P,--ignore_path_sort}'[sort images by just the filename]' \
   '(-M --merged_case_sort)'{-M,--merged_case_sort}'[sort images case-insensitively]' \
-  '(-N --numeric_sort)'{-N,--numeric_sort}'[numeric image sort]' \
+  '(-K --mtime_sort)'{-K,--mtime_sort}'[sort images by their modification time]' \
+  '(-N --numeric_sort -K --mtime_sort)'{-N,--numeric_sort}'[numeric image sort]' \
+  '(-D --no_sort -N --numeric_sort -K --mtime_sort -M --merged_case_sort -P --ignore_path_sort)'{-D,--no_sort}"[don't apply any sorting to the images]" \
   '(-T --watch)'{-T,--watch}'[reload the image if it changes]' \
-  '*:image file:_files -g "*.(#i)(bmp|eim|gif|jp([eg]|eg)|pcx|png|p[pngb]m|tif(|f)|tga|x[pb]m)(-.)"'
+  '(-u --recursivedir)'{-u,--recursivedir}'[recursively include all files]' \
+  '(-L --followlinks)'{-L,--followlinks}'[follow symlinks to directories]' \
+  '(-A --select_dir)'{-A,--select_dir}'[store selected files in specified directory]:directory [.qiv-select]:_directories' \
+  '(-l --autorotate)'{-l,--autorotate}"[don't autorotate JPEGs according to EXIF rotation tag]" \
+  '(-q --rotate)'{-q,--rotate}'[rotate image]:angle:((1\:90 2\:180 3\:270))' \
+  '(-X --xineramascreen)'{-X,--xineramascreen}'[specify preferred screen]:screen' \
+  '(-Y --source_profile)'{-Y,--source_profile}'[specify colour profile file as source profile]:colour profile file:_files' \
+  '(-Z --display_profile)'{-Z,--display_profile}'[specify colour profile file as display profile]:colour profile file:_files' \
+  '--vikeys[enable movement with h/j/k/l]' \
+  '*:image file:_files -g "*.(#i)(bmp|eim|gif|ico|jp([eg]|eg)|pcx|png|p[pngb]m|pjpeg|svg|tif(|f)|wmf|x[pb]m)(-.)"'
diff --git a/Completion/Zsh/Command/_which b/Completion/Zsh/Command/_which
index c43704ae8..9b789c86b 100644
--- a/Completion/Zsh/Command/_which
+++ b/Completion/Zsh/Command/_which
@@ -1,6 +1,6 @@
 #compdef which whence where type
 
-local farg aarg cargs args state line curcontext="$curcontext" ret=1
+local farg aarg xarg cargs args state line curcontext="$curcontext" ret=1
 
 cargs=( \
   '(-v -c)-w[print command type]' \
@@ -11,6 +11,7 @@ cargs=( \
   '*:commands:->command' )
 farg='-f[output contents of functions]'
 aarg='-a[print all occurrences in path]'
+xarg='-x+[specify spaces to use for indentation in function expansion]:spaces'
 
 case ${service} in
   whence)
@@ -19,8 +20,8 @@ case ${service} in
       '(-v -w)-c[csh-like output]' \
       "${cargs[@]}" "$farg" "$aarg" && ret=0
   ;;
-  where) _arguments -C -s -A "-*" -S "${cargs[@]}" && ret=0;;
-  which) _arguments -C -s -A "-*" -S "${cargs[@]}" "$aarg" && ret=0;;
+  where) _arguments -C -s -A "-*" -S "${cargs[@]}" "$xarg" && ret=0;;
+  which) _arguments -C -s -A "-*" -S "${cargs[@]}" "$aarg" "$xarg" && ret=0;;
   type) _arguments -C -s -A "-*" -S "${cargs[@]}" "$aarg" "$farg" && ret=0;;
 esac
 
diff --git a/Completion/Zsh/Command/_zed b/Completion/Zsh/Command/_zed
index 211dae7df..6b68fadf0 100644
--- a/Completion/Zsh/Command/_zed
+++ b/Completion/Zsh/Command/_zed
@@ -5,5 +5,6 @@ case $service in
 (zed) _arguments -S : \
 	'(- 2):file:_files' \
 	'(1):shell function:_functions' \
+	'(1)-x+[specify spaces to use for indentation in function expansion]:spaces' \
 	'(1)-f[edit function]';;
 esac
-- 
cgit v1.2.3


From 951b94527924a5fa0c88c5facaa4c86682efbc8d Mon Sep 17 00:00:00 2001
From: dana 
Date: Sun, 24 Jun 2018 20:19:38 -0500
Subject: unposted: Fix mistyped variable name in _opkg

---
 ChangeLog                      | 5 +++++
 Completion/Linux/Command/_opkg | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

(limited to 'Completion/Linux')

diff --git a/ChangeLog b/ChangeLog
index f808dc663..7e8fcfe75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-24  dana  
+
+	* unposted: Completion/Linux/Command/_opkg: Fix mistyped variable
+	name
+
 2018-06-23  dana  
 
 	* 43081: Completion/Darwin/Command/_networksetup: Add networksetup
diff --git a/Completion/Linux/Command/_opkg b/Completion/Linux/Command/_opkg
index 5feadc11a..d64567681 100644
--- a/Completion/Linux/Command/_opkg
+++ b/Completion/Linux/Command/_opkg
@@ -279,7 +279,7 @@ _opkg() {
 
   if
     zstyle -t ":completion:*:*:$service:*" cache-persists &&
-    (( ! $+opkg_cache_pkg_all ))
+    (( ! $+_opkg_cache_pkg_all ))
   then
     typeset -gaU _opkg_cache_pkg_all
     typeset -gaU _opkg_cache_pkg_inst
-- 
cgit v1.2.3


From 8cb4fc00c29594aa6c497020b8ff5f7a4d4dd7ea Mon Sep 17 00:00:00 2001
From: David Klann 
Date: Sat, 7 Jul 2018 15:23:07 -0500
Subject: 42995: Only complete active connections for nmcli connection down

---
 ChangeLog                                | 3 +++
 Completion/Linux/Command/_networkmanager | 8 +++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

(limited to 'Completion/Linux')

diff --git a/ChangeLog b/ChangeLog
index 4652bc6fb..002f608be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
 	* 43046: Completion/Unix/Type/_pdf, Completion/X/Command/_mupdf:
 	Add mupdf completer.
 
+	* 42995: David Klann: Completion/Linux/Command/_networkmanager:
+	Only complete active connections for nmcli connection down.
+
 2018-07-03  dana  
 
 	* 43105 (tweaked): Completion/Unix/Command/_pgrep: Add full procps
diff --git a/Completion/Linux/Command/_networkmanager b/Completion/Linux/Command/_networkmanager
index 881445abb..e38215e76 100644
--- a/Completion/Linux/Command/_networkmanager
+++ b/Completion/Linux/Command/_networkmanager
@@ -102,7 +102,7 @@ _nm_connection_up() {
 }
 
 _nm_connection_down() {
-  _arguments "1:connection:_nm_connection_specs"
+  _arguments "1:connection:_nm_connection_active"
 }
 
 _nm_connection_modify() {
@@ -162,6 +162,12 @@ _nm_connection_ids() {
   _describe 'select connection' con_ids
 }
 
+_nm_connection_active() {
+  local -a con_ids
+  con_ids=(${(f)"$(_call_program nmcli nmcli -t -f name connection show --active)"})
+  _describe 'select connection' con_ids
+}
+
 _nm_device() {
   local curcontext="$curcontext" state line
 
-- 
cgit v1.2.3


From c5d9c9cbd3c69fb31e55ad373e99c244eeb1ec67 Mon Sep 17 00:00:00 2001
From: Simon Ruderich 
Date: Wed, 25 Jul 2018 12:08:59 -0500
Subject: 43200: Add completion for ip6tables*

---
 ChangeLog                          | 5 +++++
 Completion/Linux/Command/_iptables | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

(limited to 'Completion/Linux')

diff --git a/ChangeLog b/ChangeLog
index 4fc87616b..b796c9313 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-25  dana  
+
+	* Simon Ruderich: 43200: Completion/Linux/Command/_iptables: Add
+	completion for ip6tables*
+
 2018-07-20  dana  
 
 	* 43196: Completion/Unix/Command/_nginx: Add completion for nginx
diff --git a/Completion/Linux/Command/_iptables b/Completion/Linux/Command/_iptables
index 4178a1a2e..447d7c932 100644
--- a/Completion/Linux/Command/_iptables
+++ b/Completion/Linux/Command/_iptables
@@ -1,16 +1,16 @@
-#compdef iptables iptables-save iptables-restore
+#compdef iptables iptables-save iptables-restore ip6tables ip6tables-save ip6tables-restore
 
 local curcontext="$curcontext" state line expl i ret=1
 local -a cmds rcmds ropts rules states prev args
 
 case $service in
-  iptables-save)
+  iptables-save | ip6tables-save)
     _arguments -s \
       {-c,--counters}'[include values of packet and byte counters in output]' \
       {-t,--table}'[specify table]:table:(filter nat mangle)'
     return
   ;;
-  iptables-restore)
+  iptables-restore | ip6tables-restore)
     _arguments -s \
       {-c,--counters}'[restore the values of all packet and byte counters]' \
       {-n,--noflush}"[don't flush the previous contents of the table]"
-- 
cgit v1.2.3