Compare commits

...

96 Commits

Author SHA1 Message Date
Shohei YOSHIDA 7a7ed4ea32
Merge pull request #1262 from zsh-users/update_openssl
Update openssl completion to 4.0.0
2026-05-06 14:02:16 +09:00
Shohei YOSHIDA d215391952
Update openssl completion to 4.0.0 2026-05-03 15:28:01 +09:00
Mikael Magnusson d4d30592c2 _tmuxp: typo expl 2026-05-03 04:19:53 +02:00
Mikael Magnusson 7a2db2fe49 _yarn: return values and _wanted 2026-05-03 04:19:53 +02:00
Mikael Magnusson 21621f3458 _tsc: remove stray backslash 2026-05-03 04:19:53 +02:00
Mikael Magnusson 8dd06dfaaf _sbt: add missing ret=0 2026-05-03 04:19:53 +02:00
Mikael Magnusson 96420d8c73 _pm2: consistent capitalization 2026-05-03 04:19:53 +02:00
Mikael Magnusson 32cff31cca _nano: set ret=0 for all the state stuff 2026-05-03 04:19:53 +02:00
Mikael Magnusson 41d22dc6e4 _mcookie: more useful heading for -m 2026-05-03 04:19:53 +02:00
Mikael Magnusson 4be40305ba _kitchen: don't use bare compadd 2026-05-03 04:19:53 +02:00
Mikael Magnusson 9a94ecb9c9 _hledger: fix bogus -A option placement
It got offered as a completion instead
2026-05-03 04:19:53 +02:00
Mikael Magnusson f916eeb8a3 _fallocate: mutually exclusive options
-n is disallowed with -c, and implied with -d/-p, so there's no point passing it there
2026-05-03 04:19:53 +02:00
Mikael Magnusson ef53598cbd _bundle: remove nonsensical -A options 2026-05-03 04:19:53 +02:00
Mikael Magnusson c4d76587ae Remove the 'this' from 'show this help and exit' in completers 2026-05-03 04:19:41 +02:00
Mikael Magnusson 5879b07714 _chmem: update with new options 2026-05-03 04:18:54 +02:00
Mikael Magnusson d5bf7ae200 _chcpu: improve help text for cpu list 2026-05-03 04:18:54 +02:00
Mikael Magnusson cf98cc27ba _cask: update a bit
It's unclear to me what arguments link actually takes from the
documentation so no attempt there.
2026-05-03 04:18:54 +02:00
Mikael Magnusson 8d536db182 _bower: fix completing options
the (--foo)--foo is harmless but redundant and makes things hard to
read, we only need that syntax when we want to prevent an option being
completed together with *another* option, such as the instance with
(-t --token){-t,--token} where _arguments doesn't know those do the same
thing.
2026-05-03 04:18:21 +02:00
Shohei YOSHIDA d3578edb5f
Merge pull request #1261 from zsh-users/update-rubocop
Update rubocop completion to version 1.86.1
2026-04-28 09:15:55 +09:00
Shohei YOSHIDA d862f3b114
Update rubocop completion to version 1.86.1 2026-04-27 11:48:13 +09:00
Shohei YOSHIDA dbaeafd96c
Merge pull request #1260 from tborychowski/patch-1
fix yarn run completions
2026-04-23 19:52:05 +09:00
Dziad Borowy 8b1b94a0d5
fix yarn run completions
`yarn run<TAB>` doesn't show scripts that have `:` in them (e.g. `lint:js`, `test:e2e`), which is a popular pattern.
this change fixes that.
2026-04-23 10:38:29 +01:00
Shohei YOSHIDA 47e40c923c
Merge pull request #1259 from vapniks/patch-1
Update zsh-completions-howto.org
2026-04-20 10:55:23 +09:00
vapniks fbdd3b36b6
Update zsh-completions-howto.org
Fix explanation of _regex_arguments example
2026-04-18 22:59:48 +01:00
Shohei YOSHIDA ed67fbb8ee
Merge pull request #1258 from zsh-users/add-net-bench
Add network benchmark tools completions, ab and h2load
2026-04-12 10:13:10 +09:00
Shohei YOSHIDA 72d91588a3
Merge pull request #1257 from zsh-users/add-shells
Add other shell completions
2026-04-10 13:18:17 +09:00
Shohei YOSHIDA b546f87141
add h2load completion 2026-04-07 23:33:28 +09:00
Shohei YOSHIDA b988a84e1e
Add apache bench completion 2026-04-07 23:16:54 +09:00
Shohei YOSHIDA cc3181fcaa
add nu shell completion 2026-04-07 07:07:08 +09:00
Shohei YOSHIDA 5464333f29
add fish completion 2026-04-07 07:06:56 +09:00
Shohei YOSHIDA 8b97eaf521
Merge pull request #1255 from zsh-users/add_pwsh
Add PowerShell completion for macOS and Linux
2026-04-04 10:06:45 +09:00
Shohei YOSHIDA 959c0fa665
Merge pull request #1256 from zsh-users/add-v8-options
Add valid v8 options
2026-04-02 15:39:11 +09:00
Shohei YOSHIDA 3bf359f3cb
Merge pull request #1253 from zsh-users/elixir_completions
Add elixir(elixir, elixirc, iex) completions
2026-04-02 15:38:39 +09:00
Shohei YOSHIDA 673251514c
Add valid v8 options 2026-04-02 12:01:35 +09:00
Shohei YOSHIDA 7fa1a78810
Add PowerShell completion for macOS and Linux 2026-03-31 10:34:56 +09:00
Shohei YOSHIDA adad765241
Merge pull request #1254 from zsh-users/update_cmake
Update cmake completion to version 4.3.0
2026-03-31 09:59:52 +09:00
Shohei YOSHIDA 44be5b104f
Update cmake completion to version 4.3.0
add new flags
2026-03-31 09:54:02 +09:00
Shohei YOSHIDA dbad2d3a85
Add elixir completions 2026-03-29 16:44:33 +09:00
Shohei YOSHIDA f0b1a348a1
Merge pull request #1244 from zsh-users/perl-package-managers
Add perl package manager, cpm and cpam completions
2026-03-28 11:04:09 +09:00
Shohei YOSHIDA 60966d8044
Merge pull request #1252 from zsh-users/update_fab
Update fab completion to version 3.2.2
2026-03-28 10:51:37 +09:00
Shohei YOSHIDA c288ac1660
Update fab completion to version 3.2.2 2026-03-27 19:57:14 +09:00
Shohei YOSHIDA fd4a16961f
Merge pull request #1247 from zsh-users/refactor_mix
Refactor mix completion
2026-03-27 00:00:59 +09:00
Shohei YOSHIDA 012017166b
Merge pull request #1243 from zsh-users/ctest_cpack
Add ctest and cpack completions
2026-03-27 00:00:18 +09:00
Shohei YOSHIDA 109a9c809d
Merge pull request #1250 from zsh-users/refactor_mvn
Refactor mvn completion
2026-03-26 23:58:22 +09:00
Shohei YOSHIDA 64487c7f40
Merge pull request #1249 from zsh-users/refactor_golang
Use __golang prefix instead of __go prefix
2026-03-26 23:57:30 +09:00
Shohei YOSHIDA 47d0792461
Merge pull request #1251 from zsh-users/refactor_inxi
Use builtin generating sequential number instead of external commands
2026-03-26 23:55:18 +09:00
Shohei YOSHIDA 748efd8af7
Use builtin generating sequential number instead of external commands
`seq` is not installed on some BSD platforms by default.
2026-03-26 17:30:13 +09:00
Shohei YOSHIDA 519f6d6cee
Refactor mvn completion
- use local variables for cache variables
- use if for conditional executions
2026-03-26 15:14:58 +09:00
Shohei YOSHIDA 748d11083a
Use __golang prefix instead of __go prefix
Because __go_ is used in zsh old golang completions and they could
conflict with functions in _golang.
2026-03-26 14:04:23 +09:00
Shohei YOSHIDA a5d34d3aef
Improve portability 2026-03-26 13:52:05 +09:00
Shohei YOSHIDA b1ffb771c9
Merge pull request #1248 from zsh-users/cache-expiration-date
Fix cache expiration according to comment
2026-03-26 11:26:39 +09:00
Shohei YOSHIDA 77ec5ecd6b
Fix cache expiration according to comment
'mh+1' means 1 hour
2026-03-25 23:28:17 +09:00
Shohei YOSHIDA 118705c01a
implement minimum Phoenix tasks completions 2026-03-25 18:29:36 +09:00
Shohei YOSHIDA 6879291030
implement cache 2026-03-25 15:10:11 +09:00
Shohei YOSHIDA 41fb750ec0
Merge pull request #1246 from sadan4/patch-1
Fix link rot for NixOS package
2026-03-25 08:56:52 +09:00
sadan4 601aa61311
Fix link rot for NixOS package 2026-03-24 16:24:45 -04:00
Shohei YOSHIDA e118561a37
use dynamic completion but it seems we should use cache 2026-03-24 18:02:45 +09:00
Shohei YOSHIDA 2fdd13ab92
Refactor _mix completion 2026-03-24 17:45:58 +09:00
Shohei YOSHIDA 9c0e68a83b
Add cpanm completion 2026-03-23 11:38:56 +09:00
Shohei YOSHIDA fab6ac22ff
Add cpm completion 2026-03-23 11:38:41 +09:00
Shohei YOSHIDA 5993fc38e7
Add cpack completion 2026-03-22 18:22:26 +09:00
Shohei YOSHIDA e4006dea72
add ctest 2026-03-22 18:22:23 +09:00
Shohei YOSHIDA e461417f4e
Merge pull request #1241 from zsh-users/fix_cmake_help_completion
Fix cmake help item completion
2026-03-21 10:42:53 +09:00
Shohei YOSHIDA 97654f2813
Merge pull request #1240 from zsh-users/update-pre-commit
Refactor pre-commit
2026-03-21 10:42:04 +09:00
Shohei YOSHIDA 87378081ee
Remove needless variable declarations 2026-03-19 19:04:12 +09:00
Shohei YOSHIDA bb21390881
fix formatting issue 2026-03-19 19:02:43 +09:00
Shohei YOSHIDA be63667ca5
fix help item completion 2026-03-19 19:01:53 +09:00
Shohei YOSHIDA 986177c01f
Refactor pre-commit
- simplify the code
- reduce global variables
- add completing functions for remote names, branches, refs
2026-03-17 09:46:18 +09:00
Shohei YOSHIDA bce05f9352
Merge pull request #1236 from zsh-users/refactor_gist
Refactor gist and fix cache broken cache implementation
2026-03-16 15:10:54 +09:00
Shohei YOSHIDA 504b84f000
Merge pull request #1235 from zsh-users/refactor_cmake
Refactor cmake completion
2026-03-16 15:09:55 +09:00
Shohei YOSHIDA 84d9053354
Merge pull request #1234 from zsh-users/refactor_cf
Refactoring _cf completion
2026-03-16 14:54:01 +09:00
Shohei YOSHIDA 51025ba738
Merge pull request #1237 from zsh-users/refactor-cask
Refactor cask completion
2026-03-16 14:37:26 +09:00
Shohei YOSHIDA 83748eefc0
Merge pull request #1238 from zsh-users/refactor_git_flow
Refactor git flow
2026-03-16 14:13:23 +09:00
Shohei YOSHIDA 8ef1a35c32
Merge pull request #1239 from zsh-users/refactor_openvpn3
Refactor openvpn3
2026-03-16 14:12:18 +09:00
Shohei YOSHIDA f1cd0e8940
Merge pull request #1233 from zsh-users/refactor_tmuxp
refactoring _tmuxp
2026-03-16 14:11:56 +09:00
Shohei YOSHIDA 31236f26de
Use git_flow prefix instead of git for functions 2026-03-15 22:14:52 +09:00
Shohei YOSHIDA 8758ee4809
Use local variables 2026-03-15 22:11:41 +09:00
Shohei YOSHIDA 45f8084e70
Don't use global variables 2026-03-15 22:09:37 +09:00
Shohei YOSHIDA d1180f126a
Add global options 2026-03-15 15:14:40 +09:00
Shohei YOSHIDA 96316552ea
Merge two switch-case 2026-03-15 15:08:37 +09:00
Shohei YOSHIDA 0dce3a833b
Don't overwrite context variables 2026-03-15 15:08:30 +09:00
Shohei YOSHIDA da6814a485
Don't use global variables 2026-03-15 15:04:17 +09:00
Shohei YOSHIDA b9c943a9e8
Fix cache implementation 2026-03-15 13:24:57 +09:00
Shohei YOSHIDA 5c4fd5c1c5
Don't use global variables 2026-03-15 12:08:49 +09:00
Shohei YOSHIDA e534d39076
simplify assignments and remove needless functions 2026-03-14 21:04:01 +09:00
Shohei YOSHIDA 8e505348f3
Reduce top level local variables, use function local variables instead 2026-03-14 20:56:20 +09:00
Shohei YOSHIDA 309d615eb5
Simplify cmake targets
- Don't use for loop
- Use reduce filtering commands
2026-03-14 20:27:54 +09:00
Shohei YOSHIDA 9240b691d0
Do not use global variables 2026-03-14 20:06:03 +09:00
Shohei YOSHIDA 003afbe513
Refactoring _cf completion
- don't overwrite global variables
- add `__cf_` prefix to private functions
- improve command function dispatch
- use zsh way for array value check
2026-03-14 01:01:16 +09:00
Shohei YOSHIDA f1153d7a9d
add command name prefix to functions 2026-03-14 00:17:55 +09:00
Shohei YOSHIDA ce3bdfed22
Merge pull request #1232 from zsh-users/fix-format
Fix format issues
2026-03-13 16:30:56 +09:00
Shohei YOSHIDA fe94956940
Merge pull request #1231 from zsh-users/issue-1214
`--build` option should be an optional parameter
2026-03-13 16:01:19 +09:00
Shohei YOSHIDA b5da595150
Fix indentation size 2026-03-13 11:46:25 +09:00
Shohei YOSHIDA 7ea6b7a971
Add editor settings to all files 2026-03-13 11:38:48 +09:00
Shohei YOSHIDA 32210c83c5
Use spaces instead of tabs 2026-03-13 11:31:47 +09:00
Shohei YOSHIDA 867fb5a09c
`--build` option should be an optional parameter 2026-03-12 13:38:49 +09:00
81 changed files with 3823 additions and 2162 deletions

View File

@ -18,7 +18,7 @@ zsh-completions ![GitHub release](https://img.shields.io/github/release/zsh-user
| OpenSUSE / SLE | [zsh-completions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-completions&package=zsh-completions) |
| Arch Linux / Manjaro / Antergos / Hyperbola | [zsh-completions](https://www.archlinux.org/packages/zsh-completions), [zsh-completions-git](https://aur.archlinux.org/packages/zsh-completions-git) |
| Gentoo / Funtoo | [app-shells/zsh-completions](https://packages.gentoo.org/packages/app-shells/zsh-completions) |
| NixOS | [zsh-completions](https://github.com/NixOS/nixpkgs/blob/master/pkgs/shells/zsh/zsh-completions/default.nix) |
| NixOS | [zsh-completions](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/zs/zsh-completions/package.nix) |
| Void Linux | [zsh-completions](https://github.com/void-linux/void-packages/blob/master/srcpkgs/zsh-completions/template) |
| Slackware | [Slackbuilds](https://slackbuilds.org/repository/14.2/system/zsh-completions/) |
| macOS | [homebrew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/z/zsh-completions.rb), [MacPorts](https://github.com/macports/macports-ports/blob/master/sysutils/zsh-completions/Portfile) |

80
src/_ab Normal file
View File

@ -0,0 +1,80 @@
#compdef ab
# ------------------------------------------------------------------------------
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for ab 2.4 (https://httpd.apache.org/docs/2.4/programs/ab.html)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_arguments \
'-A[Supply BASIC Authentication credential to the server]:auth' \
'-b[Size of TCP send/receive buffer in bytes]:bytes' \
'-B[Address to bind to when making outgoing connections]:address' \
'-c[Number of multiple requests to perform at a time(Default 1)]:num' \
'*-C[Add a cookie]:cookie' \
'-d[Do not display "percentage served within XX ms table"]' \
'-e[Write a CSV file which contains the time it took to serve that percentage of the requests]:file:_files' \
'-E[Specify client certificate in PEM format to authenticate with the server]:file:_files' \
'-f[Specify SSL/TLS protocol]:protocol:(SSL2 SSL3 TLS1 TLS1.1 TLS1.2 ALL)' \
'-g[Write all measured values out as a "gnuplot" or TSV file]:file:_files' \
'(- *)-h[Display usage information]' \
'*-H[Append extra headers to the request]:header' \
'-i[Do HEAD requests instead of GET]' \
'-k[Enable the HTTP KeepAlive feature]' \
'-l[Do not report errors if the length of the responses is not constant]' \
'-m[Custom HTTP method for the requests]:method:(DELETE GET HEAD POST PUT)' \
'-n[Number of requests to perform for the benchmarking session]:requests' \
'-p[File containing data to POST, remember to also set -T]:file:_files' \
'-P[Supply BASIC Authentication credentials to a proxy en-route]:auth' \
'-q[Suppress messages when processing more than 150 requests]' \
'-r[Do not exit on socket receive errors]' \
'-s[Maximum number of seconds to wait before the socket times out(Default 30seconds)]:seconds' \
'-S[Do not display the median and standard deviation values]' \
'-t[Maximum number of seconds to spend for benchmarking]:time' \
'-T[Content-Type header to use for POST/PUT data]:content_type' \
'-u[File containing data to PUT, remember to also set -T]:file:_files' \
'-v[Set verbosity level]:level:(1 2 3 4)' \
'(- *)-V[Display version number and exit]' \
'-w[Print out results in HTML tables]' \
'*-x[String to use as attributes for "table" tag]:attribute' \
'-X[use a proxy server for the requests]:proxy' \
'*-y[String to use as attributes for "tr" tag]:attribute' \
'*-z[String to use as attributes for "td" tag]:attribute' \
'-Z[Specify SSL/TLS cipher suite(See openssl ciphers)]:cipher' \
'*:: :_urls'
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -69,3 +69,10 @@ esac
return $ret
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -91,7 +91,7 @@ case $service in
;;
(mp4dash)
options+=(
'(- *)'{-h,--help}'[Show this help message and exit]'
'(- *)'{-h,--help}'[Show help message and exit]'
'(-v --verbose)'{-v,--verbose}'[Be verbose]'
'(-d --debug)'{-d,--debug}'[Print out debugging information]'
'(-o --output-dir)'{-o,--output-dir=}'[Output directory]:dir:_files -/'
@ -148,7 +148,7 @@ case $service in
;;
(mp4dashclone)
options+=(
'(- *)'{-h,--help}'[Show this help message and exit]'
'(- *)'{-h,--help}'[Show help message and exit]'
'--quiet[Be quiet]'
'--encrypt=[Encrypt the media with KID and KEY specified in HEX(32 characters each)]:key'
'--exec-dir=[Directory where the Bento4 executables are located]:dir:_files -/'
@ -226,7 +226,7 @@ case $service in
;;
(mp4hls)
options+=(
'(- *)'{-h,--help}'[Show this help message and exit]'
'(- *)'{-h,--help}'[Show help message and exit]'
'(-v --verbose)'{-v,--verbose}'[Be verbose]'
'(-d --debug)'{-d,--debug}'[Print out debugging information]'
'(-o --output-dir)'{-o,--output-dir=}'[Output directory]:dir:_files -/'

View File

@ -43,7 +43,7 @@ _bitcoin-cli() {
local ret=1
_arguments -C \
-?'[This help message]' \
-?'[Show help message]' \
-addrinfo'[Get the number of addresses known to the node, per network and total]' \
-chain='[Use the chain <chain> (default: main). Allowed values: main, test, signet, regtest]:chain:(main test signet regtest)' \
-color='[Color setting for CLI output (default: auto)]:when:(always auto never)' \

View File

@ -43,6 +43,15 @@ local curcontext="$curcontext" state line _opts ret=1
_arguments -C \
'(- 1 *)'{-v,--version}'[display version information]' \
'--force[make various commands more forceful]' \
'--json[output consumable JSON]' \
'--log-level[what level of logs to report]:log level:(error conflict warn action info debug)' \
"--offline[don't hit the network]" \
'--quiet[only output important information]' \
"--silent[don't output anything, besides errors]" \
'--verbose[make output more verbose]' \
'--allow-root[allow running commands as root]' \
'--no-color[disable colors]' \
'1: :->cmds' \
'*:: :->args' && ret=0
@ -66,17 +75,6 @@ case $state in
"uninstall[remove a local package]" \
"unregister[remove a package from the registry]" \
"version[bump a package version]" && ret=0
_arguments \
'(--force)--force[make various commands more forceful]' \
'(--json)--json[output consumable JSON]' \
'(--log-level)--log-level[what level of logs to report]' \
"(--offline)--offline[don't hit the network]" \
'(--quiet)--quiet[only output important information]' \
"(--silent)--silent[don't output anything, besides errors]" \
'(--verbose)--verbose[make output more verbose]' \
'(--allow-root)--allow-root[allow running commands as root]' \
'(--version)--version[output Bower version]' \
'(--no-color)--no-color[disable colors]' && ret=0
;;
args)
case $line[1] in
@ -101,42 +99,42 @@ case $state in
;;
(home|info|init|link|lookup|prune|register|search|unregister)
_arguments \
'(--help)--help[show help message]' && ret=0
'--help[show help message]' && ret=0
;;
install)
_arguments \
'(--force-latest)--force-latest[force latest version on conflict]' \
'(--help)--help[show help message]' \
"(--production)--production[don't install project devDependencies]" \
"(--save)--save[save installed packages into the project's bower.json dependencies]" \
"(--save-dev)--save-dev[save installed packages into the project's bower.json devDependencies]" && ret=0
'--force-latest[force latest version on conflict]' \
'--help[show help message]' \
"--production[don't install project devDependencies]" \
"--save[save installed packages into the project's bower.json dependencies]" \
"--save-dev[save installed packages into the project's bower.json devDependencies]" && ret=0
;;
list)
_arguments \
'(--help)--help[show help message]' \
'(--paths)--paths[generate a simple JSON source mapping]' \
'(--relative)--relative[make paths relative to the directory config property, which defaults to bower_components]' && ret=0
'--help[show help message]' \
'--paths[generate a simple JSON source mapping]' \
'--relative[make paths relative to the directory config property, which defaults to bower_components]' && ret=0
;;
login)
_arguments \
'(--help)--help[show help message]' \
'--help[show help message]' \
'(-t --token)'{-t,--token}'[Pass GitHub auth token (will not prompt for username/password)]' && ret=0
;;
uninstall)
_arguments \
'(--help)--help[show help message]' \
"(--save)--save[save installed packages into the project's bower.json dependencies]" \
"(--save-dev)--save-dev[save installed packages into the project's bower.json devDependencies]" && ret=0
'--help[show help message]' \
"--save[save installed packages into the project's bower.json dependencies]" \
"--save-dev[save installed packages into the project's bower.json devDependencies]" && ret=0
;;
update)
_arguments \
'(--force-latest)--force-latest[force latest version on conflict]' \
'(--help)--help[show help message]' \
"(--production)--production[don't install project devDependencies]" && ret=0
'--force-latest[force latest version on conflict]' \
'--help[show help message]' \
"--production[don't install project devDependencies]" && ret=0
;;
version)
_arguments \
'(--message)--message[custom git commit and tag message]' && ret=0
'--message[custom git commit and tag message]' && ret=0
;;
exec)
_normal && ret=0

View File

@ -46,7 +46,7 @@ _bundle() {
local ret=1
_arguments -C -A "-v" -A "--version" \
_arguments -C \
'(- 1 *)'{-v,--version}'[display version information]' \
'(-r --retry)'{-r,--retry}'[specify the number of times you with to attempt network commands]:number:' \
'(-V --verbose)'{-V,--verbose}'[print out additional logging information]' \

View File

@ -41,16 +41,32 @@
# ------------------------------------------------------------------------------
function _cask() {
local ret=1 state
_arguments \
typeset -A opt_args
local context state line ret=1
local curcontext="$curcontext"
_arguments -C \
'(--proxy --http-proxy )--http-proxy[Set emacs proxy for HTTP]:host:_hosts' \
'(--proxy --https-proxy)--https-proxy[Set emacs proxy for HTTPS]:host:_hosts' \
'( --http-proxy --https-proxy)--proxy[Set emacs proxy for HTTPS and HTTPS]:host:_hosts' \
'--no-proxy[Set Emacs no-proxy to HOST (emacs pattern of hosts to not use proxy for)]:pattern:_hosts' \
'(- *)--version[Print Cask version and exit]' \
'(- *)'{-h,--help}'[Display usage or information for command]::command:->subcommand' \
'--debug[Turn on debug output]' \
'--path[Run command in this PATH instead of default-directory]:dir:_files -/' \
'(--verbose --silent)--verbose[Be verbose and show debug output]' \
'(--verbose --silent)--silent[Be silent and do not show anything]' \
':subcommand:->subcommand' \
'*:: :->subcmds' && ret=0
'*:: :->subcmds' \
&& ret=0
case $state in
subcommand)
subcommands=(
(subcommand)
local -a subcommands=(
"build:build all Elisp files in the files directive"
"clean-elc:remove all byte compiled Elisp files in the files directive"
"emacs:run emacs"
"eval:evaluate FORM as a lisp form"
"exec:execute command with correct 'exec-path' and 'load-path'"
"exec-path:print 'exec-path' for all packages and dependencies"
"files:print list of files specified in the files directive"
@ -71,19 +87,45 @@ function _cask() {
"upgrade:upgrade Cask itself and its dependencies"
"version:print program version"
)
_describe -t subcommands 'cask subcommands' subcommands && ret=0
esac
_describe -t subcommands 'cask subcommands' subcommands && ret=0
;;
(subcmds)
case "$words[1]" in
init)
(init)
_arguments \
'(--dev)--dev[Run in dev mode]' && ret=0 ;;
exec)
'(--dev)--dev[Run in dev mode]' \
&& ret=0
;;
(exec)
_generic
;;
(emacs)
_as_if emacs && ret=0
;;
(help)
_as_if cask --help && ret=0
;;
(link)
_message "completion unimplemented"
ret=0
;;
(package)
_wanted package-dir expl 'package directory' _files -/ && ret=0
;;
esac
;;
esac
return ret
}
_cask "$@"
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

719
src/_cf

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@ _chatblade() {
typeset -A opt_args
args+=(
'(- *)'{-h,--help}'[show this help message and exit]'
'(- *)'{-h,--help}'[show help message and exit]'
'(- *)--version[display the chatblade version]'
'--openai-api-key[the OpenAI API key can also be set as env variable OPENAI_API_KEY]:key'
'--openai-base-url[a custom URL to use the openAI against a local or custom model]:key'

View File

@ -35,12 +35,12 @@
# ------------------------------------------------------------------------------
_arguments \
'(- *)'{-h,--help}'[display this help]' \
'(- *)'{-h,--help}'[display help]' \
'(- *)'{-V,--version}'[display version]' \
'(-c --configure)'{-c,--configure}'[configure the specified CPUs]:cpu_list' \
'(-d --disable)'{-d,--disable}'[disable the specified CPUs]:cpu_list' \
'(-e --enable)'{-e,--enable}'[enable the specified CPUs]:cpu_list' \
'(-g --deconfigure)'{-g,--deconfigure}'[deconfigure the specified CPUs]:cpu_list' \
'(-c --configure)'{-c,--configure}'[configure the specified CPUs]:cpu list (0,5,7,9-11)' \
'(-d --disable)'{-d,--disable}'[disable the specified CPUs]:cpu list (0,5,7,9-11)' \
'(-e --enable)'{-e,--enable}'[enable the specified CPUs]:cpu list (0,5,7,9-11)' \
'(-g --deconfigure)'{-g,--deconfigure}'[deconfigure the specified CPUs]:cpu_list (0,5,7,9-11)' \
'(-p --dispatch)'{-p,--dispatch}'[set the CPU dispatching mode]:mode:(horizontal vertical)' \
'(-r --rescan)'{-r,--rescan}'[trigger a rescan of CPUs]'

View File

@ -35,14 +35,29 @@
# *Aditi Sharma (https://github.com/Aditi76117)
# ------------------------------------------------------------------------------
local arg
if (( ${words[(I)(-b|--blocks)]} )); then
arg=blockrange
else
arg='size or range'
fi
if (( ${words[(I)(-e|-d|-c|-m|--disable|--enable|--deconfigure|--configure)]} )); then
arg="1:${arg}"
else
unset arg
fi
_arguments -s \
'(-b --blocks)'{-b,--blocks}'[Use a BLOCKRANGE parameter instead of RANGE or SIZE]' \
'(-d --disable)'{-d,--disable}'[Set the specified RANGE, SIZE, or BLOCKRANGE of memory offline]' \
'(-e --enable)'{-e,--enable}'[Set the specified RANGE, SIZE, or BLOCKRANGE of memory online]' \
'(-z --zone)'{-z,--zone}'[Select the memory ZONE where to set the specified RANGE, SIZE, or BLOCKRANGE of memory online or offline]' \
'(-e --enable -d --disable -c --configure -g --deconfigure -m --memmap-on-memory)'{-d,--disable}'[Set the specified RANGE, SIZE, or BLOCKRANGE of memory offline]' \
'(-e --enable -d --disable -c --configure -g --deconfigure -m --memmap-on-memory)'{-e,--enable}'[Set the specified RANGE, SIZE, or BLOCKRANGE of memory online]' \
'(-e --enable -d --disable -c --configure -g --deconfigure -m --memmap-on-memory)'{-g,--deconfigure}'[Deconfigure the specified RANGE, SIZE, or BLOCKRANGE of memory]' \
'(-e --enable -d --disable -c --configure -g --deconfigure )'{-c,--configure}'[Configure the specified RANGE, SIZE, or BLOCKRANGE of memory]' \
'(-e --enable -d --disable -g --deconfigure -m --memmap-on-memory)'{-m,--memmap-on-memory}'[Select memmap-on-memory for the specified memory]:memmap-on-memory' \
'(-z --zone)'{-z,--zone}'[Select the memory ZONE where to set the specified RANGE, SIZE, or BLOCKRANGE of memory online or offline]:zone' \
'(-v --verbose)'{-v,--verbose}'[Verbose mode]' \
'(- *)'{-h,--help}'[Display help text and exit]' \
'(- *)'{-V,--version}'[Print version and exit]'
'(- *)'{-V,--version}'[Print version and exit]' \
${arg}
# Local Variables:
# mode: Shell-Script

View File

@ -35,7 +35,7 @@
# ------------------------------------------------------------------------------
_arguments \
'(- *)'{-h,--help}'[display this help]' \
'(- *)'{-h,--help}'[display help]' \
'(-c --crypt-method)'{-c,--crypt-method}'[use the specified method to encrypt the passwords]:method:(DES MD5 SHA256 SHA512 YESCRYPT NONE)' \
'(-e --encrypted)'{-e,--encrypted}'[supplied passwords are in encrypted form]' \
'(-m --md5)'{-m,--md5}'[use MD5 encryption instead of DES]' \

View File

@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for CMake 3.31.0 (https://cmake.org).
# Completion script for CMake 4.3.0 (https://cmake.org).
#
# -------------------------------------------------------------------------
# Authors
@ -51,8 +51,6 @@
#
# -------------------------------------------------------------------------
local context state line curcontext="$curcontext" cmake_args
local -a cmake_build_options=(
'-S[Explicitly specify a source directory]:source directory:_path_files -/'
'-B[Explicitly specify a build directory]:build directory:_path_files -/'
@ -64,6 +62,7 @@ local -a cmake_build_options=(
'-A[Specify platform name if supported by generator]:platform name'
'--toolchain[Specify toolchain file]: :_files'
'--install-prefix[Specify install directory]: :_path_files -/'
'--project-file[Specify an alternate project file name]:name'
# Warnings
'(-Wdev)-Wno-dev[Suppress/Enable developer warnings]'
@ -79,12 +78,12 @@ local -a cmake_build_options=(
'--list-presets[List available presets]'
'--workflow[Run a workflow preset]'
'-E[CMake command mode]:command:_cmake_command_help'
'-E[CMake command mode]:command:_cmake_commands'
'-L-[List cache variables]::_values "options" "[non-advanced cache variables]" "A[advanced cache variables]" "H[non-advanced cached variables with help]" "AH[advanced cache variables with help]"'
'--fresh[Configure a fresh build tree, removing any existing cache file]'
'--build[Build a CMake-generated project binary tree]:project directory:_path_files -/'
'--build[Build a CMake-generated project binary tree]::project directory:_path_files -/'
'--install[Install a CMake-generated project binary tree]:project directory:_path_files -/'
'--open[Open generated project in the associated application]:project directory:_path_files -/'
@ -117,6 +116,7 @@ local -a cmake_build_options=(
'--warn-unused-vars[Warn about unused variables]'
'--check-system-vars[Find problems with variable usage in system files]'
'--compile-no-warning-as-error[Ignore COMPILE_WARNING_AS_ERROR property and CMAKE_COMPILE_WARNING_AS_ERROR variable]'
'--link-no-warning-as-error[Ignore LINK_WARNING_AS_ERROR and CMAKE_LINK_WARNING_AS_ERROR]'
'--profiling-format[Output data for profiling CMake scripts]:profiling format:(google-trace)'
'--profiling-output[Select an output path for the profiling data]:filename:_files'
@ -149,11 +149,11 @@ _cmake_generator_options() {
# --------------
(( $+functions[_cmake_presets] )) ||
_cmake_presets() {
local invoke; invoke=(${(Q)words})
local invoke=(${(Q)words})
invoke[$CURRENT]=()
# TODO: remove all arguments -* except -S
local list_presets; list_presets=(${(f)"$(${invoke} --list-presets 2>/dev/null |
local list_presets=(${(f)"$(${invoke} --list-presets 2>/dev/null |
sed -n -e 's,^[[:space:]]*"\([^"]*\)"[[:space:]]*-[[:space:]]*\(.*\),\1:\2,p' \
-e 's,^[[:space:]]*"\([^"]*\)"[[:space:]]*$,\1,p')"})
@ -165,24 +165,16 @@ _cmake_presets() {
# --------------
(( $+functions[_cmake_targets] )) ||
_cmake_targets() {
local -a targets
if [ -f $1/Makefile ]
then
local dir="$1"
local -a targets=()
if [[ -f "${dir}/Makefile" && $+commands[make] ]]; then
# `make help` doesn't work for Makefiles in general, but for CMake generated Makefiles it does.
i=1
for target in $(make -f $1/Makefile help | \grep -e "\.\.\." | sed "s/\.\.\. //" | sed "s/ (the default.*//") ; do
targets[$i]=$target
(( i = $i + 1 ))
done
elif [ -f $1/build.ninja ]
then
targets=(${(f)"$(make -f $dir/Makefile help 2>/dev/null | awk '/^\.\.\./ { print $2 }')"})
elif [[ -f "${dir}/build.ninja" && $+commands[ninja] ]]; then
# `ninja help` doesn't seem to be the list of targets we're interested in
i=1
for target in $(ninja -C $1 -t targets all 2&>/dev/null | awk -F: '{print $1}') ; do
targets[$i]="$target"
(( i++ ))
done
targets=(${(f)"$(ninja -C $dir -t targets all 2>/dev/null | awk -F: '{print $1}' )"})
fi
_describe 'build targets' targets
}
@ -195,60 +187,69 @@ _cmake_suggest_installdirs() {
}
_cmake_on_build() {
local build_extras;build_extras=(
local build_extras=(
'--[Native build tool options]'
'--target[specify build target]'
'--clean-first[build target clean first]'
'--config[For multi-configuration tools]'
'--parallel[maximum number of build processes]'
'--use-stderr')
'--use-stderr'
)
local -a undescribed_build_extras
i=1
local i=1
for be in $build_extras ; do
undescribed_build_extras[$i]=$(echo $be | sed "s/\[.*//")
(( i++ ))
done
inbuild=false
dashdashposition=-1
local in_build=false
local dash_dash_position=-1
local build_at=$CURRENT
for ((i = (($CURRENT - 1)); i > 1 ; i--)); do
if [[ $words[$i] == --build ]] ; then
inbuild=true
buildat=$i
if [[ $words[$i] == --build ]]; then
in_build=true
build_at=$i
(( difference = $CURRENT - $i ))
elif [[ $words[$i] == -- ]] ; then
dashdashposition=$i
elif [[ $words[$i] == -- ]]; then
dash_dash_position=$i
fi
done
# check if build mode has been left
outofbuild=false
for ((i = (($CURRENT - 1)); i > (($buildat + 1)); i--)); do
local out_of_build=false
for ((i = (($CURRENT - 1)); i > (($build_at + 1)); i--)); do
# don't check the word after --build (should be a directory)
if [[ ${undescribed_build_extras[(r)$words[$i]]} == $words[$i] ]] ; then continue ; fi
if [[ $words[(($i - 1))] == --target ]] ; then continue ; fi
if [[ $words[(($i - 1))] == --config ]] ; then continue ; fi
if [[ $words[(($i - 1))] == --parallel ]] ; then continue ; fi
outofbuild=true
done
if (( $dashdashposition > 0 )) ; then
_cmake_generator_options $words[(($buildat + 1))] $dashdashposition && return 0
if [[ ${undescribed_build_extras[(r)$words[$i]]} == $words[$i] ]]; then
continue
fi
if [[ "$inbuild" == false || "$difference" -eq 1 ]] ; then
if [[ $words[(($i - 1))] == --target ]]; then continue ; fi
if [[ $words[(($i - 1))] == --config ]]; then continue ; fi
if [[ $words[(($i - 1))] == --parallel ]] ; then continue ; fi
out_of_build=true
done
if (( $dash_dash_position > 0 )) ; then
_cmake_generator_options $words[(($build_at + 1))] $dash_dash_position && return 0
fi
if [[ "$in_build" == false || "$difference" -eq 1 ]] ; then
# either there is no --build or completing the directory after --build
_arguments -C -s \
_arguments -s \
- build_opts \
"$cmake_build_options[@]" \
- build_cmds \
"$cmake_suggest_build[@]" && return 0
elif [[ $words[(($CURRENT - 1))] == --target ]] ; then
# after --build <dir> --target, suggest targets
_cmake_targets $words[(($buildat + 1))] && return 0
_cmake_targets $words[(($build_at + 1))] && return 0
elif [[ $words[(($CURRENT - 1))] == --config ]] ; then
# after --build <dir> --config, no idea
return 0
elif [[ $words[(($CURRENT - 1))] == --parallel ]] ; then
# after --build <dir> --parallel
return 0
elif [ "$outofbuild" = true ] ; then
elif [ "$out_of_build" = true ] ; then
# after --build <dir> --<not a --build option>, suggest other cmake_build_options (like -Wno-dev)
_arguments "$cmake_build_options[@]" && return 0
else
@ -258,45 +259,51 @@ _cmake_on_build() {
}
_cmake_on_install() {
local build_extras;build_extras=(
local build_extras=(
'--[Native build tool options]'
'--prefix[Override the installation prefix, CMAKE_INSTALL_PREFIX]'
'--config[For multi-configuration generators(e.g. Visual Studio)]'
'--component[Component-based install]'
'--strip[Strip before installing.]'
)
local -a undescribed_build_extras
i=1
local i=1
for be in $build_extras ; do
undescribed_build_extras[$i]=$(echo $be | sed "s/\[.*//")
(( i++ ))
done
inbuild=false
dashdashposition=-1
local in_build=false
local dash_dash_position=-1
local build_at=$CURRENT
for ((i = (($CURRENT - 1)); i > 1 ; i--)); do
if [[ $words[$i] == --install ]] ; then
inbuild=true
buildat=$i
if [[ $words[$i] == --install ]]; then
in_build=true
build_at=$i
(( difference = $CURRENT - $i ))
elif [[ $words[$i] == -- ]] ; then
dashdashposition=$i
elif [[ $words[$i] == -- ]]; then
dash_dash_position=$i
fi
done
outofbuild=false
for ((i = (($CURRENT - 1)); i > (($buildat + 1)); i--)); do
local out_of_build=false
for ((i = (($CURRENT - 1)); i > (($build_at + 1)); i--)); do
# don't check the word after --install (should be a directory)
if [[ ${undescribed_build_extras[(r)$words[$i]]} == $words[$i] ]] ; then continue ; fi
if [[ $words[(($i - 1))] == --prefix ]] ; then continue ; fi
if [[ $words[(($i - 1))] == --config ]] ; then continue ; fi
if [[ $words[(($i - 1))] == --component ]] ; then continue ; fi
outofbuild=true
if [[ $words[(($i - 1))] == --prefix ]]; then continue ; fi
if [[ $words[(($i - 1))] == --config ]]; then continue ; fi
if [[ $words[(($i - 1))] == --component ]]; then continue ; fi
out_of_build=true
done
if (( $dashdashposition > 0 )) ; then
_cmake_generator_options $words[(($buildat + 1))] $dashdashposition && return 0
if (( $dash_dash_position > 0 )) ; then
_cmake_generator_options $words[(($build_at + 1))] $dash_dash_position && return 0
fi
if [[ "$inbuild" == false || "$difference" -eq 1 ]] ; then
if [[ "$in_build" == false || "$difference" -eq 1 ]] ; then
# either there is no --install or completing the directory after --install
_arguments -C -s \
_arguments -s \
- build_opts \
"$cmake_build_options[@]" \
- build_cmds \
@ -310,7 +317,7 @@ _cmake_on_install() {
elif [[ $words[(($CURRENT - 1))] == --component ]] ; then
# after --build <dir> --component, no idea
return 0
elif [ "$outofbuild" = true ] ; then
elif [ "$out_of_build" = true ] ; then
# after --build <dir> --<not a --build option>, suggest other cmake_build_options (like -Wno-dev)
_arguments "$cmake_build_options[@]" && return 0
else
@ -341,19 +348,16 @@ local -a cmake_help_actions=(
'(- 1)--help-variable-list[List variables with help available and exit]'
'(- 1)--help-variables[Print cmake-variables manual and exit]'
)
_cmake_help() {
_arguments -C -s - help "$cmake_help_actions[@]"
}
# -----------------
# _cmake_list_names
# -----------------
(( $+functions[_cmake_list_names] )) ||
_cmake_list_names() {
local command; command="$@[1]"
local desc; desc="$@[2]"
local opts; opts=($@[3])
local list_names; list_names=(${(f)"$($service $command 2> /dev/null)"})
local command="$@[1]"
local desc="$@[2]"
local opts=($@[3])
local list_names=(${(f)"$($service $command 2> /dev/null)"})
# Older CMake (< 3.0) writes out the version
list_names=(${^list_names##cmake version*})
@ -382,7 +386,7 @@ _cmake_define_property() {
# ----------------------------
(( $+functions[_cmake_define_property_names] )) ||
_cmake_define_property_names() {
local alternatives; alternatives=(
local alternatives=(
'common-property-names:common property name:_cmake_define_common_property_names -qS='
)
local -A cmake_langs
@ -402,8 +406,9 @@ _cmake_define_property_names() {
# ---------------------------------
(( $+functions[_cmake_define_lang_property_names] )) ||
_cmake_define_lang_property_names() {
local cmake_lang="$@[-2]" cmake_lang_desc="$@[-1]"
local properties; properties=(
local cmake_lang="$@[-2]"
local cmake_lang_desc="$@[-1]"
local -a properties=(
"CMAKE_${cmake_lang}_COMPILER:${cmake_lang_desc} compiler"
"CMAKE_${cmake_lang}_COMPILER_LAUNCHER:${cmake_lang_desc} compiler launcher (e.g. ccache)"
"CMAKE_${cmake_lang}_FLAGS:${cmake_lang_desc} compiler flags for all builds"
@ -424,7 +429,7 @@ _cmake_define_lang_property_names() {
# -----------------------------------
(( $+functions[_cmake_define_common_property_names] )) ||
_cmake_define_common_property_names() {
local properties; properties=(
local -a properties=(
'CMAKE_MODULE_PATH:Search path for CMake modules (FindPROJECT.cmake)'
'CMAKE_PREFIX_PATH:Search path for installations (PROJECTConfig.cmake)'
'CMAKE_BUILD_TYPE:Specifies the build type for make based generators'
@ -438,51 +443,87 @@ _cmake_define_common_property_names() {
'CMAKE_UNITY_BUILD:Batch include source files'
)
_describe -t 'common-property-names' 'common property name' properties $@
_describe -t 'common-property-names' 'common property name' properties "$@"
}
local _cmake_build_types=('Debug' 'Release' 'RelWithDebInfo' 'MinSizeRel')
local _cmake_c_standards=(90 99 11)
local _cmake_cxx_standards=(98 11 14 17 20)
# ----------------------------
# _cmake_define_property_values
# ----------------------------
(( $+functions[_cmake_define_property_values] )) ||
_cmake_define_property_values() {
local ret=1
local build_types=('Debug' 'Release' 'RelWithDebInfo' 'MinSizeRel')
local c_standards=(90 99 11 17 23)
local cxx_standards=(98 11 14 17 20 23)
setopt localoptions extendedglob
case $@[-1] in
(CMAKE_BUILD_TYPE) _wanted build-types expl 'build type' _values 'build type' ${_cmake_build_types[@]} && ret=0;;
(BUILD_SHARED_LIBS) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;;
(CMAKE_CXX_STANDARD) _wanted cxx-standards expl 'cxx standard' _values 'cxx standard' ${_cmake_cxx_standards[@]} && ret=0;;
(CMAKE_C_STANDARD) _wanted c-standards expl 'c standard' _values 'c standard' ${_cmake_c_standards[@]} && ret=0;;
(CMAKE_TOOLCHAIN_FILE) _wanted toolchain-files expl 'file' _cmake_toolchain_files && ret=0;;
(CMAKE_COLOR_MAKEFILE) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;;
(CMAKE_RULE_MESSAGES) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;;
(CMAKE_VERBOSE_MAKEFILE) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;;
(CMAKE_UNITY_BUILD) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;;
(CMAKE_INSTALL_PREFIX) _files -/ && ret=0;;
(CMAKE_EXPORT_COMPILE_COMMANDS) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;;
(CMAKE_*_COMPILER) _wanted compilers expl 'compiler' _cmake_compilers && ret=0;;
(CMAKE_*_COMPILER_LAUNCHER) _wanted compilers expl 'compiler launcher' _cmake_launchers && ret=0;;
(CMAKE_*_FLAGS(|_?*)) _message -e compiler-flags 'compiler flags' && _dispatch $service -value-,CPPFLAGS,-default- && ret=0;;
(CMAKE_*_STANDARD_REQUIRED) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;;
(CMAKE_*_EXTENSIONS) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;;
(*) _files && ret=0;;
(CMAKE_BUILD_TYPE)
_wanted build-types expl 'build type' _values 'build type' ${build_types[@]} && ret=0
;;
(BUILD_SHARED_LIBS)
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
;;
(CMAKE_CXX_STANDARD)
_wanted cxx-standards expl 'cxx standard' _values 'cxx standard' ${cxx_standards[@]} && ret=0
;;
(CMAKE_C_STANDARD)
_wanted c-standards expl 'c standard' _values 'c standard' ${c_standards[@]} && ret=0
;;
(CMAKE_TOOLCHAIN_FILE)
_wanted toolchain-files expl 'file' _cmake_toolchain_files && ret=0
;;
(CMAKE_COLOR_MAKEFILE)
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
;;
(CMAKE_RULE_MESSAGES)
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
;;
(CMAKE_VERBOSE_MAKEFILE)
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
;;
(CMAKE_UNITY_BUILD)
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
;;
(CMAKE_INSTALL_PREFIX)
_files -/ && ret=0
;;
(CMAKE_EXPORT_COMPILE_COMMANDS)
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
;;
(CMAKE_*_COMPILER)
_wanted compilers expl 'compiler' _cmake_compilers && ret=0
;;
(CMAKE_*_COMPILER_LAUNCHER)
_wanted compilers expl 'compiler launcher' _cmake_launchers && ret=0
;;
(CMAKE_*_FLAGS(|_?*))
_message -e compiler-flags 'compiler flags' && _dispatch $service -value-,CPPFLAGS,-default- && ret=0
;;
(CMAKE_*_STANDARD_REQUIRED)
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
;;
(CMAKE_*_EXTENSIONS)
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
;;
(*)
_files && ret=0
;;
esac
return ret
}
local -a _cmake_generator_list=(${(f)"$(cmake --help | awk '/^Generators/{flag=1} flag && /^[* ] [^ ]/ {sub(/^[* ] /, ""); sub(/=.*$/, ""); sub(/\[arch\]/, ""); sub(/ *$/, ""); print}')"})
# -----------------
# _cmake_generators
# -----------------
(( $+functions[_cmake_generators] )) ||
_cmake_generators() {
_describe -t generators 'generator' _cmake_generator_list
local -a generators=(
${(f)"$(cmake --help | awk '/^Generators/{flag=1} flag && /^[* ] [^ ]/ {sub(/^[* ] /, ""); sub(/=.*$/, ""); sub(/\[arch\]/, ""); sub(/ *$/, ""); print}')"}
)
_describe -t generators 'generator' generators
}
# ----------------------
@ -519,75 +560,74 @@ _cmake_launchers() {
_command_names -e
}
local -a _cmake_commands=(
'capabilities:Report capabilities built into cmake in JSON format' \
'cat:concat the files and print them to the standard output' \
'chdir:run command in a given directory' \
'compare_files:check if file1 is same as file2' \
'copy:copy files to destination (either file or directory)' \
'copy_directory:copy content of <dir>... directories to destination directory' \
'copy_if_different:copy files if it has changed' \
'echo:displays arguments as text' \
'echo_append:displays arguments as text but no new line' \
'env:run command in a modified environment' \
'environment:display the current environment' \
'make_directory:create parent and <dir> directories' \
'md5sum:create MD5 checksum of files' \
'sha1sum:create SHA1 checksum of files' \
'sha224sum:create SHA224 checksum of files' \
'sha256sum:create SHA256 checksum of files' \
'sha384sum:create SHA384 checksum of files' \
'sha512sum:create SHA512 checksum of files' \
'remove:remove the file(s), use -f to force it' \
'remove_directory:remove directories and their contents' \
'rename:rename a file or directory (on one volume)' \
'rm:remove files or directories' \
'server:start cmake in server mode' \
'sleep:sleep for given number of seconds' \
'tar:create or extract a tar or zip archive' \
'time:run command and display elapsed time' \
'touch:touch a <file>' \
'touch_nocreate:touch a <file> but do not create it' \
'create_symlink:create a symbolic link new -> old' \
'create_hardlink:create a hard link new -> old' \
'true:do nothing with an exit code of 0' \
(( $+functions[_cmake_commands] )) ||
_cmake_commands() {
local -a commands=(
'capabilities:Report capabilities built into cmake in JSON format'
'cat:concat the files and print them to the standard output'
'chdir:run command in a given directory'
'compare_files:check if file1 is same as file2'
'copy:copy files to destination (either file or directory)'
'copy_directory:copy content of <dir>... directories to destination directory'
'copy_if_different:copy files if it has changed'
'echo:displays arguments as text'
'echo_append:displays arguments as text but no new line'
'env:run command in a modified environment'
'environment:display the current environment'
'make_directory:create parent and <dir> directories'
'md5sum:create MD5 checksum of files'
'sha1sum:create SHA1 checksum of files'
'sha224sum:create SHA224 checksum of files'
'sha256sum:create SHA256 checksum of files'
'sha384sum:create SHA384 checksum of files'
'sha512sum:create SHA512 checksum of files'
'remove:remove the file(s), use -f to force it'
'remove_directory:remove directories and their contents'
'rename:rename a file or directory (on one volume)'
'rm:remove files or directories'
'server:start cmake in server mode'
'sleep:sleep for given number of seconds'
'tar:create or extract a tar or zip archive'
'time:run command and display elapsed time'
'touch:touch a <file>'
'touch_nocreate:touch a <file> but do not create it'
'create_symlink:create a symbolic link new -> old'
'create_hardlink:create a hard link new -> old'
'true:do nothing with an exit code of 0'
'false:do nothing with an exit code of 1'
)
_cmake_command() {
_arguments -C \
'-E[CMake command mode]:command:(("${_cmake_commands[@]}"))'
)
_describe -t commands 'command' commands
}
local cmake_suggest_build;cmake_suggest_build=(
local -a cmake_suggest_build=(
'--build[build]:build dir:_cmake_suggest_builddirs'
)
local cmake_suggest_install;cmake_suggest_install=(
local -a cmake_suggest_install=(
'--install[install]:install dir:_cmake_suggest_installdirs'
)
if [[ "$service" = -value-*CMAKE_GENERATOR* ]]; then
_cmake_generators
elif [ $CURRENT -eq 2 ] ; then
_arguments -C -s \
_arguments -s \
- help \
"$cmake_help_actions[@]" \
- command \
'-E[CMake command mode]:command:( )' \
'-E[CMake command mode]:command:_cmake_commands' \
- build_opts \
"$cmake_build_options[@]" \
- build_cmds \
"$cmake_suggest_build[@]" \
- install_cmds \
"$cmake_suggest_install[@]" && return 0
elif [[ $words[2] = --help* ]] ; then
_cmake_help
elif [[ $words[2] == --build ]] ; then
_cmake_on_build
elif [[ $words[2] == --install ]] ; then
_cmake_on_install
elif [[ $words[2] == -E ]]; then
_cmake_command
elif [[ $words[2] == --help-* ]] ; then
_arguments "$cmake_help_actions[@]"
else
_arguments "$cmake_build_options[@]"
fi

View File

@ -47,7 +47,7 @@ _arguments -s -S \
'(-b --bare)'{-b,--bare}'[compile without a top-level function wrapper]' \
'(-c --compile)'{-c,--compile}'[compile to JavaScript and save as .js files]' \
'(-e --eval)'{-e,--eval}'[pass a string from the command line as input]:Inline Script' \
'(- *)'{-h,--help}'[display this help message]' \
'(- *)'{-h,--help}'[display help message]' \
'(-i --interactive)'{-i,--interactive}'[run an interactive CoffeeScript REPL]' \
'(-j --join)'{-j,--join}'[concatenate the source CoffeeScript before compiling]: :_files -g "*.coffee"' \
'(-l --literate)'{-l,--literate}'[treat stdio as literate style coffeescript]' \

156
src/_cpack Normal file
View File

@ -0,0 +1,156 @@
#compdef cpack
# ------------------------------------------------------------------------------
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for cpack 4.3.0 (https://kitware.com/cmake)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_cpack() {
local ret=1
_arguments \
'-G[Override/define CPACK_GENERATOR]:generator:_cpack_generators' \
'-C[Specify the project configurations]:configuration:(Debug Release)' \
'*-D[Set a CPack variable]:var_val' \
'--config[Specify the config file]:file:_files' \
'(-V --verbose)'{-V,--verbose}'[Enable verbose output]' \
'--trace[Put underlying cmake scripts in trace mode]' \
'--trace-expand[Put underlying cmake scripts in expanded trace mode]' \
'--debug[Enable debug output]' \
'-P[Override/define CPACK_PACKAGE_NAME]:package_name' \
'-R[Override/define CPACK_PACKAGE_VERSION]:package_version' \
'-B[Override/define CPACK_PACKAGE_DIRECTORY]:package_directory:_files -/' \
'--vendor[Override/define CPACK_PACKAGE_VENDOR]:vendor' \
'--preset[Read arguments from a package preset]' \
'--list-presets[List available package preset]' \
'(- *)'{--version,-version}=-'[Print version number and exit]::format:(json-v1)' \
'(- *)--help[Print usage information and exit]' \
'(- *)--help-full[Print all help manuals and exit]' \
'(- *)--help-manual[Print one help manual and exit]:manual:_cpack_help_manuals' \
'(- *)--help-manual-list[List help manuals available and exit]' \
'(- *)--help-command[Print help for one command and exit]:command:_cpack_help_commands' \
'(- *)--help-command-list[List commands with help available and exit]' \
'(- *)--help-commands[Print cmake-commands manual and exit]' \
'(- *)--help-module[Print help for one module and exit]:module:_cpack_help_modules' \
'(- *)--help-module-list[List modules with help available and exit]' \
'(- *)--help-modules[Print cmake-modules manual and exit]' \
'(- *)--help-policy[Print help for one policy and exit]:policy:_cpack_help_policies' \
'(- *)--help-policy-list[List policies with help available and exit]' \
'(- *)--help-policies[Print cmake-policies manual and exit]' \
'(- *)--help-property[Print help for one property and exit]:property:_cpack_help_properties' \
'(- *)--help-property-list[List properties with help available and exit]' \
'(- *)--help-properties[Print cmake-properties manual and exit]' \
'(- *)--help-variable[Print help for one variable and exit]:variable:_cpack_help_variables' \
'(- *)--help-variable-list[List variables with help available and exit]' \
'(- *)--help-variables[Print cmake-variables manual and exit]' \
&& ret=0
return ret
}
_cpack_generators() {
local -a generators=(
"7Z:[7-Zip file format with default compression algorithm]"
"7Z_BZ2:[7-Zip file format with BZip2 compression]"
"7Z_DEFLATE:[7-Zip file format with Deflate compression]"
"7Z_LZMA:[7-Zip file format with LZMA compression]"
"7Z_LZMA2:[7-Zip file format with LZMA2 compression]"
"7Z_PPMD:[7-Zip file format with PPMd compression]"
"7Z_STORE:[7-Zip file format without compression]"
"7Z_ZSTD:[7-Zip file format with Zstandard compression]"
"AppImage:[AppImage packages]"
"DEB:[Debian packages]"
"External:[CPack External packages]"
"IFW:[Qt Installer Framework]"
"INNOSETUP:[Inno Setup packages]"
"NSIS:[Null Soft Installer]"
"NSIS64:[Null Soft Installer (64-bit)]"
"NuGet:[NuGet packages]"
"RPM:[RPM packages]"
"STGZ:[Self extracting Tar GZip compression]"
"TAR:[Tar no compression]"
"TBZ2:[Tar BZip2 compression]"
"TGZ:[Tar GZip compression]"
"TXZ:[Tar XZ compression]"
"TZ:[Tar Compress compression]"
"TZST:[Tar Zstandard compression]"
"ZIP:[ZIP file format with default compression algorithm]"
"ZIP_BZ2:[ZIP file format with BZip2 compression]"
"ZIP_DEFLATE:[ZIP file format with Deflate compression]"
"ZIP_LZMA:[ZIP file format with LZMA compression]"
"ZIP_LZMA2:[ZIP file format with LZMA2 compression]"
"ZIP_STORE:[ZIP file format without compression]"
"ZIP_ZSTD:[ZIP file format with Zstandard compression]"
)
_describe -t 'generators' generator generators
}
_cpack_help_manuals() {
local -a manuals=(${(f)"$(cpack --help-manual-list 2>/dev/null | sed 's/([0-9][0-9]*)$//' )"})
_values 'manual' $manuals
}
_cpack_help_commands() {
local -a commands=(${(f)"$(cpack --help-command-list 2>/dev/null )"})
_values 'command' $commands
}
_cpack_help_modules() {
local -a modules=(${(f)"$(cpack --help-module-list 2>/dev/null )"})
_values 'module' $modules
}
_cpack_help_policies() {
local -a policies=(${(f)"$(cpack --help-policy-list 2>/dev/null )"})
_values 'policy' $policies
}
_cpack_help_properties() {
local -a properties=(${(f)"$(cpack --help-property-list 2>/dev/null )"})
_values 'property' $properties
}
_cpack_help_variables() {
local -a variables=(${(f)"$(cpack --help-variable-list 2>/dev/null )"})
_values 'variable' $variables
}
_cpack "$@"
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

103
src/_cpanm Normal file
View File

@ -0,0 +1,103 @@
#compdef cpanm
# ------------------------------------------------------------------------------
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for cpanm 1.7049 (https://github.com/miyagawa/cpanminus)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_arguments -n -C -s \
'(-i --install)'{-i,--install}'[Install the modules]' \
'--self-upgrade[Upgrades itself]' \
'--info[Displays the distribution information in "AUTHOR/Dist-Name-ver.tar.gz" format in the stdout]' \
"--installdeps[Installs the dependencies of the target distribution but won't build itself]" \
'--look[Download and unpack the distribution and then open the directory with your shell]' \
'(- *)'{-h,--help}'[Display the help message]' \
'(- *)'{-V,--version}'[Display the version number]' \
'(-f --force)'{-f,--force}'[Force install modules even when testing failed]' \
'(-n --notest)'{-n,--notest}'[Skip the testing of modules]' \
'--test-only[Run the tests only]' \
'(-S --sudo)'{-S,--sudo}'[Switch to the root user with "sudo" when installing modules]' \
'(-v --verbose)'{-v,--verbose}'[Makes the output verbose]' \
'(-q --quiet)'{-q,--quiet}'[Makes the output even more quiet than the default]' \
'(-l --local-lib)'{-l,--local-lib}'[Sets the local::lib compatible path to install modules to]' \
'(-L --local-lib-contained)'{-L,--local-lib-contained}'[Same with "--local-lib" but with --self-contained set]' \
'--self-contained[When examining the dependencies, assume no non-core modules are installed on the system]' \
"--exclude-vendor[Don't include module installed under the 'vendor' paths]" \
'--mirror=[Specifies the base URL for the CPAN mirror to use]:mirror' \
"--mirror-only[Download the mirror's index file instead of querying the CPAN Meta DB]" \
'(-M --from)'{-M,--from}='[Use the given mirror URL and its index as the only source to search and download modules from]' \
'--mirror-index[Specifies the file path to "02packages.details.txt" for module search index]' \
'--cpanmetadb[Specifies an alternate URI for CPAN MetaDB index lookups]' \
'--metacpan[Prefers MetaCPAN API over CPAN MetaDB]' \
'--cpanfile=[Specified an alternate path for cpanfile]: :_files' \
"--prompt[Prompts when a test fails so that you can skip, force install, retry or look what's going wrong]" \
'--dev[Search for a newer developer release as well]' \
'--reinstall[Reinstall even if your locally installed version is latest]' \
'--interactive[Makes the configuration interactive]' \
'(--pp --pureperl)'{--pp,--pureperl}'[Prefer Pure perl build of modules]' \
'--with-recommends[Installs dependencies declared as "recommends"]' \
'--with-suggests[Installs dependencies declared as "suggests"]' \
'--with-develop[Install develop phase dependencies in "cpanfile"]' \
'--with-configure[Installs configure phase dependencies in "cpanfile"]' \
'--with-feature=[Specifies the feature to enable]::feature' \
'--without-feature=[Not specifies the feature to enable]::feature' \
'--with-all-feature[Specifies the all features to enable]' \
'--configure-timeout=[Specify the timeout length to wait for the configure]' \
'--build-timeout=[Specify the timeout length to wait for the build]' \
'--test-timeout=[Specify the timeout length to wait for the test]' \
'--configure-args=[Pass arguments for configure]:args' \
'--build-args=[Pass arguments for build]:args' \
'--test-args=[Pass arguments for test]:args' \
'--install-args=[Pass arguments for install]:args' \
'--scandeps[Scans the dependencies of given modules and output the tree in a text format]' \
'--format=[Determines what format to display the scanned dependency tree]:fmt:(tree json yaml dists)' \
'--save-dist=[Specifies the optional directory path to copy downloaded tarballs]: :_files -/' \
'(-U --uninstall)'{-U,--uninstall}'[Uninstalls a module from the library path]' \
'--cascade-search[Specifies whether to cascade search when you specify multiple mirrors]' \
'--skip-installed[Skip install if specified module is already installed]' \
'--skip-satisfies[Skip install if specified module and version is already installed]' \
'--verify[Verify the integrity of distribution files]' \
'--report-perl-version[Report perl version as port of User-Agent]' \
'--auto-cleanup[Specifies the number of days in which cpanm work directories expire]::days' \
'--man-pages[Generate man pages for executables(man1) and libraries(man3)]' \
'--lwp[Uses LWP module to download stuff over HTTP]' \
'--wget[Uses GNU Wget(if available) to download stuff]' \
'--curl[Uses cURL(if available) to download stuff]' \
&& return 0
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

121
src/_cpm Normal file
View File

@ -0,0 +1,121 @@
#compdef cpm
# ------------------------------------------------------------------------------
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for cpm 0.998003 (https://github.com/skaji/cpm)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_cpm() {
typeset -A opt_args
local context state line
local curcontext="$curcontext"
local ret=1
_arguments -C \
'(- *)'{-h,--help}'[Show help message]' \
'(- *)--version[Show version and exit]' \
'(-v --verbose)'{-v,--verbose}'[Enable debug mode]' \
'1: :_cpm_subcommands' \
'*::arg:->args' && ret=0
case $state in
(args)
case $words[1] in
(install)
_arguments \
'(-w --workers)'{-w,--workers=}'[number of workers(default=5)]:num' \
'(-L --local-lib-contained)'{-L,--local-lib-contained=}'[directory to install module into, default=local/]: :_files -/' \
'(-g --global)'{-g,--global}'[install modules into current @INC instead of local/]' \
'(-v --verbose)'{-v,--verbose}'[verbose mode]' \
'(--prebuilt --no-prebuilt)--prebuilt[save builds for CPAN distributions and later install the prebuilts if available]' \
'(--prebuilt --no-prebuilt)--no-prebuilt[no prebuilt]' \
'--target-perl=[install modules as if version is your perl is VERSION]:version' \
'--mirror[base URL for the CPAN mirror to use]:url' \
'(--pp --pureperl-only)'{--pp,--pureperl-only}'[prefer pureperl only build]' \
'(--static-install --no-static-install)--static-install[enable the static install]' \
'(--static-install --no-static-install)--no-static-install[disable the static install]' \
\*{-r,--resolver=}'[specify resolvers]:resolver' \
'--no-defult-resolvers[Use default resolvers if you specify --resolver option]' \
'--reinstall[reinstall the distribution even if you already have the latest version installed]' \
'--dev[resolve TRIAL distributions too]' \
'(--color --no-color)--color[turn on color output]' \
'(--color --no-color)--no-color[turn off color output]' \
'(--test --no-test)--test[run test cases]' \
'(--test --no-test)--no-test[do not run test cases]' \
'--man-pages[generate man pages]' \
'(--retry --no-retry)--retry[retry configure/build/test/install if fails]' \
'(--retry --no-retry)--no-retry[do not retry]' \
'--show-build-log-on-failure[show build.log on failure]' \
'--configure-timeout=[specify configure timeout second]:sec' \
'--build-timeout=[specify build timeout second]:sec' \
'--test-timeout=[specify test timeout second]:sec' \
'(--show-progress --no-show-progress)--show-progress[show progress]' \
'(--show-progress --no-show-progress)--no-show-progress[do not show progress]' \
'--cpmfile=[specify cpmfile path]: :_files' \
'--cpanfile=[specify cpanfile path]: :_files' \
'--metafile=[specify META file path]: :_files' \
'--snapshot=[specify cpanfile.snapshot path]: :_files' \
'(- *)'{-V,--version}'[show version]' \
'(- *)'{-h,--help}'[show help message]' \
'*--feature=[specify the feature to enable in cpanfile]:feature' \
'*:modules' \
&& ret=0
;;
(*)
ret=0
;;
esac
esac
return ret
}
(( $+functions[_cpm_subcommands] )) ||
_cpm_subcommands() {
local -a commands=(
"install:Install modules"
"help:Show help"
"version:Show version"
)
_describe -t subcommands "subcommands" commands
}
_cpm "$@"
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -78,7 +78,7 @@ _cppcheck() {
"(-f --force)"{-f,--force}"[Force checking of all configurations in files]" \
"(--fsigned-char --funsigned-char)--fsigned-char[Treat char type as signed]" \
"(--fsigned-char --funsigned-char)--funsigned-char[Treat char type as unsigned]" \
"(- 1 *)"{-h,--help}"[Print this help]" \
"(- 1 *)"{-h,--help}"[Print help]" \
"-I[A file that contains a list of config-excludes]:directory:_files -/" \
"--include-file=[Specify directory paths to search for included header files in a text file]:file:_files" \
"--include=[Force inclusion of a file before the checked file]:file:_files" \

179
src/_ctest Normal file
View File

@ -0,0 +1,179 @@
#compdef ctest
# ------------------------------------------------------------------------------
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for ctest 4.3.0 (https://kitware.com/cmake)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_ctest() {
local ret=1
_arguments \
'--preset=[Read arguments from a test preset]:preset' \
'--list-presets[List available test presets]' \
'(-C --build-config)'{-C,--build-config}'[Choose configuration to test]:config' \
'--progress[Enable short progress output from tests]' \
'(-V --verbose -VV --extra-verbose)'{-V,--verbose}'[Enable verbose output from tests]' \
'(-V --verbose -VV --extra-verbose)'{-VV,--extra-verbose}'[Enable more verbose output from tests]' \
'--debug[Displaying more verbose internals of CTest]' \
'--output-on-failure[Output anything outputted by the test program if the test should fail]' \
'--stop-on-failure[Stop running the tests after one has failed]' \
'--test-output-size-passed[Limit the output for passed tests to <size> bytes]:size' \
'--test-output-size-failed[Limit the output for failed tests to <size> bytes]:size' \
'--test-output-truncation[Truncate mode]:mode:(tail middle head)' \
'-F[Enable failover]' \
'(-j --parallel)'{-j,--parallel}'[Run tests in parallel]::level' \
'(-Q --quiet)'{-Q,--quiet}'[Make ctest quiet]' \
'(-O --output-log)'{-O,--output-log}'[Output to log file]:file:_files' \
'--output-junit[Output test results to JUnit XML file]:file:_files' \
'(-N --show-only)'{-N,--show-only}'[Disable actual execution of tests]::format:(format human json-v1)' \
\*{-L,--label-regex}'[Run tests with labels matching regular expression]:regex' \
\*{-R,--tests-regex}'[Run tests matching regular expression]:regex' \
\*{-E,--exclude-regex}'[Exclude tests matching regular expression]:regex' \
\*{-LE,--label-exclude}'[Exclude tests with labels matching regular expression]:regex' \
\*{-FA,--fixture-exclude-any}'[Do not automatically add any tests for fixtures matching regular expression]:regex' \
\*{-FS,--fixture-exclude-setup}'[Do not automatically add setup tests for fixtures matching regular expression]:regex' \
\*{-FC,--fixture-exclude-cleanup}'[Do not automatically add cleanup tests for fixtures matching regular expression]:regex' \
'(--dashboard)'{-D,--dashboard}'[Execute dashboard test]:dashboard' \
'*-D[Define a variable for script mode]:var' \
'(-M --test-model)'{-M,--test-model}'[Set the model for a dashboard]:model' \
'(-T --test-action)'{-T,--test-action}'[Set the dashboard action to perform]' \
'--group[Specify what build group on the dashboard]:group' \
\*{-S,--script,-Sp,--script-new-process}'[Execute a dashboard for a configuration]:script:_files' \
'(-A --add-notes)'{-A,--add-notes}'[Add a notes file with submission]:file:_files' \
'(-I --test-information)'{-I,--test-information}'[Run a specific number of tests by number]:number' \
'(-U --union)'{-U,--union}'[Take the Union of -I and -R]' \
'--rerun-failed[Run only the tests that failed previously]' \
'--tests-from-file[Run the tests listed in the given file]:file:_files' \
'--exclude-from-file[Run tests except those listed in the given file]:file:_files' \
'--repeat-until-fail[Repeat each test to run <n> times without failing]:n' \
'--repeat[Repeat each test to run <n> times]:condition-n:(until-fail: until-pass: after-timeout:)' \
'--max-width[Set the max width for a test name to output]' \
'--interactive-debug-mode[Set the interactive mode to 0 or 1]:n:(0 1)' \
'--resource-spec-file[Set the resource spec file to use]:file:_files' \
'--no-label-summary[Disable timing summary information for labels]' \
'--no-subproject-summary[Disable timing summary information for subprojects]' \
'--test-dir[Specify the directory in which to look for tests]:dir:_files -/' \
'--build-and-test[Configure, build and run a test]' \
'*--build-target[Specify a specific target to build]:target' \
'--build-nocmake[Run the build without running cmake first]' \
'--build-run-dir[Specify directory to run programs from]:dir:_files -/' \
'--build-two-config[Run CMake twice]' \
'--build-exe-dir[Specify the directory for the executable]:dir:_files -/' \
'--build-generator[Specify the generator to use]:generator' \
'--build-generator-platform[Specify the generator-specific platform]:generator_platform' \
'--build-generator-toolset[Specify the generator-specific toolset]:build_toolset' \
'--build-project[Specify the name of the project to build]:project' \
'--build-makeprogram[Specify the make program to use]:make:_files' \
'--build-noclean[Skip the make clean step]' \
'--build-config-sample[A sample executable to use to determine the configuration]:sample' \
'*--build-options[Add extra options to the build step]' \
'--test-command[The test to run with the --build-and-test-option]:command' \
'--test-timeout[The time limit in seconds]:timeout' \
'--test-load[CPU load threshold for starting new parallel tests]:threshold' \
'--tomorrow-tag[starts with next day tag]' \
'--overwrite[Overwrite CTest configuration option]' \
'--extra-submit[Submit extra files to the dashboard]:file:_files' \
'*--http-header[Append HTTP header when submitting]:header' \
'--schedule-random[Use a random order for scheduling tests]' \
'--schedule-random-seed[Override seed for random order of tests]:seed' \
'--submit-index[Submit individual dashboard tests with specific index]:index' \
'--timeout[Set the default test timeout]:timeout' \
'--stop-time[Set a time at which all tests should stop running]:time' \
'--http1.0[Submit using HTTP 1.0]' \
'--no-compress-output[Do not compress test output when submitting]' \
'--print-labels[Print all available test labels]' \
'--no-tests=[Regard no tests]:type:(error ignore)' \
'(- *)'{--help,-help,-usage,-h,-H}'[Print usage information and exit]' \
'(- *)'{--version,-version}'[Print version number and exit]' \
'(- *)--help-full[Print all help manuals and exit]' \
'(- *)--help-manual[Print one help manual and exit]:manual:_ctest_help_manuals' \
'(- *)--help-manual-list[List help manuals available and exit]' \
'(- *)--help-command[Print help for one command and exit]:command:_ctest_help_commands' \
'(- *)--help-command-list[List commands with help available and exit]' \
'(- *)--help-commands[Print cmake-commands manual and exit]' \
'(- *)--help-module[Print help for one module and exit]:module:_ctest_help_modules' \
'(- *)--help-module-list[List modules with help available and exit]' \
'(- *)--help-modules[Print cmake-modules manual and exit]' \
'(- *)--help-policy[Print help for one policy and exit]:policy:_ctest_help_policies' \
'(- *)--help-policy-list[List policies with help available and exit]' \
'(- *)--help-policies[Print cmake-policies manual and exit]' \
'(- *)--help-property[Print help for one property and exit]:property:_ctest_help_properties' \
'(- *)--help-property-list[List properties with help available and exit]' \
'(- *)--help-properties[Print cmake-properties manual and exit]' \
'(- *)--help-variable[Print help for one variable and exit]:variable:_ctest_help_variables' \
'(- *)--help-variable-list[List variables with help available and exit]' \
'(- *)--help-variables[Print cmake-variables manual and exit]' \
&& ret=0
return ret
}
_ctest_help_manuals() {
local -a manuals=(${(f)"$(ctest --help-manual-list 2>/dev/null | sed 's/([0-9][0-9]*)$//' )"})
_values 'manual' $manuals
}
_ctest_help_commands() {
local -a commands=(${(f)"$(ctest --help-command-list 2>/dev/null )"})
_values 'command' $commands
}
_ctest_help_modules() {
local -a modules=(${(f)"$(ctest --help-module-list 2>/dev/null )"})
_values 'module' $modules
}
_ctest_help_policies() {
local -a policies=(${(f)"$(ctest --help-policy-list 2>/dev/null )"})
_values 'policy' $policies
}
_ctest_help_properties() {
local -a properties=(${(f)"$(ctest --help-property-list 2>/dev/null )"})
_values 'property' $properties
}
_ctest_help_variables() {
local -a variables=(${(f)"$(ctest --help-variable-list 2>/dev/null )"})
_values 'variable' $variables
}
_ctest "$@"
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -49,7 +49,7 @@ _direnv_commands() {
'exec:Executes a command after loading the first .envrc or .env found in DIR'
'export:Loads an .envrc or .env and prints the diff in terms of exports'
"fetchurl:Fetches a given URL into direnv's CAS"
'help:shows this help'
'help:shows help'
'hook:Used to setup the shell hook'
'prune:removes old allowed files'
'reload:triggers an env reload'

View File

@ -35,7 +35,7 @@
# ------------------------------------------------------------------------------
_arguments \
'(- *)'{-h,--help}'[Show this help message and exit]' \
'(- *)'{-h,--help}'[Show help message and exit]' \
'(- *)'{-v,--version}'[Show version and exit]' \
'(-d --devel-release)'{-d,--devel-release}'[Upgrade to the development release]' \
'--data-dir=[Directory that contains the data files]:dir:_files -/' \

99
src/_elixir Normal file
View File

@ -0,0 +1,99 @@
#compdef elixir elixirc iex
# ------------------------------------------------------------------------------
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for elixir 1.19.5 (https://elixir-lang.org/)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
if [[ $service == "iex" ]]; then
_arguments \
'--dbg[Set the backend for Kernel.dbg/2]:backend:(pry)' \
'--dot-iex[Evaluate file, line by line to set up IEx environment]:file:_files' \
'--remsh[Connect to a node using a remote shell]:name' \
'*::file_or_data:_files -g "*.exs"'
else
local -a elixir_options=(
\*{-e,--eval}'[Evaluate the given command]:command'
'(- *)'{-h,--help}'[Print help message]'
'*-r[Require the given files or patterns]:file_or_pattern:_files'
'-S[Find and execute the given script in $PATH]:file:_files'
'*-pr[Require the given files or patterns in parallel]:file_or_pattern:_files'
'*-pa[Prepend the given path to Erlang code path]:path:_files -/'
'*-pz[Append the given path to Erlang code path]:path:_files -/'
'(- *)'{-v,--version}'[Print Erlang/OTP and Elixir versions]'
'(--color --no-color)--color[Enable ANSI coloring]'
'(--color --no-color)--no-color[Disable ANSI coloring]'
'*--erl[Switch to be passed down to Erlang]:switch'
'--logger-otp-reports[Enable or disable OTP reporting]:bool:(true false)'
'--logger-sasl-reports[Enable or disable SASL reporting]:bool:(true false)'
'--no-halt[Do not halt the Erlang VM after execution]'
'(- *)--short-version[Print Elixir version]'
'--cookie[Set a cookie for this distributed node]:cookie'
'--hidden[Make a hidden node]'
'--name[Make and assign a name to the distributed node]:name'
'*--rpc-eval[Evaluate the given command on the given remote node]:node_command'
'--sname[Make and assign a short name to the distributed node]'
'--boot[Use the given FILE.boot to start the system]:file:_files'
'*--boot-var[Make $VAR available as VALUE to FILE.boot]:var_value'
'*--erl-config[Load configuration in FILE.config written in Erlang]:file:_files'
'--pipe-to[Start the Erlang VM as a named PIPEDIR and LOGDIR]:pipe_and_log:_files -/'
'--vm-wargs[Pass the contents in file as arguments to the VM]:file:_files'
)
case $service in
(elixir)
_arguments $elixir_options[@]
;;
(elixirc)
_arguments \
$elixir_options[@] \
'-o[The directory to output compiled files]:dir:_files -/' \
'(- *)'{-v,--version}'[Print Elixir version and exit]' \
'--ignore-module-conflict[Do not emit warnings if a module was previously defined]' \
'--no-debug-info[Do not attach debug info to compiled modules]' \
'--no-docs[Do not attach documentation to compiled modules]' \
'--profile[Profile to compile modules]:type:(time)' \
'--verbose[Print compilation status]' \
'--warnings-as-errors[Treat warnings as errors and return non-zero exit status]' \
'*::file:_files -g "*.ex"'
;;
esac
fi
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -40,7 +40,7 @@
# ------------------------------------------------------------------------------
local -a args=(
'(-h --help)'{-h+,--help}'[show this help message and exit]'
'(-h --help)'{-h+,--help}'[show help message and exit]'
'(-)'--version'[display version information and exit]'
'(-)1:directory: _path_files -/'
'(-)2:command: _command_names -e'

View File

@ -28,9 +28,7 @@
# Description
# -----------
#
# Completion script for Fabric (https://www.fabfile.org/)
#
# Source: https://github.com/vhbit/fabric-zsh-autocomplete
# Completion script for Fabric v3.2.2 (https://www.fabfile.org/)
#
# ------------------------------------------------------------------------------
# Authors
@ -40,65 +38,42 @@
#
# ------------------------------------------------------------------------------
local curcontext=$curcontext state line
declare -A opt_args
declare target_list
target_list=(`fab --shortlist 2>/dev/null`)
_targets() {
_describe -t commands "fabric targets" target_list
_fab_tasks() {
local -a tasks=(${(f)"$(fab --list 2>/dev/null| awk '/^ /{first=$1;$1="";print first ":" substr($0, 2) }')"})
if (( $#tasks > 0)); then
_describe -t 'task' tasks tasks
fi
}
output_levels=(
'status: Status messages, i.e. noting when Fabric is done running, if the user used a keyboard interrupt, or when servers are disconnected from. These messages are almost always relevant and rarely verbose.'
'aborts: Abort messages. Like status messages, these should really only be turned off when using Fabric as a library, and possibly not even then. Note that even if this output group is turned off, aborts will still occur there just wont be any output about why Fabric aborted!'
'warnings: Warning messages. These are often turned off when one expects a given operation to fail, such as when using grep to test existence of text in a file. If paired with setting env.warn_only to True, this can result in fully silent warnings when remote programs fail. As with aborts, this setting does not control actual warning behavior, only whether warning messages are printed or hidden.'
'running: Printouts of commands being executed or files transferred, e.g. [myserver] run: ls /var/www. Also controls printing of tasks being run, e.g. [myserver] Executing task ''foo''.'
'stdout: Local, or remote, stdout, i.e. non-error output from commands.'
'stderr: Local, or remote, stderr, i.e. error-related output from commands.'
'user: User-generated output, i.e. local output printed by fabfile code via use of the fastprint or puts functions.'
)
_arguments -w -S -C \
'(-)'{-h,--help}'[show this help message and exit]: :->noargs' \
'(-)'{-V,--version}'[show program'\''s version number and exit]: :->noargs' \
'(-)--list[print list of possible commands and exit]: :->noargs' \
'(-)--shortlist[print non-verbose list of possible commands and exit]: :->noargs' \
'(--reject-unknown-hosts)--reject-unknown-hosts[reject unknown hosts]' \
'(--no-pty)--no-pty[do not use pseudo-terminal in run/sudo]' \
"(-d+ --display=-)"{-d+,--display=-}"[print detailed info about a given command]: :_targets" \
'(-D --disable-known-hosts)'{-D,--disable-known-hosts}'[do not load user known_hosts file]' \
'(-r --reject-unknown-hosts)'{-r,--reject-unknown-hosts}'[reject unknown hosts]' \
'(-u+ --user=-)'{-u+,--user=-}'[username to use when connecting to remote hosts]: :' \
'(-p+ --password=-)'{-p+,--password=-}'[password for use with authentication and/or sudo]: :' \
'(-H+ --hosts=-)'{-H+,--hosts=-}'[comma separated list of hosts to operate on]: :' \
'(-R+ --roles=-)'{-R+,--roles=-}'[comma separated list of roles to operate on]: :' \
'(-a --no-agent)'{-a,--no-agent}'[don'\''t use the running SSH agent]' \
'(-k --no-keys)'{-k,--no-keys}'[don'\''t load private key files from ~/.ssh/]' \
'(-w --warn-only)'{-w,--warn-only}'[warn instead of abort, when commands fail]' \
'-i+[path to SSH private key file. May be repeated]: :_files' \
"(-f+ --fabfile=)"{-f+,--fabfile=}"[Python module file to import]: :_files -g *.py" \
'(-c+ --config=-)'{-c+,--config=-}'[specify location of config file to use]: :_files' \
'(-s+ --shell=-)'{-s+,--shell=-}'[specify a new shell, defaults to ''/bin/bash -l -c'']: :' \
'(--ssh-config-path=)--ssh-config-path=[ssh config path]: :_files' \
'(--hide=-)--hide=-[comma-separated list of output levels to hide]: :->levels' \
'(--show=-)--show=-[comma-separated list of output levels to show]: :->levels' \
'*::: :->subcmds' && return 0
if [[ CURRENT -ge 1 ]]; then
case $state in
noargs)
_message "nothing to complete";;
levels)
_describe -t commands "output levels" output_levels;;
*)
_targets;;
esac
return
fi
_arguments \
'--complete[Print tab-completion candidates for given parse remainder]' \
"--hide=[Set default value of run()'s 'hide' kwarg]:str" \
'(- *)--list-agent-keys[Display ssh-agent key list, and exit]' \
'--no-dedupe[Disable task deduplication]' \
'--print-completion-script=[Print the tab-completion script for your preferred shell]:shell:(bash zsh fish)' \
'--prompt-for-login-password[Request an upfront SSH-auth password prompt]' \
'--prompt-for-passphrase[Request an upfront SSH key passphrase prompt]' \
'--prompt-for-sudo-password[Prompt user at start of session for the sudo.password config value]' \
'--write-pyc[Enable creation of .pyc files]' \
'(-c --collection)'{-c,--collection=}'[Specify collection name to load]:name' \
'(-d --debug)'{-d,--debug}'[Enable debug output]' \
'(-D --list-depth)'{-D,--list-depth=}'[When listing tasks, only show the first INT levels]:level' \
'(-e --echo)'{-e,--echo}'[Echo executed commands before running]' \
'(-f --config)'{-f,--config=}'[Runtime configuration file to use]:file:_files' \
'(-F --list-format)'{-F,--list-format=}'[Change the display format used when listing tasks]:format:(flat nested json)' \
'(- *)'{-h,--help=-}'[Show core or per-task help and exit]::task:_fab_tasks' \
'(-H --hosts)'{-H,--hosts=}'[Comma-separated host name(s) to execute tasks against]:host' \
\*{-i,--identity=}'[Path to runtime SSH identity (key) file]:file:_files' \
'(-l --list)'{-l,--list=-}'[List available tasks, optionally limited to a namespace]::namespace' \
'(-p --pty)'{-p,--pty}'[Use a pty when executing shell commands]' \
'(-r --search-root)'{-r,--search-root=}'[Change root directory used for finding task modules]:dir:_files -/' \
'(-R --dry)'{-R,--dry}'[Echo commands instead of running]' \
'(-S --ssh-config)'{-S,--ssh-config=}'[Path to runtime SSH config file]:file:_files' \
'(-t --connect-timeout)'{-t,--connect-timeout=}'[Specifies default connection timeout, in seconds]:seconds' \
'(-T --command-timeout)'{-T,--command-timeout=}'[Specify a global command execution timeout, in seconds]:seconds' \
'(- *)'{-V,--version}'[Show version and exit]' \
'(-w --warn-only)'{-w,--warn-only}'[Warn, instead of failing, when shell commands fail]' \
'*::task:_fab_tasks'
# Local Variables:
# mode: Shell-Script

View File

@ -54,7 +54,7 @@ _fail2ban_client() {
'-b[start server in background]' \
'-f[start server in foreground]' \
'--str2sec[convert time abbreviation format to seconds]:_message str2sec' \
'(-h --help)'{-h,--help}'[display this help message]' \
'(-h --help)'{-h,--help}'[display help message]' \
'(-V --version)'{-V,--version}'[print the version]' \
'1:fail2ban command:_fail2ban_client_commands' \
'*:fail2ban command argument:_fail2ban_client_command_arguments'

View File

@ -38,16 +38,16 @@
# ------------------------------------------------------------------------------
_arguments \
'(-c --collapse-range)'{-c,--collapse-range}'[Removes a byte range from a file without leaving a hole]' \
'(-d --dig-holes)'{-d,--dig-holes}'[Detect and dig holes]' \
'(-c --collapse-range -d --dig-holes -p --punch-hole -z --zero-range -n --keep-size)'{-c,--collapse-range}'[Removes a byte range from a file without leaving a hole]' \
'(-c --collapse-range -d --dig-holes -p --punch-hole -z --zero-range -n --keep-size)'{-d,--dig-holes}'[Detect and dig holes]' \
'(-c --collapse-range -d --dig-holes -p --punch-hole -z --zero-range -n --keep-size)'{-p,--punch-hole}'[Deallocates space in the byte range starting at offset and continuing for length bytes]' \
'(-c --collapse-range -d --dig-holes -p --punch-hole -z --zero-range )'{-z,--zero-range}'[Zeroes space in the byte range starting at offset and continuing for length bytes]' \
'(-c --collapse-range -d --dig-holes -p --punch-hole -n --keep-size)'{-n,--keep-size}'[Do not modify the apparent length of the file]' \
'(-i --insert-range)'{-i,--insert-range}'[Insert a hole of length bytes from offset]' \
'(-l --length)'{-l+,--length}'[Specifies the length of the range, in bytes]:bytes' \
'(-n --keep-size)'{-n,--keep-size}'[Do not modify the apparent length of the file]' \
'(-o --offset)'{-o+,--offset}'[Specifies the beginning offset of the range, in bytes]:offset' \
'(-p --punch-hole)'{-p,--punch-hole}'[Deallocates space in the byte range starting at offset and continuing for length bytes]' \
'(-v --verbose)'{-v,--verbose}'[Enable verbose mode]' \
'(-x --posix)'{-x,--posix}'[Enable POSIX operation mode]' \
'(-z --zero-range)'{-z,--zero-range}'[Zeroes space in the byte range starting at offset and continuing for length bytes]' \
'(- *)'{-h,--help}'[Display help text and exit]' \
'(- *)'{-V,--version}'[Print version and exit]' \
'*:filename:_files'

65
src/_fish Normal file
View File

@ -0,0 +1,65 @@
#compdef fish
# ------------------------------------------------------------------------------
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for fish 4.6.0 (https://fishshell.com/)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_fish_debug_categories() {
local -a categories=(${(f)"$(fish --print-debug-categories | awk '{n=$1;$1="";printf("%s[%s]\n",n,substr($0,2)) }')"})
_values -s ',' categories $categories
}
_arguments -s \
'(-c --command)'{-c,--command=}'[Evaluate the specified commands instead of reading from the commandline]:command' \
'(-C --init-command)'{-C,--init-command=}'[Evaluate specified commands after reading the configuration]:command' \
'(-d --debug)'{-d,--debug=}'[Enable debug output and specify a pattern for matching categories]:categories:_fish_debug_categories' \
'(-i --interactive)'{-i,--interactive}'[The shell is interactive]' \
'(-l --login)'{-l,--login}'[Act as if invoked as a login shell]' \
'(-N --no-config)'{-N,--no-config}'[Do not read configuration files]' \
'(-n --no-execute)'{-n,--no-execute}'[Do not execute any commands, only perform syntax checking]' \
'(-p --profile)'{-p,--profile=}'[Output timing information on all executed commands to the specified file]:file:_files' \
'--profile-startup=[Write timing for fish startup to specified file]:file:_files' \
'(-P --private)'{-P,--private}'[Enable private mode]' \
'--print-rusage-self[When fish exits, output stats from getrusage]' \
'(- *)--print-debug-categories[Print all debug categories, and then exit]' \
'(- *)'{-v,--version}'[Print version and exit]' \
'(-f --features)'{-f,--features}'[Enable one or more comma-separated feature flags]:features' \
'*:: :_files'
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -922,7 +922,7 @@ _ghc_pkg() {
'--expand-env-vars[expand environment variables in input package descriptions]'
'(--expand-pkgroot --no-expand-pkgroot)--expand-pkgroot[expand pkgroot-relative paths in output package descriptions]'
'(--expand-pkgroot --no-expand-pkgroot)--no-expand-pkgroot[preserve pkgroot-relative paths in output package descriptions]'
'(- *)'{-?,--help}'[display this help and exit]'
'(- *)'{-?,--help}'[display help and exit]'
'(- *)'{-V,--version}'[output version information and exit]'
'--simple-output[print output in easy-to-parse format for some commands]'
'--show-unit-ids[print unit-ids instead of package identifiers]'

View File

@ -40,10 +40,10 @@
#
# ------------------------------------------------------------------------------
local curcontext="$curcontext" state line ret=1
typeset -A opt_args
_gist() {
local ret=1
_arguments -C \
_arguments \
'(--login)--login[Authenticate gist on this computer.]' \
'(-f --filename)'{-f,--filename}'[Sets the filename and syntax type.]:NAME' \
'(-t --type)'{-t,--type}'[Sets the file extension and syntax type.]:EXT' \
@ -51,27 +51,32 @@ _arguments -C \
'(--no-private -p --private)--no-private[Makes your gist no private.]' \
'(-d --description)'{-d,--description}'[Adds a description to your gist.]:DESCRIPTION' \
'(-s --shorten)'{-s,--shorten}'[Shorten the gist URL using git.io.]' \
'(-u --update)'{-u,--update}'[Update an existing gist.]:URL ID:user_gists' \
'(-u --update)'{-u,--update}'[Update an existing gist.]:URL ID:_gist_ids' \
'(-c --copy)'{-c,--copy}'[Copy the resulting URL to the clipboard]' \
'(-e --embed)'{-e,--embed}'[Copy the embed code for the gist to the clipboard]' \
'(-o --open --no-open)'{-o,--open}'[Open the resulting URL in a browser]' \
'(--no-open -o --open)--no-open[No open the resulting URL in a browser]' \
'--skip-empty[Skip gisting empty files]' \
'(-P --paste)'{-P,--paste}'[Paste from the clipboard to gist]' \
'(-R --raw)'{-R,--raw}'[Display raw URL of the new gist]' \
'(-l --list)'{-l,--list}'[List all gists for user ]::user' \
'(-h --help)'{-h,--help}'[print options help]' \
'--delete[Delete a gist]:id:_gist_ids' \
'(- *)'{-h,--help}'[print options help]' \
'(-v --version)'{-v,--version}'[print version]' \
'(-r --read)'{-r,--read}'[Read a gist and print out the contents]:user gists:_gist_read_gists' \
'(-r --read)'{-r,--read}'[Read a gist and print out the contents]:user gists:_gist_ids' \
'*: :_files' && ret=0
return ret
}
_gist_cache_policy() {
# rebuild if cache is more than a day old
local -a oldp
oldp=( "$1"(mh+1) )
oldp=( "$1"(m+1) )
(( $#oldp ))
}
_gist_read_gists() {
_gist_ids() {
local update_policy ret=1
zstyle -s ":completion:${curcontext}:" cache-policy update_policy
if [[ -z "$update_policy" ]]; then
@ -79,43 +84,33 @@ _gist_read_gists() {
fi
# stores the gists of the logged in user in the format ID[Description]
_list=()
_cached_gists="user_gists"
local -a gist_list
# retrieve/Write gists from/to cache
if _cache_invalid $_cached_gists || ! _retrieve_cache $_cached_gists; then
_gists=$(gist -l)
if _cache_invalid gist_cached_list || ! _retrieve_cache gist_cached_list; then
if (( $+commands[ruby] )); then
gist_list=(${(f)"$(gist -l | ruby -ne 'puts "#{$1}:#{$2}" if $_ =~ %r{/([^/ ]+)\s+(.+)}')"})
elif (( $+commands[perl])); then
gist_list=(${(f)"$(gist -l | perl -wln -e 'm{/([^/ ]+)\s+(.+)} and print qq($1:$2)')"})
fi
if [ $? -eq 0 ]; then
_store_cache $_cached_gists _gists
if [[ $? -eq 0 ]]; then
_store_cache gist_cached_list gist_list
else
# some error occurred, the user is probably not logged in
# set _gists to an empty string so that no completion is attempted
_gists=""
gist_list=()
fi
else
_retrieve_cache $_cached_gists
fi
if [ -n "$_gists" ]; then
echo "$_gists" | while read -r line; do
# Splitting the gist -l output
url="$(echo "$line" | cut -d " " -f 1 | cut -d "/" -f 4)"
# gists w/o descriptions can have only one column in the output, those
# have their description set to an empty string
description="$(echo "$line" | awk '{if(NF > 1){$1=""; print $0}}')"
_list+=( "${url}[${description}]" )
done
_values "gists" $_list
ret=0
if [[ $#gist_list ]]; then
_describe -t gist_ids 'gist_ids' gist_list
fi
return ret
}
return ret
_gist "$@"
# Local Variables:
# mode: Shell-Script

View File

@ -40,9 +40,7 @@
#
# ------------------------------------------------------------------------------
_git-flow ()
{
_git-flow () {
local curcontext="$curcontext" state line
typeset -A opt_args
@ -52,7 +50,6 @@ _git-flow ()
case $state in
(command)
local -a subcommands
subcommands=(
'init:Initialize a new git repo with support for the branching model.'
@ -67,28 +64,22 @@ _git-flow ()
(options)
case $line[1] in
(init)
_arguments \
-f'[Force setting of gitflow branches, even if already configured]' \
-d'[Use default branch naming conventions and prefixes]'
;;
(version)
;;
(hotfix)
__git-flow-hotfix
;;
(release)
__git-flow-release
;;
(feature)
__git-flow-feature
;;
(support)
__git-flow-support
;;
@ -98,8 +89,7 @@ _git-flow ()
esac
}
__git-flow-release ()
{
__git-flow-release () {
local curcontext="$curcontext" state line
typeset -A opt_args
@ -109,7 +99,6 @@ __git-flow-release ()
case $state in
(command)
local -a subcommands
subcommands=(
'start:Start a new release branch.'
@ -125,13 +114,11 @@ __git-flow-release ()
(options)
case $line[1] in
(start)
_arguments \
-F'[Fetch from origin before performing finish]'\
':version:__git_flow_version_list'
;;
(finish)
_arguments \
-F'[Fetch from origin before performing finish]' \
@ -143,19 +130,14 @@ __git-flow-release ()
-k'[Keep branch after performing finish]'\
':version:__git_flow_version_list'
;;
(publish)
_arguments \
':version:__git_flow_version_list'
;;
(track)
_arguments \
':version:__git_flow_version_list'
;;
*)
_arguments \
-v'[Verbose (more) output]'
@ -165,8 +147,7 @@ __git-flow-release ()
esac
}
__git-flow-hotfix ()
{
__git-flow-hotfix () {
local curcontext="$curcontext" state line
typeset -A opt_args
@ -176,7 +157,6 @@ __git-flow-hotfix ()
case $state in
(command)
local -a subcommands
subcommands=(
'start:Start a new hotfix branch.'
@ -191,12 +171,11 @@ __git-flow-hotfix ()
(options)
case $line[1] in
(start)
_arguments \
-F'[Fetch from origin before performing finish]'\
':hotfix:__git_flow_version_list'\
':branch-name:__git_branch_names'
':branch-name:__git_flow_branch_names'
;;
(finish)
@ -223,8 +202,7 @@ __git-flow-hotfix ()
esac
}
__git-flow-feature ()
{
__git-flow-feature () {
local curcontext="$curcontext" state line
typeset -A opt_args
@ -234,7 +212,6 @@ __git-flow-feature ()
case $state in
(command)
local -a subcommands
subcommands=(
'start:Start a new feature branch.'
@ -254,12 +231,11 @@ __git-flow-feature ()
(options)
case $line[1] in
(start)
_arguments \
-F'[Fetch from origin before performing finish]'\
':feature:__git_flow_feature_list'\
':branch-name:__git_branch_names'
':branch-name:__git_flow_branch_names'
;;
(finish)
@ -283,13 +259,13 @@ __git-flow-feature ()
(diff)
_arguments \
':branch:__git_branch_names'\
':branch:__git_flow_branch_names'\
;;
(rebase)
_arguments \
-i'[Do an interactive rebase]' \
':branch:__git_branch_names'
':branch:__git_flow_branch_names'
;;
(checkout)
@ -299,8 +275,8 @@ __git-flow-feature ()
(pull)
_arguments \
':remote:__git_remotes'\
':branch:__git_branch_names'
':remote:__git_flow_remote'\
':branch:__git_flow_branch_names'
;;
*)
@ -312,8 +288,7 @@ __git-flow-feature ()
esac
}
__git-flow-support ()
{
__git-flow-support() {
local curcontext="$curcontext" state line
typeset -A opt_args
@ -341,7 +316,7 @@ __git-flow-support ()
_arguments \
-F'[Fetch from origin before performing finish]'\
':feature:__git_flow_support_list'\
':branch-name:__git_branch_names'
':branch-name:__git_flow_branch_names'
;;
*)
@ -353,36 +328,30 @@ __git-flow-support ()
esac
}
__git_flow_version_list ()
{
__git_flow_version_list() {
local expl
declare -a versions
versions=(${${(f)"$(_call_program versions git flow release list 2> /dev/null | tr -d ' |*')"}})
__git_command_successful || return
local -a versions=(${${(f)"$(_call_program versions git flow release list 2> /dev/null | tr -d ' |*')"}})
__git_flow_command_successful || return
_wanted versions expl 'version' compadd $versions
}
__git_flow_feature_list ()
{
__git_flow_feature_list() {
local expl
declare -a features
features=(${${(f)"$(_call_program features git flow feature list 2> /dev/null | tr -d ' |*')"}})
__git_command_successful || return
local -a features=(${${(f)"$(_call_program features git flow feature list 2> /dev/null | tr -d ' |*')"}})
__git_flow_command_successful || return
_wanted features expl 'feature' compadd $features
}
__git_remotes () {
__git_flow_remote() {
local expl gitdir remotes
gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null)
__git_command_successful || return
__git_flow_command_successful || return
remotes=(${${(f)"$(_call_program remotes git config --get-regexp '"^remote\..*\.url$"')"}//#(#b)remote.(*).url */$match[1]})
__git_command_successful || return
__git_flow_command_successful || return
# TODO: Should combine the two instead of either or.
if (( $#remotes > 0 )); then
@ -392,40 +361,31 @@ __git_remotes () {
fi
}
__git_flow_hotfix_list ()
{
__git_flow_hotfix_list() {
local expl
declare -a hotfixes
hotfixes=(${${(f)"$(_call_program hotfixes git flow hotfix list 2> /dev/null | tr -d ' |*')"}})
__git_command_successful || return
local -a hotfixes=(${${(f)"$(_call_program hotfixes git flow hotfix list 2> /dev/null | tr -d ' |*')"}})
__git_flow_command_successful || return
_wanted hotfixes expl 'hotfix' compadd $hotfixes
}
__git_flow_support_list ()
{
__git_flow_support_list() {
local expl
declare -a support
support=(${${(f)"$(_call_program support git flow support list 2> /dev/null | tr -d ' |*')"}})
__git_command_successful || return
local -a support=(${${(f)"$(_call_program support git flow support list 2> /dev/null | tr -d ' |*')"}})
__git_flow_command_successful || return
_wanted hotfixes expl 'support' compadd $support
}
__git_branch_names () {
__git_flow_branch_names() {
local expl
declare -a branch_names
branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/})
__git_command_successful || return
local -a branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/})
__git_flow_command_successful || return
_wanted branch-names expl branch-name compadd $* - $branch_names
}
__git_command_successful () {
__git_flow_command_successful() {
if (( ${#pipestatus:#0} > 0 )); then
_message 'not a git repository'
return 1

View File

@ -41,7 +41,7 @@
_glances() {
_arguments \
'(- *)'{-h,--help}'[show this help message and exit]' \
'(- *)'{-h,--help}'[show help message and exit]' \
'--print-completion[print shell completion script]:shell:(bash zsh tcsh)' \
'(- *)'{-V,--version}"[show program's version number and exit]" \
'(-d --debug)'{-d,--debug}'[enable debug mode]' \

View File

@ -44,7 +44,7 @@
#
# ------------------------------------------------------------------------------
__go_buildmodes() {
__golang_buildmodes() {
local -a buildmodes=(
'archive[non-main packages into .a files]'
'c-archive[main package, plus all packages it imports, into a C archive file]'
@ -59,7 +59,7 @@ __go_buildmodes() {
_values 'mode' $buildmodes
}
__go_runtimedebug() {
__golang_runtimedebug() {
local -a vars=(
'allocfreetrace[profile allocations]:boolean:(1 0)'
'clobberfree[clobber memory after free]:boolean:(1 0)'
@ -84,7 +84,7 @@ __go_runtimedebug() {
_values -s ',' -S '=' "runtime debug behavior" $vars[@]
}
__go_gcdebugflags() {
__golang_gcdebugflags() {
_values -s , -S = 'debug flag' \
'append[print information about append compilation]' \
'checkptr[instrument unsafe pointer conversions]:pointer conversion checks:((0\:"instrumentation disabled" 1\:"conversions involving unsafe.Pointer are instrumented" 2\:"conversions to unsafe.Pointer force heap allocation"))' \
@ -109,7 +109,7 @@ __go_gcdebugflags() {
'ssa/help[print help about SSA debugging]'
}
__go_gcflags() {
__golang_gcflags() {
_arguments \
'-%[debug non-static initializers]' \
'-c=[concurrency during compilation]:int' \
@ -131,7 +131,7 @@ __go_gcflags() {
'-buildid=[record id as the build id in the export metadata]:id' \
'-complete[compiling complete package (no C or assembly)]' \
'-cpuprofile=[write cpu profile to file]:file' \
'-d=[print debug information about items in list; try -d help]:list: __go_gcdebugflags' \
'-d=[print debug information about items in list; try -d help]:list: __golang_gcdebugflags' \
'-dwarf[generate DWARF symbols (default true)]' \
'-dwarfbasentries[use base address selection entries in DWARF (default true)]' \
'-dwarflocationlists[add location lists to DWARF in optimized mode (default true)]' \
@ -173,7 +173,7 @@ __go_gcflags() {
'-wb[enable write barrier (default true)]'
}
__go_pgo() {
__golang_pgo() {
_alternative \
"name:name:(auto off)" \
"file:file:_files"
@ -203,9 +203,9 @@ local -a commands=(
'help:get more information about a command'
)
__go_envvarvals() {
# if __go_envvarvals is called for -value-, I use the function argument to
# decide which variable to go to. if $1 is not set, then __go_envvarvals is
__golang_envvarvals() {
# if __golang_envvarvals is called for -value-, I use the function argument to
# decide which variable to go to. if $1 is not set, then __golang_envvarvals is
# called from the `go env` completion and the current word (with all after
# the first '=' removed) is the current variable.
local env_variable=${1-${words[$CURRENT]%%=*}}
@ -276,7 +276,7 @@ __go_envvarvals() {
_dispatch $service -value-,${variable#CGO_},-default-
;;
(GODEBUG)
__go_runtimedebug
__golang_runtimedebug
;;
(GOFLAGS)
# not implemented, sorry
@ -294,7 +294,7 @@ __go_envvarvals() {
esac
}
__go_packages() {
__golang_packages() {
local -a gopaths=("${(s/:/)$(go env GOPATH)}")
gopaths+=("$(go env GOROOT)")
for p in $gopaths; do
@ -312,7 +312,7 @@ __go_packages() {
fi
}
__go_fix_analyzers() {
__golang_fix_analyzers() {
local -a fix_analyzers=(
"any[replace interface{} with any]"
"buildtag[check //go:build and // +build directives]"
@ -341,7 +341,7 @@ __go_fix_analyzers() {
_values 'analyzer' $fix_analyzers
}
__go_pprof_symbolize_types() {
__golang_pprof_symbolize_types() {
local -a symbolize_types=(
"none[Do not attempt symbolization]"
"local[Examine only local binaries]"
@ -360,7 +360,7 @@ if [[ "$service" = -value-* ]]; then
if (($blacklist[(I)$env_variable])); then
return
fi
__go_envvarvals $env_variable
__golang_envvarvals $env_variable
return
fi
@ -382,16 +382,16 @@ case $state in
'-work[print temporary work directory and keep it]'
'-x[print the commands]'
'-asmflags[arguments for each go tool asm invocation]:flags'
'-buildmode[build mode to use]:mode:__go_buildmodes'
'-buildmode[build mode to use]:mode:__golang_buildmodes'
'-buildvcs[stamp binaries with version control information]:mode:(internal external auto)'
'-compiler[name of compiler to use]:name'
'-gccgoflags[arguments for gccgo]:args'
'*-gcflags=[arguments for each go tool compile invocation]:args:__go_gcflags'
'*-gcflags=[arguments for each go tool compile invocation]:args:__golang_gcflags'
'-installsuffix[suffix to add to package directory]:suffix'
'-ldflags[arguments to pass on each go tool link invocation.]:flags'
'-linkshared[link against shared libraries]'
'-overlay[read a JSON config file that provides an overlay for build operations]:file:_files -g "*.json"'
'-pgo[specify the file path of a profile for profile-guided optimization]:file_or_profile:__go_pgo'
'-pgo[specify the file path of a profile for profile-guided optimization]:file_or_profile:__golang_pgo'
'-pkgdir[install and load all packages from dir]:dir'
'-tags[list of build tags to consider satisfied]:tags'
'-trimpath[remove all file system paths from the resulting executable]'
@ -425,7 +425,7 @@ case $state in
'help:get more information about a command'
)
local -a fix_flags=(
'-fixtool=[specify fix analyzer]:analyzer:__go_fix_analyzers'
'-fixtool=[specify fix analyzer]:analyzer:__golang_fix_analyzers'
'-diff[display diffs instead of rewriting files]'
'-fixtool=[select analysis tool]:analyzer:'
'(- *)-V[print version and exit]'
@ -464,7 +464,7 @@ case $state in
'-json[emit build output in JSON suitable for automated processing]' \
${build_flags[@]} \
${mod_flags[@]} \
'*:importpaths:__go_packages'
'*:importpaths:__golang_packages'
;;
(clean)
@ -477,7 +477,7 @@ case $state in
'-fuzzcache[remove files stored in the Go build cache for fuzz testing]' \
${build_flags[@]} \
${mod_flags[@]} \
'*:importpaths:__go_packages'
'*:importpaths:__golang_packages'
;;
(doc)
@ -489,7 +489,7 @@ case $state in
'-short[one-line representation for each symbol]' \
'-src[show the full source code for the symbol]' \
'-u[show docs for unexported and exported symbols and methods]' \
'*:importpaths:__go_packages'
'*:importpaths:__golang_packages'
;;
(env)
@ -569,12 +569,12 @@ case $state in
)
local -a exclude_from_w=(GOENV)
__go_list_env_vars() {
__golang_list_env_vars() {
# the parameter expansion strops off everything after the first [
_values -s ' ' -w 'environment variable' ${goenvvars[@]%%\[*}
}
# the ^ parameter expansion appends ": __go_envvarvals" to every element of goenvvars
# the ^ parameter expansion appends ": __golang_envvarvals" to every element of goenvvars
# the :# parameter expansion removes all elements matching GOENV*
[[ $words[2] != '-w' ]] && _arguments \
'-C[change to directory before running the command]: :_files -/' \
@ -582,15 +582,15 @@ case $state in
'-changed[prints only those settings whose effective value differs from the default value]' \
'-u[unset environment variables]' \
'-w[change the default setting of environment variables]' \
'*:[show environment variable]: __go_list_env_vars' || _values \
-s ' ' -S "=" -w 'environment variable' ${^goenvvars:#GOENV*}": __go_envvarvals"
'*:[show environment variable]: __golang_list_env_vars' || _values \
-s ' ' -S "=" -w 'environment variable' ${^goenvvars:#GOENV*}": __golang_envvarvals"
;;
(fix)
_arguments \
'-C[change to directory before running the command]: :_files -/' \
$fix_flags[@] \
'*:importpaths:__go_packages'
'*:importpaths:__golang_packages'
;;
(fmt)
@ -599,7 +599,7 @@ case $state in
'-n[print commands that would be executed]' \
'-x[print commands as they are executed]' \
'-mod=[set which download mode to use]:mode:(readonly vendor)' \
'*:importpaths:__go_packages'
'*:importpaths:__golang_packages'
;;
(generate)
@ -610,7 +610,7 @@ case $state in
'-n[print the commands but do not run them]' \
'-v[print the names of packages as they are compiled]' \
${build_flags[@]} \
"*:args:{ _alternative ':importpaths:__go_packages' _files }"
"*:args:{ _alternative ':importpaths:__golang_packages' _files }"
;;
(get)
@ -620,13 +620,13 @@ case $state in
'-u[use the network to update the named packages]' \
'-tool[instructs go to add a matching tool line to go.mod for each listed package]' \
${build_flags[@]} \
'*:importpaths:__go_packages'
'*:importpaths:__golang_packages'
;;
(install)
_arguments \
${build_flags[@]} \
'*:importpaths:__go_packages'
'*:importpaths:__golang_packages'
;;
(list)
@ -642,7 +642,7 @@ case $state in
'-m[list modules instead of packages]'
${build_flags[@]}
${mod_flags[@]}
'*:importpaths:__go_packages'
'*:importpaths:__golang_packages'
)
# -u and -versions are only available if -m is present on the commandline
if (($words[(I)-m])); then
@ -684,7 +684,7 @@ case $state in
(init)
# Use go packages as module name suggestion
_arguments \
'*:module:__go_packages'
'*:module:__golang_packages'
;;
(tidy)
_arguments \
@ -705,7 +705,7 @@ case $state in
_arguments \
'-m[treats the arguments as a list of modules]' \
'-vendor[exclude tests of dependencies]' \
'*:module:__go_packages'
'*:module:__golang_packages'
;;
esac
;;
@ -716,7 +716,7 @@ case $state in
_arguments \
${build_flags[@]} \
'-exec[invoke the binary using xprog]:xporg' \
'*:importpaths:__go_packages'
'*:importpaths:__golang_packages'
;;
(telemetry)
@ -803,7 +803,7 @@ case $state in
${build_flags[@]} \
'-exec[run test binary using xprog]:xprog' \
'-o[compile test binary to named file]:file:_files' \
'*:importpaths:__go_packages'
'*:importpaths:__golang_packages'
fi
;;
@ -963,7 +963,7 @@ case $state in
(fix)
if [[ $words[2] == "help" ]]; then
__go_fix_analyzers
__golang_fix_analyzers
else
_arguments \
"*:args:{ _alternative ':subcommand:(help)' _files }"
@ -1119,7 +1119,7 @@ case $state in
'-add_comment=[free-form annotation to add to the profile]:comment' \
'-diff_base=[source of base profile for comparison]:source:_files' \
'-base[show delta from this profile]:profile' \
'-symbolize=[controls source of symbol information]:source:__go_pprof_symbolize_types' \
'-symbolize=[controls source of symbol information]:source:__golang_pprof_symbolize_types' \
'-tls_cert=[TLS client certificate file for fetchign profile and symbols]:file:_files' \
'-tls_key=[TLS private key file for fetching profile and symbols]:file:_files' \
'-tls_ca=[TLS CA certs file for fetching profile and symbols]:file:_files' \
@ -1215,7 +1215,7 @@ case $state in
'-x[prints commands as they are executed]' \
'-vettool[set a different analysis tool with alternative or additional checks]:prog:_files' \
${build_flags[@]} \
'*:importpaths:__go_packages'
'*:importpaths:__golang_packages'
;;
(work)

83
src/_h2load Normal file
View File

@ -0,0 +1,83 @@
#compdef h2load
# ------------------------------------------------------------------------------
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for h2load 1.64.0 (https://github.com/nghttp2/nghttp2)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_arguments \
'(-n --requests)'{-n,--requests=}'[Number of requests across all clients(Default 1)]:num' \
'(-c --clients)'{-c,--clients=}'[Number of concurrent clients(Default 1)]:num' \
'(-t --threads)'{-t,--threads=}'[Number of native threads(Default 1)]:num' \
'(-i --input-file)'{-i,--input-file=}'[Path of a file with multiple URIs are separated by EOLs]:file:_files' \
'(-m --max-concurrent-streams)'{-m,--max-concurrent-streams=}'[Max concurrent streams to issue per session(Default 1)]:num' \
'(-f --max-frame-size)'{-f,--max-frame-size=}'[Maximum frame size that the local endpoint is willing to receive(Default 16K)]:size' \
'(-w --window-bits)'{-w,--window-bits=}'[Set the stream level initial window size to (2**n)-1(Default 30)]:num' \
'(-W --connection-window-bits)'{-W,--connection-window-bits=}'[Set the connection level initial window size to (2**n)-1(Default 30)]:num' \
\*{-H,--header=}'[Add/Override a header to the requests]:header' \
'--ciphers=[Set allowed cipher list for TLSv1.2 or earlier]:cipher_list' \
'--tls13-ciphers=[Set allowed cipher list for TLSv1.3]:cipher_list' \
'(-p --no-tls-proto)'{-p,--no-tls-proto=}'[Specify ALPN identifier of the protocol to used when accessing without SSL/TLS(Default h2c)]:protoid' \
'(-d --data)'{-d,--data=}'[POST file to server]:file:_files' \
'(-r --rate)'{-r,--rate=}'[Specify the fixed rate at which connections are created]:num' \
'--rate-period=[Specify the time period between creating connections]:num' \
'(-D --duration)'{-D,--duration=}'[Specify the main duration for the measurements]:duration' \
'--warm-up-time[Specify the time period before starting the actual measurements]:duration' \
'(-T --connection-active-timeout)'{-T,--connection-active-timeout=}'[Specify the maximum time that h2load is willing to keep a connection open]:duration' \
'(-N --connection-inactivity-timeout)'{-N,--connection-inactivity-timeout=}'[Specify the amount of time that h2load willing to wait to see activity on a given connection]:duration' \
'(--timing-script-file --rps)--timing-script-file=[Path of a timing script file]:file:_files' \
'(-B --base-uri)'{-B,--base-uri=}'[Specify URI from which the scheme, host and port will be used for all requests]:uri:_urls' \
'--alpn-list=[Comma delimited list of ALPN protocol identifier sorted in the order of preference]:alpn_list' \
'--h1[Short hand for --alpn-list=http/1.1 --no-tls-proto=http/1.1]' \
'--header-table-size=[Specify decoder header table size(Default 4K)]:size' \
'--encoder-header-table-size=[Specify encoder header table size(Default 4K)]:size' \
'--log-file=[Path of a request information]:file:_files' \
'--qlog-file-base=[Enable qlog output and specify base file name for qlogs]:file:_files' \
'--connect-to=[Host and port to connect]:host_port' \
'(--timing-script-file --rps)--rps=[Specify request per second for each client]:num' \
'--groups=[Specify the supported groups]:groups' \
'--no-udp-gso[Disable UDP GSO]' \
'--max-udp-payload-size=[Specify the maximum outgoing UDP datagram payload size]:size' \
'--ktls[Enable ktls]' \
'--sni=[Send given DNS name in TLS SNI]:dns_name' \
'(-v --verbose)'{-v,--verbose}'[Output debug information]' \
'(- *)--version[Display version information and exit]' \
'(- *)'{-h,--help}'[Display help and exit]' \
'*:: :_urls'
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -13,7 +13,16 @@
#
# ------------------------------------------------------------------------------
_arguments -s '(- *)'{-h,--help}'[display this help and exit]' \
_arguments -s \
'(- *)'{-h,--help}'[display help and exit]' \
'(- *)'{-v,--version}'[display version information and exit]' \
{-t,--traditional}'[use traditional greeting]' \
{-g,--greeting=}'[use TEXT as the greeting message]:TEXT'
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -64,7 +64,7 @@ args=(
'--forecast=[apply periodic transaction rules to generate future transactions]'
)
_arguments -C "$args[@]" -A "-*" \
_arguments -C -A "-*" "$args[@]" \
'(- *)--version[print version information]' \
'--debug[show debug output]' \
'1: :->cmds' \
@ -284,3 +284,11 @@ while (( $#state )); do
done
return ret
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -21,7 +21,7 @@ _inxi() {
local curcontext="$curcontext"
local ret=1
local colors=($(seq 0 42))
local -a colors=({0..42})
_arguments -C -s \
'(-A --audio)'{-A,--audio}"[Show Audio/sound card(s) information]" \

View File

@ -54,7 +54,7 @@ _kitchen() {
args)
case $line[1] in
converge|create|destroy|diagnose|list|setup|test|verify)
compadd 'all'
_wanted all-instances expl 'all instances' compadd 'all'
_kitchen_instances
;;
login)
@ -84,3 +84,11 @@ _kitchen_instances() {
}
_kitchen "$@"
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -90,7 +90,7 @@ case $state in
'gs-load-lily-fonts[load only LilyPond fonts via Ghostscript]:gs-load-lily-fonts:(\#t \#f)' \
'gs-never-embed-fonts[make Ghostscript embed only TrueType fonts and no other font format]:gs-never-embed-fonts:(\#t \#f)' \
'gui[run LilyPond from a GUI and redirect stderr to a log file]:gui:(\#t \#f)' \
'help[show this help]:help:(\#t \#f)' \
'help[show help]:help:(\#t \#f)' \
'include-book-title-preview[include book titles in preview images]:include-book-title-preview:(\#t \#f)' \
'include-eps-fonts[include fonts in separate-system EPS files]:include-eps-fonts:(\#t \#f)' \
'include-settings[included file before the score is processed]:include-settings:_files -g "*.(#i)ly(-.)"' \

View File

@ -80,7 +80,7 @@ _lscpu_cache() {
}
_arguments \
'(- *)'{-h,--help}'[display this help]' \
'(- *)'{-h,--help}'[display help]' \
'(- *)'{-V,--version}'[display version]' \
'(-a --all)'{-a,--all}'[print both online and offline CPUs(default for -e)]' \
'(-b --online)'{-b,--online}'[print online CPUs only]' \

View File

@ -91,7 +91,7 @@ _lsipc_output_columns() {
}
_arguments \
'(- *)'{-h,--help}'[display this help]' \
'(- *)'{-h,--help}'[display help]' \
'(- *)'{-V,--version}'[display version]' \
'(-m --shmems)'{-m,--shmems}'[shared memory segments]' \
'(-M --posix-shmems)'{-M,--posix-shmems}'[POSIX shared memory segments]' \

View File

@ -56,7 +56,7 @@ _lslocks_output_columns() {
}
_arguments \
'(- *)'{-h,--help}'[display this help]' \
'(- *)'{-h,--help}'[display help]' \
'(- *)'{-V,--version}'[display version]' \
'(-b --bytes)'{-b,--bytes}'[print SIZE in bytes rather]' \
'(-J --json)'{-J,--json}'[use the JSON output format]' \

View File

@ -70,7 +70,7 @@ _lslogins_output_columns() {
}
_arguments \
'(- *)'{-h,--help}'[display this help]' \
'(- *)'{-h,--help}'[display help]' \
'(- *)'{-V,--version}'[display version]' \
'(-a --acc-expiration)'{-a,--acc-expiration}'[display info about passwords expiration]' \
'(-c --colon-separate)'{-c,--colon-separate}'[display data in a format similar to /etc/passwd]' \

View File

@ -50,7 +50,7 @@ _lsmem_output_columns() {
}
_arguments \
'(- *)'{-h,--help}'[display this help]' \
'(- *)'{-h,--help}'[display help]' \
'(- *)'{-V,--version}'[display version]' \
'(-J --json)'{-J,--json}'[use the JSON output format]' \
'(-P --pairs)'{-P,--pairs}'[use key=value output format]' \

View File

@ -37,7 +37,7 @@
_arguments \
{-f,--file}'[Use file as as cookie seed]:file:_files' \
{-m,--max-size}'[Set maximum length of output]:number' \
{-m,--max-size}'[Set maximum length of output]:bytes' \
{-v,--verbose}'[Print entropy source and random seed info]' \
'(- *)'{-h,--help}'[Display help message and exit]' \
'(- *)'{-V,--version}'[Display version information and exit]'

View File

@ -154,3 +154,11 @@ case $state in
esac
return ret
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

1135
src/_mix

File diff suppressed because it is too large Load Diff

View File

@ -106,3 +106,11 @@ _describe 'command' instances
# Reference:
# https://zsh.sourceforge.net/Doc/Release/Completion-System.html
# https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -39,7 +39,7 @@
# ------------------------------------------------------------------------------
_arguments \
'(- *)--help[display this help message]' \
'(- *)--help[display help message]' \
'-d-[Verbose debug]:level:(0 1 2)' \
'-v-[SSH debug levels]:level:(0 1 2 3)' \
'-m-[Run concurrently on the specified hosts at a time. "0" is used for infinite]:count' \

View File

@ -266,14 +266,19 @@ _mvn_groupIds() {
[[ -z "$update_policy" ]] && zstyle ":completion:${curcontext}:" cache-policy _mvn_groupIds_caching_policy
if [[ -d $repository_location ]]; then
unset _groupIds
if ( [[ ${+_groupIds} -eq 0 ]] || _cache_invalid "mvn/repositories/${repository_location}/groupIds" ) && ! _retrieve_cache "mvn/repositories/${repository_location}/groupIds"; then
_groupIds=($repository_location/**/)
_groupIds=(${${${(u)_groupIds:h:h}#"$repository_location/"}//\//.})
[[ $#_groupIds -gt 0 ]] && _store_cache "mvn/repositories/${repository_location}/groupIds" _groupIds
local -a groupIds
local cache_key="mvn/repositories/${repository_location}/groupIds"
if ( _cache_invalid $cache_key ) && ! _retrieve_cache $cache_key; then
groupIds=($repository_location/**/)
groupIds=(${${${(u)_groupIds:h:h}#"$repository_location/"}//\//.})
if (( $#groupIds > 0 )); then
_store_cache $cache_key groupIds
fi
fi
[[ $#_groupIds -gt 0 ]] && _multi_parts $@ . _groupIds && ret=0
if (( $#groupIds > 0 )); then
_multi_parts $@ . groupIds && ret=0
fi
fi
return ret
@ -310,14 +315,19 @@ _mvn_plugin_goals() {
zstyle -s ":completion:${curcontext}:" cache-policy update_policy
[[ -z "$update_policy" ]] && zstyle ":completion:${curcontext}:" cache-policy _mvn_goals_caching_policy
unset _goals
if ( [[ ${+_goals} -eq 0 ]] || _cache_invalid "mvn/plugins/${plugin}" ) && ! _retrieve_cache "mvn/plugins/${plugin}"; then
local -a goals
local cache_key="mvn/plugins/${plugin}"
if _cache_invalid $cache_key && ! _retrieve_cache $cache_key; then
setopt localoptions extendedglob
_goals=(${(s:,,,:)${${${(f)${${${(f)${${${${(F)${(S)${(f)"$(_call_program goals $words[1] -N org.apache.maven.plugins:maven-help-plugin:2.1.1:describe -Dplugin=$plugin)"}//#$(__mvn_get_plugin_prefix $plugin):/,,,}}:#*BUILD FAILURE*}#*This plugin has*goals#:}%For more information, run \'mvn help:describe*}}//:/\\:}}}// ##/ }// Description\\: /:}})
[[ $#_goals -gt 0 ]] && _store_cache "mvn/plugins/${plugin}" _goals
if (( $#goals > 0 )); then
_store_cache "mvn/plugins/${plugin}" goals
fi
fi
[[ $#_goals -gt 0 ]] && _describe -t "goals" "${plugin} goal" _goals $@[0,-2] && ret=0
if (( $#goals > 0 )); then
_describe -t "goals" "${plugin} goal" goals $@[0,-2] && ret=0
fi
return ret
}
@ -338,44 +348,52 @@ _mvn_profiles() {
# Resolve profiles from settings.xml
if [[ -f $settings_file ]]; then
unset _profiles
local -a profiles
cache_name="mvn/profiles${settings_file:A}" # FIXME Don't use A modifier, it is only available on Zsh >= 4.3.10
if ( [[ ${+_profiles} -eq 0 ]] || _cache_invalid "$cache_name" ) && ! _retrieve_cache "$cache_name"; then
_profiles=()
if _cache_invalid "$cache_name" && ! _retrieve_cache "$cache_name"; then
profiles=()
profiles_section="${(M)${(f)$(<$settings_file)}:#*<profiles>*}"
if [[ -n "$profiles_section" ]]; then
for profile in ${(s:,,,:)${${${(S)${(S)${(S)${(S)${${profiles_section#*<profile>}%</profile>*}//<repositories>*<\/repositories>}//<pluginRepositories>*<\/pluginRepositories>}//<build>*<\/build>}//<\/id>*<id>/,,,}##*<id>}%%</id>*}}; do
[[ -z ${(M)profiles:#"$profile"*} ]] && _profiles+=("$profile"'['"in settings file"']')
[[ -z ${(M)profiles:#"$profile"*} ]] && profiles+=("$profile"'['"in settings file"']')
done
fi
[[ $#_profiles -gt 0 ]] && _store_cache "$cache_name" _profiles
if (( $#profiles > 0 )); then
_store_cache "$cache_name" profiles
fi
profs+=($_profiles)
fi
profs+=($profiles)
fi
# Resolve project profiles
if [[ -f $parent_pom_file ]]; then
unset _profiles
local -a profiles
cache_name="mvn/profiles${parent_pom_file:A}" # FIXME Don't use A modifier, it is only available on Zsh >= 4.3.10
if ( [[ ${+_profiles} -eq 0 ]] || _cache_invalid "$cache_name" ) && ! _retrieve_cache "$cache_name"; then
_profiles=()
if _cache_invalid "$cache_name" && ! _retrieve_cache "$cache_name"; then
profiles=()
setopt localoptions extendedglob
for file in ${parent_pom_file:h}/**/pom.xml~*target\/*; do # FIXME project.build.directory is not always target/
profiles_section="${(M)${(f)$(<$file)}:#*<profiles>*}"
if [[ -n "$profiles_section" ]]; then
for profile in ${(s:,,,:)${${${(S)${(S)${(S)${(S)${${profiles_section#*<profile>}%</profile>*}//<repositories>*<\/repositories>}//<pluginRepositories>*<\/pluginRepositories>}//<build>*<\/build>}//<\/id>*<id>/,,,}##*<id>}%%</id>*}}; do
[[ -z ${(M)profiles:#"$profile"*} ]] && _profiles+=("$profile"'['"in ${file#${parent_pom_file:h}\/}"']')
[[ -z ${(M)profiles:#"$profile"*} ]] && profiles+=("$profile"'['"in ${file#${parent_pom_file:h}\/}"']')
done
fi
done
[[ $#_profiles -gt 0 ]] && _store_cache "$cache_name" _profiles
if (( $#profiles > 0)); then
_store_cache "$cache_name" profiles
fi
profs+=($_profiles)
fi
profs+=($profiles)
fi
compset -P '-'; compset -P '+'; compset -P '!' # FIXME Only works for the first profile
[[ $#profs -gt 0 ]] && _values $@ 'profile' "${profs[@]}" && ret=0
if (( $profs > 0 )); then
_values $@ 'profile' "${profs[@]}" && ret=0
fi
return ret
}
@ -437,16 +455,21 @@ _mvn_plugin_goal_property_names() {
zstyle -s ":completion:${curcontext}:" cache-policy update_policy
[[ -z "$update_policy" ]] && zstyle ":completion:${curcontext}:" cache-policy _mvn_properties_caching_policy
unset _properties
if ( [[ ${+_properties} -eq 0 ]] || _cache_invalid "mvn/plugins/${plugin_colon_goal}" ) && ! _retrieve_cache "mvn/plugins/${plugin_colon_goal}"; then
local -a properties
local cache_key="mvn/plugins/${plugin_colon_goal}"
if _cache_invalid $cache_key && ! _retrieve_cache $cache_key; then
# FIXME Does not work for:
# android:apk (new line before expression)
# ear:ear (unknown cause)
_properties=(${(M)${(ps:,,,:)${${${${(pj: :)${${${(f)${"$(_call_program properties $words[1] -N org.apache.maven.plugins:maven-help-plugin:2.1.1:describe -Dplugin=${plugin_colon_goal%:*} -Dgoal=${plugin_colon_goal##*:} -Ddetail)"#*Available parameters:}%%\[INFO\]*}//# [a-z]*/,,,}##*Expression: \$\{}}//\}[[:space:]]##/:}//[[:space:]]##/ }//[[:space:]]#,,,[[:space:]]#/,,,}}:#[a-zA-Z]##:*})
[[ $#_properties -gt 0 ]] && _store_cache "mvn/plugins/${plugin_colon_goal}" _properties
properties=(${(M)${(ps:,,,:)${${${${(pj: :)${${${(f)${"$(_call_program properties $words[1] -N org.apache.maven.plugins:maven-help-plugin:2.1.1:describe -Dplugin=${plugin_colon_goal%:*} -Dgoal=${plugin_colon_goal##*:} -Ddetail)"#*Available parameters:}%%\[INFO\]*}//# [a-z]*/,,,}##*Expression: \$\{}}//\}[[:space:]]##/:}//[[:space:]]##/ }//[[:space:]]#,,,[[:space:]]#/,,,}}:#[a-zA-Z]##:*})
if (( $#properties > 0 )); then
_store_cache $cache_key properties
fi
fi
[[ $#_properties -gt 0 ]] && _describe -t "${plugin_colon_goal//:/-}-property-names" "${plugin_colon_goal} property name" _properties $@[0,-2] && ret=0
if (( $#properties > 0 )); then
_describe -t "${plugin_colon_goal//:/-}-property-names" "${plugin_colon_goal} property name" properties $@[0,-2] && ret=0
fi
return ret
}

View File

@ -77,8 +77,8 @@ if [[ -n $state ]]; then
+) _message -e lines "start at a given line" ;;
+[crCR]#[/?]) _message -e 'search string' ;;
+<->,) _message -e 'column number' ;;
*) _files && ret=0 ;;
esac
*) _files ;;
esac && ret=0
fi
return ret

View File

@ -144,3 +144,11 @@ local options=(
)
_arguments $options "*::func_name:($func_names)"
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -12,30 +12,31 @@
# * Markus Richter ( https://github.com/mqus , <mqus@disroot.org>)
#
# ------------------------------------------------------------------------------
_nft(){
local -a rules states prev args families options descriptors
local state="start" line nextstate cmd_obj cmd_subcmd cmd_fam cmd_tab cmd_chain #curcontext="$curcontext"
local -a rules states prev args families options descriptors
local state="start" line nextstate cmd_obj cmd_subcmd cmd_fam cmd_tab cmd_chain #curcontext="$curcontext"
options=(
'(-)'{-h,--help}'[show help]' \
'(-)'{-v,--version}'[print version information]' \
"(-i --interactive)"{-i,--interactive}'[read input from interactive CLI]: :->end' \
"(-f --file)"{-f,--file}'[read input from <filename>]:nftables rule file:_files' \
'(-c --check -n --numeric -N)'{-c,--check}"[check command's validity without actually applying the changes]" \
'(-j --json)'{-j,--json}'[format output in json]' \
'(-c --check -N)*'{-n,--numeric}'[can be specified up to 3 times, Shows 1:network addresses(default behaviour), 2:internet services (port numbers) and 3:protocols, user IDs, and group IDs numerically]' \
'(-s --stateless)'{-s,--stateless}'[omit stateful information of ruleset]' \
'(-N -n --numeric -c --check)'-N'[translate IP addresses to names]' \
'(-a --handle)'{-a,--handle}'[output rule handle]' \
'(-e --echo)'{-e,--echo}'[echo what has been added, inserted or replaced]' \
options=(
'(-)'{-h,--help}'[show help]'
'(-)'{-v,--version}'[print version information]'
"(-i --interactive)"{-i,--interactive}'[read input from interactive CLI]: :->end'
"(-f --file)"{-f,--file}'[read input from <filename>]:nftables rule file:_files'
'(-c --check -n --numeric -N)'{-c,--check}"[check command's validity without actually applying the changes]"
'(-j --json)'{-j,--json}'[format output in json]'
'(-c --check -N)*'{-n,--numeric}'[can be specified up to 3 times, Shows 1:network addresses(default behaviour), 2:internet services (port numbers) and 3:protocols, user IDs, and group IDs numerically]'
'(-s --stateless)'{-s,--stateless}'[omit stateful information of ruleset]'
'(-N -n --numeric -c --check)'-N'[translate IP addresses to names]'
'(-a --handle)'{-a,--handle}'[output rule handle]'
'(-e --echo)'{-e,--echo}'[echo what has been added, inserted or replaced]'
{-I,--includepath}'[add specified directory to the paths searched for include files]:include directory [/usr/share]:include directory:_directories'
)
)
# start a state machine. The state is modified by _arguments if the
# current argument (descriptors) cannot be completed. Each state has to define is successive state and the
# 'descriptors' for _arguments, which essentially tells _arguments how to complete
local _i=0
while true;do
# start a state machine. The state is modified by _arguments if the
# current argument (descriptors) cannot be completed. Each state has to define is successive state and the
# 'descriptors' for _arguments, which essentially tells _arguments how to complete
local _i=0
while true;do
(( _i+=1 ))
#Guard for endless loops
[[ $_i -gt 100 ]] && return 1
@ -87,7 +88,7 @@ while true;do
(mon1)
case $line[1] in
(new | destroy)
# descriptors=( ":: :_nft_mon_keywords" ":: :_nft_out_format")
# descriptors=( ":: :_nft_mon_keywords" ":: :_nft_out_format")
descriptors=( ":: : _nft_mon_keywords")
nextstate="mon1"
;;
@ -264,7 +265,7 @@ while true;do
"*:: :->$nextstate" \
&& return 0;
done
done
} # end _nft
_nft_subcommands(){
@ -284,6 +285,7 @@ _nft_subcommands(){
)
_describe -t commands 'nft subcommand' commands "$@"
}
_nft_mon_filter(){
local monitor_filters=(
'new:show only events of created objects'

View File

@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for Node.js v25.8.0 (https://nodejs.org)
# Completion script for Node.js v25.9.0 (https://nodejs.org)
#
# ------------------------------------------------------------------------------
# Authors
@ -70,6 +70,23 @@ _node_scripts() {
}
_node() {
# See https://github.com/nodejs/node/blob/main/doc/api/cli.md
# Note some allowed v8 options are listed in 'node --help' but others are not
local -a v8_options=(
'--max-heap-size=[max size of the heap in Mbytes]:size'
'--max-old-space-size=[max size of the old space in Mbytes]:size'
'--max-semi-space-size=[max size of a semi-space in Mbytes]:size'
'--stack-trace-limit=[number of stack frames to capture]:limit'
)
if [[ $OSTYPE == linux* ]]; then
v8_options+=(
'--perf-basic-prof-only-functions[only report function code ranges to perf]'
'--perf-basic-prof[enable basic support for perf profiler]'
'--perf-prof-unwinding-info[enable unwinding info for perf linux profiler]'
'--perf-prof[enable annotate support for perf profiler]'
)
fi
local ret=1
_arguments \
@ -252,6 +269,7 @@ _node() {
"--watch-path=[path to watch]: :_node_files" \
'--watch-preserve-output[preserve outputs on watch mode restart]' \
'--zero-fill-buffers[automatically zero-fill all newly allocated Buffer and SlowBuffer instances]' \
$v8_options[@] \
'(- 1 *)'{-h,--help}'[print node command line options]' \
'(- 1 *)'{-v,--version}'[print Node.js version]' \
'*: :_node_args' && ret=0

85
src/_nu Normal file
View File

@ -0,0 +1,85 @@
#compdef nu
# ------------------------------------------------------------------------------
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for nu 0.111.0 (https://www.nushell.sh/)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
local -a table_modes=(
ascii_rounded basic_compact basic compact_double compact default
dots double heavy light markdown none psql reinforced restructured
rounded single thin with_love
)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'(- *)'{-v,--version}'[print the version]' \
'(-i --interactive)'{-i,--interactive}'[start as an interactive shell]' \
'(-l --login)'{-l,--login}'[start as a login shell]' \
'(-c --commands)'{-c,--commands}'[run the given command and then exit]:command' \
'(-e --execute)'{-e,--execute}'[run the given commands and then enter an interactive shell]:command' \
'(-m --table-mode)'{-m,--table-mode}'[table mode to use]:mode:($table_modes)' \
'--error-style[error style to use]:style:(fancy plain)' \
'--no-newline[print the result for --commands(-c) without a newline]' \
'--stdin[redirect standard input to a command(with "-c") or a script file]' \
'--testbin[run internal test binary]:binary' \
"--mcp[start nu's model context protocol server]" \
'--mcp-transport[transport to use for MCP server]:transport:(stdin http)' \
'--mcp-port[port for MCP HTTP transport(default: 8080)]:port' \
'(-I --include-path)'{-I,--include-path}'[set the NU_LIB_DIRS for the given script]:dir:_files -/' \
'(-n --no-config-file)'{-n,--no-config-file}'[start with no config file and no env file]' \
'--no-history[disable reading and writing to command history]' \
'--no-std-lib[start with no standard library]' \
'--config[start with an alternate config file]:file:_files' \
'--env-config[start with an alternate environment config file]:file:_files' \
'--log-level[log level for diagnostic logs]:level:(error warn info debug trace)' \
'--log-target[set the target for the log to output]:target: _alternative "std\:std\:(stdout stderr)" "files\:file\:_files"' \
'--log-include[set the Rust module prefixes to include in the log output]:prefix' \
'--log-exclude[set the Rust module prefixes to exclude from the log output]:prefix' \
"--lsp[start nu's language server protocol]" \
'--ide-goto-def[go to the definition of the item at the given position]:pos' \
'--ide-hover[give information about the item at the given position]:pos' \
'--ide-complete[list completions for the item at the given position]:pos' \
'--ide-check[run a diagnostic check on the given source and limit number of errors returned to provided number]:num' \
'--ide-ast[generate the ast on the given source]' \
'--experimental-options[enable or disable experimental options]:options:(all)' \
'--plugin-config[start with an alternative plugin registry file]:file:_files' \
'--plugins[list of plugin executable files to load]:file:_files' \
'*:: :_files'
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for OpenSSL 3.5.3 (https://www.openssl-library.org/)
# Completion script for OpenSSL 4.0.0 (https://www.openssl-library.org/)
#
# ------------------------------------------------------------------------------
# Authors
@ -844,6 +844,8 @@ _openssl_dgst() {
'-prverify[private key file to verify the signature]:file:_files' \
'-signature[actual signature file to verify]:file:_files' \
'-hmac[key to create a hashed MAC]:key' \
'-hmac-env[create a hashed MAC using a key from the given environment variable]:var:_parameters -g "*export*"' \
'-hmac-stdin[create a hashed MAC using a key obtained from the standard input]' \
'-mac[MAC algorithm]:alg:_openssl_mac_algorithms' \
'-macopt[options of MAC algorithm]:options' \
'-fips-fingerprint[compute HMAC using a specific key for certain OpenSSL-FIPS operations]' \
@ -1830,6 +1832,15 @@ _openssl_s_client() {
$openssl_verification_options[@] \
'-enable_server_rpk[enable support for receiving raw public keys from the server]' \
'-enable_client_rpk[enable support for sending raw public keys to the server]' \
'*-expected-rpks[specify public keys expected from the remote peer used to authenticate the connection]:file:_files' \
'-ech_outer_alpn[specify ALPN values to use in the outer ClientHello]:protocol' \
'-ech_grease[emit a GREASE value]' \
'-ech_grease_suite[specify ECH ciphersuites to use when -ech_grease is specified]:suite' \
'-ech_grease_type[specify a GREASEd ECH value]:type' \
'-ech_ignore_cid[use random value for ECH]' \
'-ech_outer_sni[specify a subject name indication value to use in hte outer ClientHello]:value' \
'-ech_no_outer_sni[no SNI will be emitted in the outer ClientHello]' \
'-ech_select[specify which ECHConfigList to use using a zero-based index]:index' \
'*::host_port'
}
@ -1957,7 +1968,13 @@ _openssl_s_server() {
$openssl_provider_options[@] \
$openssl_verification_options[@] \
'-enable_server_rpk[enable support for sending raw public keys to the client]' \
'-enable_client_rpk[enable support for receiving raw public keys from the client]'
'-enable_client_rpk[enable support for receiving raw public keys from the client]' \
'*-expected-rpks[specify public keys expected from the remote peer used to authenticate the connection]:file:_files' \
'-ech_key[load one Encrypted Client Hello(ECH) key pair]:file:_files' \
'-ech_dir[load an ECH key pair from every file in the named directory]:dir:_files -/' \
'-ech_noretry_dir[load an ECH key pair from every file in the named directory. not return in "retry_configs"]:file:_files -/' \
'-ech_trialdecrypt[ECH config_id is used to match against the loaded ECH private keys and decryption is only attempted]' \
'-ech_greaseretries[servers will add GREASEy ECHConfigList values to those sent in retry_configs]'
}
_openssl_s_time() {

View File

@ -53,7 +53,7 @@ _openvpn3_config-acl() {
_arguments \
{-s,--show}"[Show the current access control lists]" \
{-o,--path}"[OBJ-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \
{-h,--help}"[This help screen]" \
{-h,--help}"[Show help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \
{-S,--seal}"[Make the configuration profile permanently read-only]" \
{-R,--revoke}"[<UID | username> Revoke this user access from this configuration profile]" \
@ -67,7 +67,7 @@ _openvpn3_config-import() {
_arguments \
{-p,--persistent}"[Make the configuration profile persistent through service restarts]" \
{-n,--name}"[NAME Provide a different name for the configuration (default: CFG-FILE)]" \
{-h,--help}"[This help screen]" \
{-h,--help}"[Show help screen]" \
{-c,--config}"[CFG-FILE Configuration file to import]: :_files"
}
@ -76,7 +76,7 @@ _openvpn3_config-manage() {
{-s,--show}"[Show current configuration options]" \
{-r,--rename}"[NEW-CONFIG-NAME Renames the configuration]" \
{-o,--path}"[CONFIG-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \
{-h,--help}"[This help screen]" \
{-h,--help}"[Show help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \
"--unset-override[<name> Removes the <name> override]" \
"--tls-version-min[<tls_1_0|tls_1_1|tls_1_2|tls_1_3> Sets the minimal TLS version for the control channel]: :(tls_1_0 tls_1_1 tls_1_2 tls_1_3)" \
@ -103,7 +103,7 @@ _openvpn3_config-manage() {
_openvpn3_config-remove() {
_arguments \
{-o,--path}"[OBJ-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \
{-h,--help}"[This help screen]" \
{-h,--help}"[Show help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \
"--force[Force the deletion process without asking for confirmation]" \
"--config-path[OBJ-PATH Alias for --path]: :($configs_paths)"
@ -113,24 +113,24 @@ _openvpn3_config-show() {
_arguments \
{-o,--path}"[OBJ-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \
{-j,--json}"[Dump the configuration in JSON format]" \
{-h,--help}"[This help screen]" \
{-h,--help}"[Show help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \
"--config-path[OBJ-PATH Alias for --path]: :($configs_paths)"
}
_openvpn3_configs-list() {
_arguments \
{-h,--help}"[This help screen]"
{-h,--help}"[Show help screen]"
}
_openvpn3_help() {
_arguments \
{-h,--help}"[This help screen]"
{-h,--help}"[Show help screen]"
}
_openvpn3_log() {
_arguments \
{-h,--help}"[This help screen]" \
{-h,--help}"[Show help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --session-path, where configuration profile name is used instead]: :($sessions_configs_names $configs_names)" \
{-I,--interface}"[INTERFACE Alternative to --session-path, where tun interface name is used instead]: :($sessions_interfaces)" \
"--session-path[SESSION-PATH Receive log events for a specific session]: :($sessions_paths)" \
@ -142,7 +142,7 @@ _openvpn3_session-acl() {
_arguments \
{-s,--show}"[Show the current access control lists]" \
{-o,--path}"[SESSION-PATH Path to the session in the session manager]: :($sessions_paths)" \
{-h,--help}"[This help screen]" \
{-h,--help}"[Show help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($sessions_configs_names)" \
{-R,--revoke}"[<UID | username> Revoke this user access from this session]" \
{-I,--interface}"[INTERFACE Alternative to --path, where tun interface name is used instead]: :($sessions_interfaces)" \
@ -155,7 +155,7 @@ _openvpn3_session-acl() {
_openvpn3_session-manage() {
_arguments \
{-o,--path}"[SESSION-PATH Path to the session in the session manager]: :($sessions_paths)" \
{-h,--help}"[This help screen]" \
{-h,--help}"[Show help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($sessions_configs_names)" \
{-R,--resume}"[Resumes a paused VPN session]" \
{-P,--pause}"[Pauses the VPN session]" \
@ -169,7 +169,7 @@ _openvpn3_session-manage() {
_openvpn3_session-start() {
_arguments \
{-p,--config-path}"[CONFIG-PATH Configuration path to an already imported configuration]: :($configs_paths)" \
{-h,--help}"[This help screen]" \
{-h,--help}"[Show help screen]" \
{-c,--config}"[CONFIG-FILE Configuration file to start directly]: :_files" \
"--persist-tun[Enforces persistent tun/seamless tunnel (requires --config)]"
}
@ -178,7 +178,7 @@ _openvpn3_session-stats() {
_arguments \
{-o,--path}"[SESSION-PATH Path to the configuration in the configuration manager]: :($sessions_paths)" \
{-j,--json}"[Dump the configuration in JSON format]" \
{-h,--help}"[This help screen]" \
{-h,--help}"[Show help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($sessions_configs_names)" \
{-I,--interface}"[INTERFACE Alternative to --path, where tun interface name is used instead]: :($sessions_interfaces)" \
"--session-path[SESSION-PATH Alias for --path]: :($sessions_paths)"
@ -186,12 +186,12 @@ _openvpn3_session-stats() {
_openvpn3_sessions-list() {
_arguments \
{-h,--help}"[This help screen]"
{-h,--help}"[Show help screen]"
}
_openvpn3_shell-completion() {
_arguments \
{-h,--help}"[This help screen]" \
{-h,--help}"[Show help screen]" \
"--list-commands[List all available commands]" \
"--list-options[COMMAND List all available options for a specific command]: :($(openvpn3 shell-completion --list-commands))" \
"--arg-helper[OPTION Used together with --list-options, lists value hint to an option]"
@ -199,7 +199,7 @@ _openvpn3_shell-completion() {
_openvpn3_version() {
_arguments \
{-h,--help}"[This help screen]"
{-h,--help}"[Show help screen]"
}
_openvpn3_command() {
@ -210,7 +210,7 @@ _openvpn3_command() {
"config-remove: Remove an available configuration profile"
"config-show: Show/dump a configuration profile"
"configs-list: List all available configuration profiles"
"help: This help screen"
"help: Show help screen"
"log: Receive log events as they occur"
"session-acl: Manage access control lists for sessions"
"session-manage: Manage VPN sessions"
@ -225,7 +225,7 @@ _openvpn3_command() {
_describe -t commands 'openvpn3 commands' openvpn3_cmds
else
local curcontext="$curcontext"
cmd="${${openvpn3_cmds[(r)$words[1]:*]%%:*}}"
local cmd="${${openvpn3_cmds[(r)$words[1]:*]%%:*}}"
if (($#cmd)); then
if (( $+functions[_openvpn3_$cmd] )); then
_openvpn3_$cmd
@ -239,7 +239,7 @@ _openvpn3_command() {
}
_arguments \
{-h,--help}"[that This help screen]" \
{-h,--help}"[Show help screen]" \
"*::openvpn3 commands:_openvpn3_command" \
# Local Variables:

View File

@ -73,7 +73,7 @@ _pm2() {
'--no-color[skip colors]' \
'--no-vizion[start an app without vizion feature]' \
'--np-autorestart[start an app without automatic restart]' \
'--no-treekill[Only kill the main process, not detached children]' \
'--no-treekill[only kill the main process, not detached children]' \
'--no-pmx[start an app without pmx]' \
'--no-automation[start an app without automation]' \
'(--disable-trace --trace)--trace[enable transaction tracing with km]' \
@ -93,9 +93,9 @@ _pm2() {
(start)
_arguments \
'--watch[watch folder for changes]' \
'--fresh[Rebuild Dockerfile]' \
'--daemon[Run container in Daemon mode(debug purposes)]' \
'--container[Start application in container mode]' \
'--fresh[rebuild Dockerfile]' \
'--daemon[run container in daemon mode(debug purposes)]' \
'--container[start application in container mode]' \
'--dist[--with-container; change local Dockerfile to containerize all files in current directory]' \
'--image-name[with --dist; set the exported image name]:name' \
'--node-version[with --container, set a specific major Node.js version]:version' \
@ -119,7 +119,7 @@ _pm2() {
(stop|restart)
_arguments \
'(- *)'{-h,--help}'[output usage information]' \
'--watch[Stop watching folder for changes]' \
'--watch[stop watching folder for changes]' \
'*: :_pm2_id_namespace_all' \
&& ret=0
;;
@ -231,8 +231,8 @@ _pm2_subcommands() {
"stop:stop a process"
"restart:restart a process"
"scale:scale up/down a process in cluster mode depending on total_number param"
"profile\:mem:Sample PM2 heap memory"
"profile\:cpu:Profile PM2 cpu"
"profile\:mem:sample PM2 heap memory"
"profile\:cpu:profile PM2 cpu"
"reload:reload processes (note that its for app using HTTP/HTTPS)"
"id:get process id by name"
"inspect:inspect a process"
@ -244,12 +244,12 @@ _pm2_subcommands() {
"install:install or update a module and run it forever"
"module\:install:install or update a module and run it forever"
"module\:update:update a module and run it forever"
"module\:generate:Generate a sample module in current folder"
"module\:generate:generate a sample module in current folder"
"uninstall:stop and uninstall a module"
"module\:uninstall:stop and uninstall a module"
"package:Check & Package TAR type module"
"publish:Publish the module you are currently on"
"module\:publish:Publish the module you are currently on"
"package:check & package TAR type module"
"publish:publish the module you are currently on"
"module\:publish:publish the module you are currently on"
"set:sets the specified config <key> <value>"
"multiset:multiset eg \"key1 val1 key2 val2\""
"get:get value for <key>"
@ -263,11 +263,11 @@ _pm2_subcommands() {
"unmonitor:unmonitor target process"
"open:open the pm2 monitoring dashboard"
"plus:enable pm2 plus"
"login:Login to pm2 plus"
"logout:Logout from pm2 plus"
"login:login to pm2 plus"
"logout:logout from pm2 plus"
"dump:dump all processes for resurrecting them later"
"save:dump all processes for resurrecting them later"
"cleardump:Create empty dump file"
"cleardump:create empty dump file"
"send:send stdin to <pm_id>"
"attach:attach stdin/stdout to application identified by <pm_id>"
"resurrect:resurrect previously dumped processes"
@ -297,7 +297,7 @@ _pm2_subcommands() {
"dash:launch dashboard with monitoring and logs"
"flush:flush logs"
"reloadLogs:reload all logs"
"logs:stream logs file. Default stream all logs"
"logs:stream logs file (default is to stream all logs)"
"kill:kill daemon"
"pull:updates repository for a given app"
"forward:updates repository to the next commit for a given app"

View File

@ -14,12 +14,103 @@
#
# ------------------------------------------------------------------------------
_pre_commit() {
typeset -A opt_args
local context state line curcontext="$curcontext"
local ret=1
_arguments -C \
'(- *)'{-h,--help}'[show help message and exit]' \
'(- *)'{-V,--version}'[show version number and exit]' \
'1:command:_pre_commit_commands' \
'*:: :->args' \
&& ret=0
case "$state" in
(args)
local -a options=(
'(- : *)'{-h,--help}'[show help message and exit]'
"--color[Whether to use color in output(default: auto)]:color:(auto always never)"
)
local -a hook_types=(
commit-msg post-checkout post-commit post-merge post-rewrite pre-commit
pre-merge-commit pre-push pre-rebase prepare-commit-msg
)
local -a hook_stages=($hook_types[@] manual)
case $words[1] in
(help)
_pre_commit_commands && ret=0
return ret
(autoupdate|init-templatedir|install|install-hooks|migrate-config|run|uninstall)
options+=(
'(-c --config)'{-c,--config}'[Path to alternate config file]:config:_files -g "*.yaml"'
)
;|
(init-templatedir|install|uninstall)
options+=(
'(-t --hook-type)'{-t,--hook-type}'[hook type]:type:($hook_types)'
)
;|
(autoupdate)
options+=(
'--bleeding-edge[Update to the bleeding edge of 'HEAD' instead of the latest tagged version]'
'--freeze[Store "frozen" hashes in "rev" instead of tag names]'
'*--repo[Only update this repository -- may be specified multiple times]:repos'
'(-j --jobs)'{-j,--jobs}'[Number of threads to use(default: 1)]:jobs'
)
;;
(init-templatedir)
options+=(
'--no-allow-missing-config[Assume cloned repos should have a "pre-commit" config]'
'*::dir:_files -/'
)
;;
(install)
options+=(
'(-f --overwrite)'{-f,--overwrite}'[Overwrite existing hooks / remove migration mode]'
'--install-hooks[Whether to install hook environments for all environments]'
'--allow-missing-config[Allow a missing "pre-commit" configuration file]'
)
;;
(run|try-repo)
options+=(
'(-v --verbose)'{-v,--verbose}'[verbose mode]'
'(-a --all-files)'{-a,--all-files}'[Run on all the files in the repo]'
'--files[Specific filenames to run hooks on]:file:_files'
'--show-diff-on-failure[When hooks fail, run "git diff" directly afterward]'
'--hook-stage[The stage during which the hook is fired]:stage:($hook_stages)'
'--remote-branch[Remote branch ref used by "git push"]:remote_branch:_pre_commit_git_remote_branches'
'--local-branch[Local branch ref used by "git push"]:local_branch:_pre_commit_git_local_branches'
'(--from-ref --source -s)'{--from-ref,--source,-s}'[original ref in "from_ref..to_ref" diff expression]:ref:_pre_commit_git_refs'
'(--to-ref --origin -o)'{--to-ref,--origin,-o}'[destination ref in "from_ref..to_ref" diff expression]:ref:_pre_commit_git_refs'
'--pre-rebase-upstream[upstream from which the series was forked]:upstream'
'--pre-rebase-branch[branch being rebased and is not set when rebasing the current branch]:branch'
'--commit-msg-filename[file name to check when running during "commit-msg"]:file:_files'
'--prepare-commit-message-source[source of the commit message]:source'
'--commit-object-name[commit object name]:object_name'
'--remote-name[Remote name used by "git push"]:name:remote:_pre_commit_git_remotes'
'--remote-url[Remote url used by "git push"]:url:_urls'
'--checkout-type[branch check out or a file checkout]:type:_pre_commit_commit_types'
'--is-squash-merge[use squash merge]:flag:(0 1)'
'--rewrite-command[specify the command that invoked the rewrite]:command'
"2:hook_id"
)
;;
esac
_arguments $options[@] && ret=0
;;
esac
return ret
}
_pre_commit_commands() {
local commands=(
local -a commands=(
"autoupdate:Auto-update pre-commit config to the latest repos' versions"
"clean:Clean out pre-commit files"
"gc:Clean unused cached repos"
"help:Show help for a specific command"
"init-templatedir:Install hook script in a directory intended for use with 'git config init.templateDir'"
"install:Install the pre-commit script"
"install-hooks:Install hook environments for all environments in the config file"
@ -32,181 +123,47 @@ _pre_commit_commands() {
"validate-manifest:Validate .pre-commit-hooks.yaml files"
"help:Show help for a specific command"
)
_describe 'pre-commit commands' commands
}
_pre_commit_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"(- : *)"{-V,--version}"[show program\'s version number and exit]"
)
_pre_commit_autoupdate_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
{-c,--config}"[Path to alternate config file]:config:_files -g '*.yaml'"
"--bleeding-edge[Update to the bleeding edge of 'HEAD' instead of the latest tagged version]"
"--freeze[Store 'frozen' hashes in 'rev' instead of tag names]"
"*--repo[Only update this repository -- may be specified multiple times]:repos:"
{-j,--jobs}"[Number of threads to use]:jobs"
)
_pre_commit_clean_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
)
_pre_commit_gc_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
)
_pre_commit_help_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
":Command to show help for.:"
)
_pre_commit_init_templatedir_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
{-c,--config}"[Path to alternate config file]:config:_files -g '*.yaml'"
"--no-allow-missing-config[Assume cloned repos should have a 'pre-commit' config]"
"*"{-t,--hook-type}"[which hook type to install]:hook_types:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)"
":The directory in which to write the hook script.:_files -/"
)
_pre_commit_install_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
{-c,--config}"[Path to alternate config file]:config:_files -g '*.yaml'"
{-f,--overwrite}"[Overwrite existing hooks / remove migration mode]"
"--install-hooks[Whether to install hook environments for all environments in the config file]"
{-t,--hook-type}"[which hook type to install]:hook_type:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)"
"--allow-missing-config[Hook scripts will permit a missing configuration file]"
)
_pre_commit_install_hooks_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
{-c,--config}"[Path to alternate config file]:config:_files -g '*.yaml'"
)
_pre_commit_migrate_config_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
{-c,--config}"[Path to alternate config file]:config:_files -g '*.yaml'"
)
_pre_commit_run_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
{-c,--config}"[Path to alternate config file]:config:_files -g '*.yaml'"
{--verbose,-v}"[ produce hook output independent of success]"
{--all-files,-a}"[Run on all the files in the repo]"
"--files[Specific filenames to run hooks on]:files:_files"
"--show-diff-on-failure[When hooks fail, run 'git diff' directly afterward]"
"--hook-stage[The stage during which the hook is fired]:hook_stage:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg manual)"
"--remote-branch[Remote branch ref used by 'git push']:remote_branch:"
"--local-branch[Local branch ref used by 'git push']:local_branch:"
{--from-ref,--source,-s}"[the original ref in a 'from_ref...to_ref' diff expression]:from_ref:"
{--to-ref,--origin,-o}"[the destination ref in a 'from_ref...to_ref' diff expression]:to_ref:"
"--pre-rebase-upstream[the upstream from which the series was forked]:pre_rebase_upstream"
"--pre-rebase-branch[the branch being rebased and is not set when rebasing the current branch]:pre_rebase_branch"
"--commit-msg-filename[Filename to check when running during 'commit-msg']:commit_msg_filename:"
"--prepare-commit-message-source[Source of the commit message]:prepare_commit_message_source:"
"--commit-object-name[Commit object name]:commit_object_name:"
"--remote-name[Remote name used by 'git push']:remote_name:"
"--remote-url[Remote url used by 'git push']:remote_url:"
"--checkout-type[Indicates whether the checkout was a branch checkout or a file checkout]:checkout_type:((0\:file\ checkout 1\:branch\ checkout))"
"--is-squash-merge[During a post-merge hook, indicates whether the merge was a squash merge]:is_squash_merge:"
"--rewrite-command[During a post-rewrite hook, specifies the command that invoked the rewrite]:rewrite_command:"
":A single hook-id to run:"
)
_pre_commit_sample_config_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
)
_pre_commit_try_repo_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
{-c,--config}"[Path to alternate config file]:config:_files -g '*.yaml'"
{--ref,--rev}"[Manually select a rev to run against, otherwise 'HEAD']:ref:"
{--verbose,-v}"[verbose output]"
{--all-files,-a}"[Run on all the files in the repo]"
"--files[Specific filenames to run hooks on]:files:_files"
"--show-diff-on-failure[When hooks fail, run 'git diff' directly afterward]"
"--hook-stage[The stage during which the hook is fired]:hook_stage:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg manual)"
"--remote-branch[Remote branch ref used by 'git push']:remote_branch:"
"--local-branch[Local branch ref used by 'git push']:local_branch:"
{--from-ref,--source,-s}"[the original ref in a 'from_ref...to_ref' diff expression]:from_ref:"
{--to-ref,--origin,-o}"[the destination ref in a 'from_ref...to_ref' diff expression]:to_ref:"
"--pre-rebase-upstream[the upstream from which the series was forked]:pre_rebase_upstream"
"--pre-rebase-branch[the branch being rebased and is not set when rebasing the current branch]:pre_rebase_branch"
"--commit-msg-filename[Filename to check when running during 'commit-msg']:commit_msg_filename:"
"--prepare-commit-message-source[Source of the commit message]:prepare_commit_message_source:"
"--commit-object-name[Commit object name]:commit_object_name:"
"--remote-name[Remote name used by 'git push']:remote_name:"
"--remote-url[Remote url used by 'git push']:remote_url:"
"--checkout-type[Indicates whether the checkout was a branch checkout or a file checkout]:checkout_type:((0\:file\ checkout 1\:branch\ checkout))"
"--is-squash-merge[During a post-merge hook, indicates whether the merge was a squash merge]:is_squash_merge:"
"--rewrite-command[During a post-rewrite hook, specifies the command that invoked the rewrite]:rewrite_command:"
":Repository to source hooks from.:"
":A single hook-id to run:"
)
_pre_commit_uninstall_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
{-c,--config}"[Path to alternate config file]:config:_files -g '*.yaml'"
"*"{-t,--hook-type}"[which hook type to uninstall]:hook_types:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)"
)
_pre_commit_validate_config_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
"(*)::filenames:_files"
)
_pre_commit_validate_manifest_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
"(*)::filenames:_files"
)
_pre_commit() {
local context state line curcontext="$curcontext" one_or_more='(-)*' reminder='(*)'
if ((${_pre_commit_options[(I)${(q)one_or_more}*]} + ${_pre_commit_options[(I)${(q)reminder}*]} == 0)); then # noqa: E501
_pre_commit_options+=(': :_pre_commit_commands' '*::: :->pre-commit')
_pre_commit_git_remote_branches() {
if (( $+commands[git] )); then
local -a remote_branches=(${(f)"$(git branch -a 2>/dev/null | \grep 'remotes/' | \grep -v HEAD | awk -F/ '{print $NF}' | uniq)"})
_values 'branch' $remote_branches
fi
}
_pre_commit_git_local_branches() {
if (( $+commands[git] )); then
local -a local_branches=(${(f)"$(git branch 2>/dev/null | cut -c3-)"})
_values 'branch' $local_branches
fi
}
_pre_commit_git_remotes() {
if (( $+commands[git] )); then
local -a remote_names=(${(f)"$(git remote 2>/dev/null)"})
_values 'remote' $remote_names
fi
}
_pre_commit_commit_types() {
local -a types=(
'0:retrieving a file from the index'
'1:changing branches'
)
_describe 'commit types' types
}
_pre_commit_git_refs() {
if (( $+commands[git] )); then
local -a refs=(${(f)"$(git branch -a 2>/dev/null | \grep -v HEAD | cut -c3- | sed 's/^remotes\///')"})
_values 'ref' $refs
fi
_arguments -C $_pre_commit_options
case $state in
pre-commit)
words=($line[1] "${words[@]}")
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:_pre_commit-$line[1]:"
case $line[1] in
autoupdate) _arguments -C $_pre_commit_autoupdate_options ;;
clean) _arguments -C $_pre_commit_clean_options ;;
gc) _arguments -C $_pre_commit_gc_options ;;
help) _arguments -C $_pre_commit_help_options ;;
init-templatedir) _arguments -C $_pre_commit_init_templatedir_options ;;
install) _arguments -C $_pre_commit_install_options ;;
install-hooks) _arguments -C $_pre_commit_install_hooks_options ;;
migrate-config) _arguments -C $_pre_commit_migrate_config_options ;;
run) _arguments -C $_pre_commit_run_options ;;
sample-config) _arguments -C $_pre_commit_sample_config_options ;;
try-repo) _arguments -C $_pre_commit_try_repo_options ;;
uninstall) _arguments -C $_pre_commit_uninstall_options ;;
validate-config) _arguments -C $_pre_commit_validate_config_options ;;
validate-manifest) _arguments -C $_pre_commit_validate_manifest_options ;;
esac
esac
}
typeset -A opt_args
_pre_commit "$@"
# Local Variables:

85
src/_pwsh Normal file
View File

@ -0,0 +1,85 @@
#compdef pwsh
# ------------------------------------------------------------------------------
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for PowerShell 7.6.0 (https://github.com/PowerShell/PowerShell)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_pwsh_execution_policies() {
local -a policies=(
"AllSigned:Require that all scripts and config files are signed by a trusted publisher"
"Bypass:Nothing is blocked and there are no warnings or prompts"
"Default:Sets the default execution policy"
"RemoteSigned:Require that all scripts and config files downloaded from the Internet are signed by a trusted publisher"
"Restricted:Doesn't load configuration files or run scripts"
"Undefined:No execution policy is set for the scope"
"Unrestricted:Loads all configuration files and runs all scripts"
)
_describe -t policy policies policies
}
_arguments \
'(- *)'{-Help,-?}'[Display help for pwsh]' \
'(-f -File)'{-f,-File}'[Specify file name to execute, "-" means reading from standard input]:file:_files' \
'(-c -Command)'{-c,-Command}'[Execute the specified command, "-" means reading from standard input]:command' \
'(-cwa -CommandWithArgs)'{-cwa,-CommandWithArgs}'[Execute PowerShell command with arguments]:command_and_args' \
'(-config -ConfigurationName)'{-config,-ConfigurationName}'[Specify a configuration endpoint in which PowerShell is run]:config' \
'-ConfigurationFile[Specify a session configuration file path]:path:_files -g "*.pssc"' \
'-CustomPipeName[Specify the name to use for an additional IPC server]:pipe_name' \
'(-e -ec -EncodedCommand)'{-e,-ec,-EncodedCommand}'[Accept a Base64-encoded string version of a command]:encoded_command' \
'(-ex -ep -ExecutionPolicy)'{-ex,-ep,-ExecutionPolicy}'[Set the default execution policy for the current session]:policy:_pwsh_execution_policies' \
'(-inp -if -InputFormat)'{-inp,-if,-InputFormat}'[Describe the format of data sent to PowerShell]:format:(Text XML)' \
'(-i -Interactive -noni -NonInteractive)'{-i,-Interactive}'[Present an interactive prompt to the user]' \
'(-l -Login)'{-l,-Login}'[Start PowerShell as a login shell]' \
'(-MTA -STA)-MTA[Start PowerShell using a multi-threaded apartment, available only on Windows]' \
'(-noe -NoExit)'{-noe,-NoExit}'[Do not exit after running startup Completion]' \
'(-nol -NoLogo)'{-nol,-NoLogo}'[Hide the banner text at startup of interactive sessions]' \
'(-i -Interactive -noni -NonInteractive)'{-noni,-NonInteractive}'[Create sessions that should not require user input]' \
'(-nop -NoProfile)'{-nop,-NoProfile}'[Do not load the PowerShell profiles]' \
'-NoProfileLoadTime[Hide the PowerShell profile load time text shown at startup when it takes more than 500msecs]' \
'(-o -of -OutputFormat)'{-o,-of,-OutputFormat}'[Determine how output from PowerShell is formatted]:format:(Text XML)' \
'(-settings -SettingsFile)'{-settings,-SettingsFile}'[Override the system-wide settings file for the session]:file:_files -g "*.json"' \
'(-sshs -SSHServerMode)'{-sshs,-SSHServerMode}'[Used in sshd_config for running PowerShell as an SSH subsystem]' \
'(-MTA -STA)-STA[Start PowerShell using a single-threaded apartment, only available on Windows]' \
'(- *)'{-v,-Version}'[Display the version of PowerShell]' \
'(-w -WindowStyle)'{-w,-WindowStyle}'[Set the window style for the session]:style:(Normal Minimized Maximized Hidden)' \
'(-wd -WorkingDirectory)'{-wd,-WorkingDirectory}'[Set the initial working directory]:dir:_files -/' \
'*:: :_files'
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -45,7 +45,7 @@ _rails() {
local -a runtime_options rails_options
runtime_options=(
'(- *)'{-h,--help}'[Show this help message and quit]'
'(- *)'{-h,--help}'[Show help message and quit]'
'(- *)'{-v,--version}'[Show Rails version and quit]'
)
@ -74,14 +74,14 @@ _rails() {
;;
(console|c)
_arguments \
'(- *)'{-h,--help}'[Show this help message and quit]' \
'(- *)'{-h,--help}'[Show help message and quit]' \
'(-e --environment)'{-e,--environment=}'[The environment to run "console" in]:env:(test development production)' \
'(-s --sandbox)'{-s,--sandbox}'[Rollback database modifications on exit]' \
&& ret=0
;;
(server|s)
_arguments \
'(- *)'{-h,--help}'[Show this help message and quit]' \
'(- *)'{-h,--help}'[Show help message and quit]' \
'(-e --environment)'{-e,--environment=}'[The environment to run "server" in]:env:(test development production)' \
'(-p --port)'{-p,--port}'[Run Rails on the specified port]:port' \
'(-b --binding)'{-b,--binding=}'[Bind Rails to the specified IP]:binding' \
@ -98,7 +98,7 @@ _rails() {
;;
(dbconsole|db)
_arguments \
'(- *)'{-h,--help}'[Show this help message and quit]' \
'(- *)'{-h,--help}'[Show help message and quit]' \
'(-e --environment)'{-e,--environment=}'[The environment to run "server" in]:env:(test development production)' \
'(-p --include-password)'{-p,--include-password}'[Automatically provide the password from database.yml]' \
'--mode=[Automatically put the sqlite3 database in the specified mode]:mode:(html list line column)' \
@ -109,7 +109,7 @@ _rails() {
;;
(test|t|test:system)
_arguments \
'(- *)'{-h,--help}'[Show this help message and quit]' \
'(- *)'{-h,--help}'[Show help message and quit]' \
'--no-plugins[Bypass minitest plugin auto-loading]' \
'(-s --seed)'{-s,--seed=}'[Sets random seed]:seed' \
'(-v --verbose -q --quiet)'{-v,--verbose}'[Show progress processing files]' \
@ -133,7 +133,7 @@ _rails() {
;;
(runner|r)
_arguments \
'(- *)'{-h,--help}'[Show this help message and quit]' \
'(- *)'{-h,--help}'[Show help message and quit]' \
'(-e --environment)'{-e,--environment=}'[The environment to run "runner"]:env:(test development production)' \
'(-w --skip-executor)'{-w,--skip-executor}'[Do not wrap with Rails Executor]' \
'*:: :_files -g "*.rb"' \
@ -147,7 +147,7 @@ _rails() {
;;
(routes)
_arguments \
'(- *)'{-h,--help}'[Show this help message and quit]' \
'(- *)'{-h,--help}'[Show help message and quit]' \
'(-c --controller)'{-c,--controller=}'[Filter by a specific controller]:controller' \
'(-g --grep)'{-g,--grep}'[Grep routes by a specific pattern]' \
'(-E --expanded)'{-E,--expanded}'[Print routes expanded vertically with parts explained]' \
@ -353,7 +353,7 @@ _rails_generate() {
(generate)
local -a opts
opts=(
'(- *)'{-h,--help}'[Show this help message and quit]'
'(- *)'{-h,--help}'[Show help message and quit]'
$runtime_options
'--skip-namespace[Skip namespace]'
'--skip-collision-check[Skip collision check]'

View File

@ -35,7 +35,7 @@
# ------------------------------------------------------------------------------
_arguments \
'(- *)'{-h,--help}'[display this help]' \
'(- *)'{-h,--help}'[display help]' \
'(- *)'{-V,--version}'[display version]' \
'(-0 --zero)'{-0,--zero}'[use the nul character as line separator]'

View File

@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for rubocop 1.82.1 (https://github.com/rubocop/rubocop)
# Completion script for rubocop 1.86.1 (https://github.com/rubocop/rubocop)
#
# ------------------------------------------------------------------------------
# Authors
@ -73,6 +73,7 @@ _arguments \
'(-C --cache)'{-C,--cache}'[Use result caching or not]:flag:(true false)' \
'--cache-root[Set the cache root directory]:dir:_files -/' \
'--lsp[Start a language server listening on STDIN]' \
'--mcp[Start an MCP server that communicates over stdio]' \
'--server[If a server process has not been started yet start the server process and execute inspection with server]' \
'(--restart-server --start-server --stop-server)--restart-server[Restart server process]' \
'(--restart-server --start-server --stop-server)--start-server[Start server process]' \

View File

@ -93,7 +93,7 @@ _sbt() {
unfiltered/unfiltered.g8
scalatra/scalatra-sbt.g8
)
_values 'g8_templates' $g8_templates
_values 'g8_templates' $g8_templates && ret=0
;;
esac
;;

View File

@ -121,10 +121,10 @@ _setcap_capabilities() {
_setcap "$@"
# Local variables:
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# ex: sw=2 ts=2 et filetype=sh
# vim: ft=zsh sw=2 ts=2 et

View File

@ -93,8 +93,8 @@ _tmuxp() {
&& ret=0
;;
(shell)
local sessions="$(__tmux_sessions)"
local windows="$(__tmux_windows)"
local sessions="$(__tmuxp_tmux_sessions)"
local windows="$(__tmuxp_tmux_windows)"
_arguments \
'(- *)'{-h,--help}'[show help message and exit]' \
'-S[pass-through for tmux -S]: :_files' \
@ -173,21 +173,19 @@ __tmuxp_import() {
(project)
if [[ $line[1] == 'tmuxinator' ]]
then
_wanted tmuxinator-projects exp 'tmuxinator projects' compadd $(tmuxinator completions start)
_wanted tmuxinator-projects expl 'tmuxinator projects' compadd $(tmuxinator completions start)
fi
;;
esac
}
__tmux_sessions () {
local tmux_sessions
tmux_sessions=($(_call_program tmux_sessions 'tmux ls -F "#{session_name}"'))
__tmuxp_tmux_sessions() {
local tmux_sessions=($(_call_program tmux_sessions 'tmux ls -F "#{session_name}"'))
echo $tmux_sessions
}
__tmux_windows () {
local tmux_windows
tmux_windows=($(_call_program tmux_sessions 'tmux ls -F "#{window_name}"'))
__tmuxp_tmux_windows() {
local tmux_windows=($(_call_program tmux_sessions 'tmux ls -F "#{window_name}"'))
echo $tmux_windows
}

View File

@ -194,7 +194,7 @@ local -a opts=(
"--excludeFiles[Remove a list of files from the watch mode's processing]:files:_files"
"--libReplacement[Enable library replacement]"
"--erasableSyntaxOnly[Ensures that runtime constructs which are not part of ECMAScript are not allowed]"
'*:: :_files' \
'*:: :_files'
)
if (( $+opt_args[--build] )); then

View File

@ -61,7 +61,7 @@ case $OSTYPE in
;;
(*)
_arguments \
'(- *)'{-h,--help}'[display this help]' \
'(- *)'{-h,--help}'[display help]' \
'(- *)'{-V,--version}'[display version]' \
'(-r --random)'{-r,--random}'[generate random-based uuid]' \
'(-t --time)'{-t,--time}'[generate time-based uuid]' \

View File

@ -35,7 +35,7 @@
# ------------------------------------------------------------------------------
_arguments \
'(- *)'{-h,--help}'[display this help]' \
'(- *)'{-h,--help}'[display help]' \
'(-g --group -p --passwd)'{-g,--group}'[edit group database]' \
'(-g --group -p --passwd)'{-p,--passwd}'[edit passwd database]' \
'(-q --quiet)'{-q,--quiet}'[quiet mode]' \

View File

@ -48,7 +48,7 @@ _wdctl_output_columns() {
}
_arguments -s \
'(- *)'{-h,--help}'[display this help]' \
'(- *)'{-h,--help}'[display help]' \
'(- *)'{-V,--version}'[display version]' \
'(-f --flags)'{-f,--flags}'[print selected flags only]:flags' \
'(-F --noflags)'{-F,--noflags}'[do not print information about flags]' \

View File

@ -23,3 +23,11 @@ local modes=('up\:"bring a wireguard interface up"'\
# 2: Complete interface with all .conf files in /etc/wireguard without the filename extension.
_arguments "1:mode:((${modes}))"\
'2:interface:_path_files -W /etc/wireguard -g "*.conf(^/:r)"'
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -345,7 +345,8 @@ _yarn_cache() {
_arguments \
'(- *)'{-h,--help}'[show help message and exit]' \
'--mirror[remove the global cache files instead of the local cache files]' \
'--all[remove both the global cache files and the local cache files of the current project]'
'--all[remove both the global cache files and the local cache files of the current project]' \
&& ret=0
;;
esac
;;
@ -640,8 +641,6 @@ _yarn_plugin_subcommands() {
(( $+functions[_yarn_run] )) ||
_yarn_run() {
local ret=1
_arguments \
'(- *)'{-h,--help}'[show help message and exit]' \
'--json[format the output as an NDJSON stream]' \
@ -651,10 +650,7 @@ _yarn_run() {
'(-B --binaries-only)'{-B,--binaries-only}'[ignore any user defined scripts and only check binaries]' \
'*--require[preload given module]:module' \
'1: :_yarn_scripts' \
'*:: :_files' \
&& ret=0
return ret
'*:: :_files'
}
(( $+functions[_yarn_set] )) ||
@ -908,7 +904,7 @@ _yarn_scripts() {
fi
local -a candidates=($scripts $binaries)
_values 'scripts' $candidates
_wanted candidates expl 'scripts' compadd -a candidates
}
_yarn "$@"

View File

@ -56,7 +56,7 @@ _zramctl_output_columns() {
}
_arguments \
'(- *)'{-h,--help}'[display this help]' \
'(- *)'{-h,--help}'[display help]' \
'(- *)'{-V,--version}'[display version]' \
'(-a --algorithm)'{-a,--algorithm}'[compression algorithm to use]:algorithm:(lzo lz4 lz4hc deflate 842 zstd)' \
'(-b --bytes)'{-b,--bytes}'[print sizes in bytes rather than in human readable format]:bytes' \

View File

@ -296,7 +296,7 @@ _regex_arguments _cmd /$'[^\0]##\0'/ \( /$'word1(a|b|c)\0'/ ':word:first word:(w
_cmd "$@"
#+END_SRC
in this case the first word can be word1 or word11 followed by an a, b or c, and if the first word contains 11 then a second
word is allowed which can be word2 followed by and a, b, or c, or a filename.
word is allowed which can be word2 or word22 followed by and a, b, or c.
If this sounds too complicated a much simpler alternative is to use the _regex_words function for creating
specifications for _regex_arguments.