Compare commits

...

1057 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
Shohei YOSHIDA 28c5bdcaf8
Merge pull request #1230 from zsh-users/ai_review
Fix various issues that are detected claude code
2026-03-09 23:54:39 +09:00
Shohei YOSHIDA 9dfdcf43c3
fix fail2ban-client completion
- Add missing option description
2026-03-08 23:15:40 +09:00
Shohei YOSHIDA fc2ebff046
Fix openssl completion
- fix typo
2026-03-08 23:15:28 +09:00
Shohei YOSHIDA 8c58e5f118
Fix textutil completion
- fix array value expansion
2026-03-08 23:15:05 +09:00
Shohei YOSHIDA 83ac2d1e89
fix ldattach
- improve description of 1st argument
2026-03-08 23:14:45 +09:00
Shohei YOSHIDA 71ac28d2e0
fix fail2ban-client completion
- fix wrong value completions
2026-03-08 23:05:29 +09:00
Shohei YOSHIDA c2ecb21e86
fix concourse completion
- add missing '='
2026-03-08 23:05:06 +09:00
Shohei YOSHIDA 0b0867f708
fix chromium completion
- correct exclusive flags
2026-03-08 23:04:45 +09:00
Shohei YOSHIDA 6a445e594b
fix dart completion
- fix wrong value completion
2026-03-08 23:04:28 +09:00
Shohei YOSHIDA b9cd906208
fix afew completion
- fix typo
2026-03-08 23:03:41 +09:00
Shohei YOSHIDA 586a4eb4a8
fix fwupdmgr completion
- fix quoting
2026-03-08 23:03:15 +09:00
Shohei YOSHIDA 002a11fdb7
Fix gio completion
- fix quoting
2026-03-08 23:02:56 +09:00
Shohei YOSHIDA 970077590a
fix gist completion
- fix quoting
2026-03-08 23:02:30 +09:00
Shohei YOSHIDA d330cb594f
Fix glances completion
- add missing argument description
2026-03-08 23:02:04 +09:00
Shohei YOSHIDA eca213e017
Fix gtk-launch completion
- fix quoting
2026-03-08 23:01:45 +09:00
Shohei YOSHIDA 5f2fad31ae
Fix inxi completion
Add missing variable definition
2026-03-08 23:01:06 +09:00
Shohei YOSHIDA 370c7e4e58
Fix ldattach completion
- Add first argument definition
2026-03-08 23:00:48 +09:00
Shohei YOSHIDA fe05ed6ed6
Fix nvm completion
- remove needless '='
2026-03-08 23:00:31 +09:00
Shohei YOSHIDA 95b96b10ba
Fix openssl completion
- fix wrong value completions
2026-03-08 23:00:06 +09:00
Shohei YOSHIDA a535d6d789
Fix openvpn3 completion
- fix wrong variable name
2026-03-08 22:59:40 +09:00
Shohei YOSHIDA eeb33f99ce
fix _port completion
- fix wrong option definitions
2026-03-08 22:59:16 +09:00
Shohei YOSHIDA d9dd3f1a56
Fix protoc completion
- add missing '='
2026-03-08 22:58:56 +09:00
Shohei YOSHIDA eeda4af31d
fix qmk completion
- fix wrong short flag name
2026-03-08 22:57:21 +09:00
Shohei YOSHIDA c1b7ac5bf0
Fix rails completion
- fix wrong variable usage
2026-03-08 22:56:44 +09:00
Shohei YOSHIDA ee1514fc41
Fix rubocop completion
- fix wrong short flag name
2026-03-08 22:56:19 +09:00
Shohei YOSHIDA 5d8642a3e8
Fix svm completion
- fix wrong function name
2026-03-08 22:56:03 +09:00
Shohei YOSHIDA cf3aafe66c
fix textutil completion
- fix wrong variable expantion
2026-03-08 22:55:42 +09:00
Shohei YOSHIDA 1f058a345f
fix tsc completion
- set '-C' flag of _arguments
- remove duplicated flags
2026-03-08 22:55:10 +09:00
Shohei YOSHIDA 6a282fe7fa
fix ufw completion
- fix the case when empty string is passed
2026-03-08 22:54:27 +09:00
Shohei YOSHIDA c7f779e025
fix uuidd completion
- fix typo
2026-03-08 22:53:58 +09:00
Shohei YOSHIDA 0737ba0f1e
Fix virtualbox completion
- avoid overriding internal variable names
- fix wrong switch case labels
2026-03-08 22:53:14 +09:00
Shohei YOSHIDA 81438c5a2e
Fix vnstat completion
- update exclusive flags
2026-03-08 22:52:49 +09:00
Shohei YOSHIDA 1fd073d384
fix yarn completion
- do not use global variable
2026-03-08 22:52:32 +09:00
Shohei YOSHIDA 4a9df2bdc8
fix fail2ban-client
- fix wrong switch syntax
- rename function names according to the convention
2026-03-08 22:15:05 +09:00
Shohei YOSHIDA ce1145e8ad
fix dhcpcd completion
- fix wrong short option name
2026-03-08 22:12:39 +09:00
Shohei YOSHIDA a110107c61
Fix chromium completion
- fix wrong _alternative usage
2026-03-08 22:12:07 +09:00
Shohei YOSHIDA 5021b01fd3
Fix bitcoin-cli completion
- fix using global variable issue
2026-03-08 22:11:43 +09:00
Shohei YOSHIDA 68549429e8
Fix bundle completion
- fix wrong option name
- fix typo
2026-03-08 22:11:15 +09:00
Shohei YOSHIDA 5988583ac4
Fix conan completion
- add missing completion
2026-03-08 22:10:54 +09:00
Shohei YOSHIDA 271e06295a
Fix chcpu completion
- fix wrong short option name
2026-03-08 22:10:33 +09:00
Shohei YOSHIDA 7b58f23040
Fix ecdsautil completion
- Add missing '\\'
2026-03-08 22:09:52 +09:00
Shohei YOSHIDA 88527a2778
Fix cppcheck completion
- remove duplicated options
- fix file name completion
2026-03-08 22:09:19 +09:00
Shohei YOSHIDA 85543dcb35
Fix cf completion
- fix a lot of broken syntax
2026-03-08 22:08:49 +09:00
Shohei YOSHIDA 324622c0d7
Fix dad completion
- remove needless colon
2026-03-08 22:08:22 +09:00
Shohei YOSHIDA 047e1a84fd
Fix dart completion
- fix wrong option name
2026-03-08 22:07:58 +09:00
Shohei YOSHIDA d6e87d4bb0
Fix emacs completion
- fix wrong option names
- fix wrong description syntax
2026-03-08 22:07:27 +09:00
Shohei YOSHIDA 81a016309d
Fix blkid completion
- fix wrong short name option
- correct _files flag to complete device files
2026-03-08 22:06:47 +09:00
Shohei YOSHIDA 63fb9ca323
Fix distro_info completion
- fix typo
2026-03-08 22:06:33 +09:00
Shohei YOSHIDA 96821fc50a
fix bento4 completion
- quote array strings for value that contains spaces
2026-03-08 22:05:58 +09:00
Shohei YOSHIDA 3acc91b1d6
fix archlinux-java completion
- fix wrong name of _describe
2026-03-08 22:05:12 +09:00
Shohei YOSHIDA 3f222623a2
Fix afew
- fix eclusive option definition
2026-03-08 22:04:45 +09:00
Shohei YOSHIDA 189ee541a1
fix fail2ban-regex completion
- fix wrong exclusive option syntax
2026-03-08 22:03:58 +09:00
Shohei YOSHIDA 9b16dadea5
Fix fallocate
- fix wrong short name option
2026-03-08 22:03:37 +09:00
Shohei YOSHIDA b835a4a76e
fix fwupdmgr completion
- fix wrong _alternative usage
- fix `-v` definition
- fix exclusive option syntax
2026-03-08 22:02:25 +09:00
Shohei YOSHIDA 95b7c563b2
Fix gas completion
- remove needless '|'
2026-03-08 22:02:04 +09:00
Shohei YOSHIDA 53e705a257
Fix glances completion
- fix typo
2026-03-08 22:01:47 +09:00
Shohei YOSHIDA d5ac886499
Fix inxi completion
- fix typo
2026-03-08 22:01:12 +09:00
Shohei YOSHIDA 84e54cb11a
Fix ipcrm completion
- remove needless '-'
2026-03-08 22:00:46 +09:00
Shohei YOSHIDA 3fefbee79e
fix jmeter completion
- remove duplicated options
2026-03-08 22:00:25 +09:00
Shohei YOSHIDA c852be29ac
fix kak completion
- `-l` option doesn't take any values
2026-03-08 21:59:43 +09:00
Shohei YOSHIDA 759f22227d
Fix l3build completion
- fix typo
2026-03-08 21:59:27 +09:00
Shohei YOSHIDA d101590b86
Fix language_code completion
- remove incorrect value
2026-03-08 21:58:53 +09:00
Shohei YOSHIDA 1b5eb7da8c
fix ldattach
- remove needless comma from exclusive option list
2026-03-08 21:58:29 +09:00
Shohei YOSHIDA 0b18ad83fc
Fix lsipc completion
- Fix wrong description
- Fix wrong short option name
2026-03-08 21:57:58 +09:00
Shohei YOSHIDA fc4f116cec
fix mc completion
- remove obsoleted options
2026-03-08 21:57:33 +09:00
Shohei YOSHIDA bff5ba4c7a
fix neo completion
- fix wrong option description
2026-03-08 21:57:10 +09:00
Shohei YOSHIDA d736522d58
Fix nftables completion
- remove needless debug print
- fix wrong value overwriting
2026-03-08 21:56:09 +09:00
Shohei YOSHIDA f6d745a6ef
Fix node completion
- fix wrong value completions
2026-03-08 21:55:46 +09:00
Shohei YOSHIDA 8a714f0ab2
fix openssl completion
- correct option value format
2026-03-08 21:54:24 +09:00
Shohei YOSHIDA 2bcf6ca857
Fix openvpn3 completion
And apply formatting
2026-03-08 21:54:02 +09:00
Shohei YOSHIDA 6a6e4a9d5f
Fix phing completion
- remove duplicate options
2026-03-08 21:53:05 +09:00
Shohei YOSHIDA 41aee557c2
fix pixz completion
- fix unquoted pattern
2026-03-08 21:52:07 +09:00
Shohei YOSHIDA ae43a3a125
Fix pkcon completion
- fix wrong short option name
2026-03-08 21:51:27 +09:00
Shohei YOSHIDA 106235197b
Fix pm2 completion
- fix exclusive options
- fix wrong function name
2026-03-08 21:48:55 +09:00
Shohei YOSHIDA a54108c932
Fix qmk
fix exclusive option syntax
2026-03-08 21:48:26 +09:00
Shohei YOSHIDA 769b2aac92
Fix _rails completion
fix directory traversal
2026-03-08 21:44:09 +09:00
Shohei YOSHIDA 410498264d
fix shallow-backup completion
- fix wrong syntax
- simplify code
2026-03-08 21:43:42 +09:00
Shohei YOSHIDA 0f350f3bdb
Fix shellcheck completion
- fix wrong path completion
2026-03-08 21:42:35 +09:00
Shohei YOSHIDA cc7816fefc
Fix sox_ng completion
- remove needless period
2026-03-08 21:41:43 +09:00
Shohei YOSHIDA 66dd5eb527
fix subliminal completion
- Remove needless comma
2026-03-08 21:41:25 +09:00
Shohei YOSHIDA 18e6e3557a
fix supervisord completion
- fix typo
- `--help` doesn't take any arguments
- fix wrong short option name
2026-03-08 21:41:08 +09:00
Shohei YOSHIDA 530a4f68ed
fix tmuxp completion
- fix wrong exclusive options
2026-03-08 21:40:00 +09:00
Shohei YOSHIDA f103e01de0
fix tox completion
- fix typos
2026-03-08 21:39:19 +09:00
Shohei YOSHIDA e4c9b686cd
fix tsc completion
- add missing ':'
2026-03-08 21:38:58 +09:00
Shohei YOSHIDA 9d7f1bd8b6
Fix ufw completion
- remove the needless function
2026-03-08 21:38:37 +09:00
Shohei YOSHIDA ba9b7bb7d3
Fix uuid completion
- fix wrong option names
2026-03-08 21:37:51 +09:00
Shohei YOSHIDA 48cd968441
fix _vipw completion
- fix typo
2026-03-08 21:37:00 +09:00
Shohei YOSHIDA d255543a98
Fix yarn completion
- fix typo
- fix exclusive option syntax
2026-03-08 21:36:23 +09:00
Shohei YOSHIDA 14d065df4f
Remove artisan completion
Because artisan support zsh(and another shell completion) by itself
2026-03-08 20:58:58 +09:00
Shohei YOSHIDA fb925c30a5
Remove deprecated android command completion
It has been deprecated since 2017.
2026-03-08 20:55:07 +09:00
Shohei YOSHIDA f4b2b49aa2
Remove homestead completion
It has been depreacted for several years.
2026-03-08 20:38:30 +09:00
Shohei YOSHIDA 84615f3d0b
Merge pull request #1229 from zsh-users/update-node
Update node completion to version 25.8.0
2026-03-06 11:42:12 +09:00
Shohei YOSHIDA 06a81722f1
Update node completion to version 25.8.0 2026-03-05 00:58:07 +09:00
Shohei YOSHIDA 3a218ab0ec
Merge pull request #1228 from nbkenichi/port
Update MacPorts completion
2026-03-03 18:27:13 +09:00
nbkenichi a083ff773d
Update MacPorts completion
- add six actions that use _port_installed_packages for completion
- add "usage" as a start point for completion, in addition to "help"
2026-03-03 13:21:30 +09:00
Shohei YOSHIDA 684021f2a1
Merge pull request #1227 from zsh-users/update_port
Update MacPorts completion
2026-02-22 11:20:04 +09:00
Shohei YOSHIDA 8d5f60cf38 add missing colon 2026-02-21 20:15:01 +09:00
Shohei YOSHIDA 80613d862a Add relationship selectors 2026-02-20 14:54:06 +09:00
Shohei YOSHIDA b5a9ce4b37 Update global option descriptions according to latest manpage 2026-02-20 14:39:59 +09:00
Shohei YOSHIDA 79da59126e fix typo 2026-02-20 14:36:14 +09:00
Shohei YOSHIDA b302f21ed9 Fix cache handling, it must work as the original implementation 2026-02-19 15:03:57 +09:00
Shohei YOSHIDA 4c84ebad53
Merge pull request #1225 from zsh-users/update
Update dget, diana, do-release-upgrade, direnv, clang-format, jest
2026-02-18 19:08:20 +09:00
Shohei YOSHIDA 39bbdda416
Merge pull request #1224 from zsh-users/remove_drush
Remove drush completion
2026-02-18 19:06:37 +09:00
Shohei YOSHIDA f344c2ca77 Update MacPorts completion
- Remove deprecated commands
- Add new commands(snapshot)
- Support variant completion
2026-02-18 18:04:28 +09:00
Shohei YOSHIDA fbddce1074
Update jest completion and shorten too long description 2026-02-18 12:01:25 +09:00
Shohei YOSHIDA ea15ee250e
simplify array completion in clang-format 2026-02-18 09:06:11 +09:00
Shohei YOSHIDA 4375bc3e03
Remove drush completion
Because drush supports zsh completion now.
2026-02-17 14:26:18 +09:00
Shohei YOSHIDA 532813bd3b
Add export completion and disallow alias 2026-02-17 14:17:14 +09:00
Shohei YOSHIDA f6c262ad83
Remove deprecated flag completions 2026-02-17 13:56:45 +09:00
Shohei YOSHIDA 9c17cce4ef
apply formatting and simplify code 2026-02-17 13:56:39 +09:00
Shohei YOSHIDA a5f0a52034
Add missing '-k' flag completion and cleanup code 2026-02-17 13:55:42 +09:00
Shohei YOSHIDA 8d93e4c1ee
Merge pull request #1223 from zsh-users/update-golang
Update golang completion to version 1.26.0
2026-02-15 23:29:28 +09:00
Shohei YOSHIDA 3429cd2c1f
Merge pull request #1222 from zsh-users/update-flutter
Update flutter and dart completions
2026-02-15 23:29:09 +09:00
Shohei YOSHIDA 4dbdbd4f8b
Update 'go tool pprof' options 2026-02-13 15:06:34 +09:00
Shohei YOSHIDA 5a5edf6914
update fix subcommand for go 1.26 2026-02-12 16:57:28 +09:00
Shohei YOSHIDA 39b0b06c15
Update flutter completions to version 3.41 2026-02-12 15:58:10 +09:00
Shohei YOSHIDA d4af3659cc
update dart completion to version 3.11 2026-02-12 15:49:35 +09:00
Shohei YOSHIDA 46c88449e6
Support new subcommand 'widget-preview' completion 2026-02-12 10:10:04 +09:00
Shohei YOSHIDA 989d044545
Merge pull request #1221 from zsh-users/add-bento4
Add Bento4 tool completions
2026-02-04 15:29:27 +09:00
Shohei YOSHIDA 318dc0bec5
Add Bento4 tool completions 2026-02-03 13:38:16 +09:00
Shohei YOSHIDA a83d61b6c6
Merge pull request #1220 from zsh-users/update-node
Update node.js completion to version v25.5
2026-01-27 19:06:17 +09:00
Shohei YOSHIDA ad47c4a28f
Update node.js completion to version v25.5 2026-01-27 17:00:56 +09:00
Shohei YOSHIDA 7dd26c5d5c
Merge pull request #1219 from SyrupyTasty/master
Fix Decrypt completion
2026-01-26 00:31:32 +09:00
Syrupy 8794fdca69
Fix Decrypt completion
Fix 'decrypt the input data' option
2026-01-25 12:18:42 +08:00
Shohei YOSHIDA d41e237045
Merge pull request #1218 from zsh-users/refactor-jrnl
Refactoring jrnl completion
2026-01-24 08:46:30 +09:00
Shohei YOSHIDA 93dc422070
Refactoring jrnl completion
- Apply format
- Update URL
- Update flags to latest version
2026-01-24 08:45:05 +09:00
Shohei YOSHIDA 6370f5a58f
Merge pull request #1217 from Tillerino/master
jrnl: Completion for tags
2026-01-23 18:31:53 +09:00
Tillmann Gaida 8ecee23cab jrnl: Add completion for tags 2026-01-23 08:49:57 +01:00
Shohei YOSHIDA 8a994c20d7
Merge pull request #1215 from zsh-users/update-qmk
Update qmk completion to version 1.2.0
2026-01-21 18:23:28 +09:00
Shohei YOSHIDA 672ae69366
Merge pull request #1216 from zsh-users/update-node-js
Update node.js completion to version 25.4.0
2026-01-21 15:32:50 +09:00
Shohei YOSHIDA 7288768da6
Update node.js completion to version 25.4.0 2026-01-20 12:29:26 +09:00
Shohei YOSHIDA 1ba992dcde
Update qmk completion to version 1.2.0 2026-01-19 17:40:18 +09:00
Shohei YOSHIDA c31ad08eff
Merge pull request #1213 from Magniquick/master
Add gio completion
2026-01-14 11:32:08 +09:00
Magniquick 05a1cf8a8a fix gio completions 2026-01-14 06:23:07 +05:30
Magniquick 9f8413696d Add gio completion 2025-12-31 18:32:53 +05:30
Shohei YOSHIDA 2733ff9818
Merge pull request #1212 from zsh-users/update-rubocop
Update rubocop completion to version 1.82.1
2025-12-27 13:58:22 +09:00
Shohei YOSHIDA d88254ecc8
Update rubocop completion to version 1.82.1
- Fix typo
- Add new --plugin flag
- remove needless code
2025-12-26 19:54:14 +09:00
Shohei YOSHIDA d20ceda628
Merge pull request #1209 from LeeBigelow/xdg-mime-completion
add xdg-mime completion file
2025-12-24 12:22:21 +09:00
Shohei YOSHIDA f5a724c6b4
Merge pull request #1211 from zsh-users/sox-support-older-commands
Add older command names of sox
2025-12-24 00:15:55 +09:00
Shohei YOSHIDA 3a6b825648
Add older command names of sox 2025-12-23 23:46:24 +09:00
Shohei YOSHIDA 7fb495cab5
call completion function directly 2025-12-23 13:17:14 +09:00
Shohei YOSHIDA 779f02a78b
Fix appdirs type
This should be array not associative array. And fix its usage too
to pass it to _files correctly
2025-12-23 13:14:42 +09:00
Shohei YOSHIDA 2cff35a45d
Call completion function explicitly
This avoid pressing tab twice to complete subcommand
2025-12-23 13:12:45 +09:00
Shohei YOSHIDA 64484169e2
Add emacs local variables too 2025-12-23 13:11:59 +09:00
Shohei YOSHIDA dcb4a996ad
Merge pull request #1208 from zsh-users/add_sox_ng
Add sox_ng completion
2025-12-23 11:50:43 +09:00
Lee Bigelow 0db1486d27
Add files via upload
completion file for xdg-mime
2025-12-22 15:39:55 -03:30
Shohei YOSHIDA b5e4884e5f
Add sox_ng completion 2025-12-22 16:55:26 +09:00
Shohei YOSHIDA 727876e7f6
Merge pull request #1207 from zsh-users/update-tox
Update tox completion to version 4.32.0
2025-12-19 15:22:10 +09:00
Shohei YOSHIDA 5a51b45f36
Update tox completion to version 4.32.0 2025-12-19 15:18:40 +09:00
Shohei YOSHIDA 6ceec63710
Merge pull request #1179 from zsh-users/update-yarn
Update yarn completion to version 4.11.0
2025-12-16 19:57:49 +09:00
Shohei YOSHIDA 9cade7e492
Update yarn completion to version 4.11.0 2025-12-16 18:47:25 +09:00
Shohei YOSHIDA 80e1300bfa
Merge pull request #1206 from zsh-users/update-emulator
Update emulator completion
2025-12-16 17:32:25 +09:00
Shohei YOSHIDA a179824294
Merge pull request #1178 from zsh-users/openssl
Update OpenSSL completion to version 3.5
2025-12-16 16:42:16 +09:00
Shohei YOSHIDA daa3d5a888
Merge pull request #1203 from zsh-users/update_zcash_cli
Update zcash-cli completion to version v6.10.0
2025-12-16 11:38:13 +09:00
Shohei YOSHIDA 531d8ce5e7
Merge pull request #1205 from zsh-users/update-macos-completions
refactoring macOS command completions
2025-12-15 23:12:18 +09:00
Shohei YOSHIDA 9a54b251df
refactoring macOS command completions 2025-12-15 23:11:37 +09:00
Shohei YOSHIDA c72e40337a
Merge pull request #1204 from zsh-users/remove_sfdx
Remove sfdx completion
2025-12-15 23:10:00 +09:00
Shohei YOSHIDA 053d03a42c
Remove sfdx completion
Salesforce CLI now supports bash/powershell/zsh completion by itself
2025-12-15 18:02:06 +09:00
Shohei YOSHIDA b940cdb555 Update emulator completion 2025-12-15 16:21:09 +09:00
Shohei YOSHIDA 434e2fae7a
Update zcash-cli completion to version v6.10.0 2025-12-14 22:35:31 +09:00
Shohei YOSHIDA e673a26633
Merge pull request #1200 from zsh-users/update-concourse
Update concourse completion to ver 7.14.3
2025-12-14 15:32:03 +09:00
Shohei YOSHIDA 75a4f7b2a4
Update concourse completion to ver 7.14.3 2025-12-14 15:30:34 +09:00
Shohei YOSHIDA 65e43503f7
Merge pull request #1199 from zsh-users/refactor_svm
Refactoring svm completion
2025-12-14 13:41:24 +09:00
Shohei YOSHIDA 5f3b8a0f7d
Merge pull request #1201 from zsh-users/refactor_supervisord
Refactoring supervisord utilities' completion
2025-12-14 13:40:52 +09:00
Shohei YOSHIDA 02f3cfd280
Merge pull request #1202 from zsh-users/refactor_rslsync
Refactoring rslsync
2025-12-14 13:40:37 +09:00
Shohei YOSHIDA 35ffa5016d
Refactoring rslsync 2025-12-13 17:43:34 +09:00
Shohei YOSHIDA 44672f36f4
Refactoring supervisord utilities' completion
And add pidproxy completion
2025-12-13 16:56:27 +09:00
Shohei YOSHIDA c838dc990b
Refactoring svm completion
And fix not being able to get current scala version
2025-12-13 12:46:00 +09:00
Shohei YOSHIDA b9f1efca5b
Merge pull request #1194 from zsh-users/refactoring-emacs
merge emacs and emacsclient completion file
2025-12-13 01:40:20 +09:00
Shohei YOSHIDA 0677484d25
Merge pull request #1196 from zsh-users/refactor_mussh
Refactoring mussh completion and implement TODOs
2025-12-13 01:40:05 +09:00
Shohei YOSHIDA 9c57177447
Merge pull request #1197 from zsh-users/remove-rkt
Remove rkt completion
2025-12-13 01:39:44 +09:00
Shohei YOSHIDA 7fdc6c0fa2
Merge pull request #1198 from zsh-users/remove-fleetctl
Remove fleetctl
2025-12-13 01:39:33 +09:00
Shohei YOSHIDA 0cc8dfaea5
Remove rkt completion
It is no longer maintained
2025-12-13 00:43:51 +09:00
Shohei YOSHIDA 0f6ab54b85
Remove fleetctl
It is no longer maintained
2025-12-13 00:40:56 +09:00
Shohei YOSHIDA 91256ebd52
Refactoring mussh completion and implement TODOs 2025-12-12 19:51:26 +09:00
Shohei YOSHIDA b07586490b
Merge pull request #1195 from zsh-users/remove_rsvm
Remove rsvm completion
2025-12-12 19:38:44 +09:00
Shohei YOSHIDA 1f7907894f
Remove rsvm completion 2025-12-12 18:46:14 +09:00
Shohei YOSHIDA 8ec4565397
merge emacs and emacsclient completion file 2025-12-12 17:19:08 +09:00
Shohei YOSHIDA d59350592b
Merge pull request #1193 from zsh-users/remove_stack
Remove stack completion
2025-12-11 15:46:19 +09:00
Shohei YOSHIDA 96cdf49da3
Remove stack completion
Because stack supports shell autocompletion now.
You can generate zsh completion by 'stack --zsh-completion-script stack'
2025-12-11 15:45:05 +09:00
Shohei YOSHIDA 737bce8e4b
Merge pull request #1182 from zsh-users/tsx
Add tsx completion
2025-12-11 15:22:32 +09:00
Shohei YOSHIDA c939857cbe
Merge pull request #1192 from zsh-users/update-phing
Update phing completion to version 3.1.0 and refactoring
2025-12-11 15:21:18 +09:00
Shohei YOSHIDA cb55f8a4d3
Merge pull request #1191 from zsh-users/update-l3build
Update l3build
2025-12-11 15:21:01 +09:00
Shohei YOSHIDA 51e5c047c2
Update l3build completion and refactoring to maintain easily 2025-12-11 15:20:25 +09:00
Shohei YOSHIDA b45ffc1c8a
Update phing completion to version 3.1.0 and refactoring 2025-12-11 13:53:19 +09:00
Shohei YOSHIDA 7dd5752396
Merge pull request #1190 from zsh-users/update-age
Update age completion and support age-keygen
2025-12-10 23:44:06 +09:00
Shohei YOSHIDA 2f81ccb55e
Update age completion and support age-keygen 2025-12-10 16:27:16 +09:00
Shohei YOSHIDA 5991654348
Merge pull request #1189 from zsh-users/fix-url
fix project URL
2025-12-10 15:51:32 +09:00
Shohei YOSHIDA 04b4ec2af7
fix project URL 2025-12-10 14:36:37 +09:00
Shohei YOSHIDA e776d2c430
Merge pull request #1188 from zsh-users/remove_chef
Remove chef
2025-12-10 14:28:14 +09:00
Shohei YOSHIDA 76bdbc994e
Remove chef
It is difficult to maintain because chef is no longer free software
we cannot get its tools free anymore.
2025-12-10 14:18:22 +09:00
Shohei YOSHIDA c3b2ff2d8f
Merge pull request #1187 from zsh-users/misc
Fix minors
2025-12-10 13:45:22 +09:00
Shohei YOSHIDA d2ab32cce6
Fix minors
- typos
- missing semicolons
2025-12-10 13:44:13 +09:00
Shohei YOSHIDA 6d3a599fe9
Merge pull request #1186 from zsh-users/remove_concourse_fly
Remove fly completion from concourse
2025-12-10 12:59:32 +09:00
Shohei YOSHIDA ffab2ffe78
Remove fly completion from concourse
Because fly command now supports generating shell completion

See
- https://concourse-ci.org/fly.html#fly-completion
2025-12-10 12:45:52 +09:00
Shohei YOSHIDA c0be9df951
Merge pull request #1183 from zsh-users/remove_google
Remove google completion
2025-12-10 12:11:16 +09:00
Shohei YOSHIDA c6c20a469e
Merge pull request #1184 from zsh-users/remove_console
Remove console completion
2025-12-10 12:10:00 +09:00
Shohei YOSHIDA 80e347f791
Merge pull request #1185 from zsh-users/remove_postgres_utils
Remove postgres utility completions
2025-12-10 12:09:28 +09:00
Shohei YOSHIDA 4e767d9139
Remove postgres utility completions
Because zsh supports those commands by itself now

See
 - https://github.com/zsh-users/zsh/blob/master/Completion/Unix/Command/_postgresql
2025-12-10 12:06:44 +09:00
Shohei YOSHIDA d71f2edbc7
Remove console completion
Because newer console supports the completion file genration.

See https://symfony.com/doc/current/console.html#console-completion
2025-12-10 12:00:07 +09:00
Shohei YOSHIDA 1dbde8a199
Remove google completion
google command has not been maintained since 2015 and it no
longer works for google services nowadays
2025-12-10 11:55:21 +09:00
Shohei YOSHIDA c1445ca6ce
Merge pull request #1181 from zsh-users/remove_play
Remove play completion
2025-12-10 11:27:48 +09:00
Shohei YOSHIDA 7e8118e466
Remove play completion
Play framework is now based on sbt(https://www.scala-sbt.org/) and
it doesn't provide play command anymore and older versions that
provide play command had been deprecated more than 10 years ago.
2025-12-10 09:42:46 +09:00
Shohei YOSHIDA c32a6d756b
Add tsx completion 2025-12-09 19:52:51 +09:00
Shohei YOSHIDA 8ddc4416dd
Merge pull request #1180 from zsh-users/update-bundle
update bundle completion to version 4.0.0
2025-12-04 00:32:32 +09:00
Shohei YOSHIDA ff28a2686d
update bundle completion to version 4.0.0 2025-12-03 13:29:31 +09:00
Shohei YOSHIDA f20012f35f
Update OpenSSL completion to version 3.5 2025-12-01 17:32:10 +09:00
Shohei YOSHIDA 584dfd5d30
Merge pull request #1176 from zsh-users/add-sslscan
Add sslscan completion
2025-11-25 12:08:57 +09:00
Shohei YOSHIDA c0200438ed
Add sslscan completion 2025-11-24 23:15:25 +09:00
Shohei YOSHIDA 46317b36e2
Merge pull request #1171 from zsh-users/update-ghc
Update ghc completion
2025-11-17 12:22:56 +09:00
Shohei YOSHIDA 8cecc84fb3
Merge pull request #1174 from zsh-users/remove-augtool
Remove augtool completion
2025-11-16 02:56:03 +09:00
Shohei YOSHIDA 508f2971c2
Remove augtool completion
This is already provided by zsh itself
2025-11-16 02:40:48 +09:00
Shohei YOSHIDA 094a7e79b0
Merge pull request #1172 from zsh-users/augeas
Add augeas tools
2025-11-15 21:43:49 +09:00
Shohei YOSHIDA e4072c73ba
Merge pull request #1173 from zsh-users/update-cap
Update cap completion
2025-11-15 21:42:54 +09:00
Shohei YOSHIDA c30c5509e1
Update cap completion 2025-11-15 21:23:02 +09:00
Shohei YOSHIDA 7e671b08d1
Add augeas tools 2025-11-15 18:36:42 +09:00
Shohei YOSHIDA 572ed9638f
Update flags from newer ghc documents 2025-11-14 12:54:05 +09:00
Shohei YOSHIDA c16614f37e
Apply formatting and refactor ghc-pkg completion 2025-11-13 16:33:44 +09:00
Shohei YOSHIDA 10147cfb99
Merge pull request #1170 from zsh-users/diskutils
Add macOS diskutil completion
2025-11-13 14:30:04 +09:00
Shohei YOSHIDA b664a1e7f3
Add macOS diskutil completion 2025-11-12 20:07:16 +09:00
Shohei YOSHIDA 48203e84ae
Merge pull request #1169 from zsh-users/certbot
Add certbot completion
2025-11-12 14:53:23 +09:00
Shohei YOSHIDA 863c0116e1
Add certbot completion 2025-11-11 22:07:59 +09:00
Shohei YOSHIDA 7fbdd25526
Merge pull request #1168 from zsh-users/update-mac-completion
Update mac completion
2025-11-04 07:50:27 +09:00
Shohei YOSHIDA 55cf78b510
Merge pull request #1167 from zsh-users/add-completions
Add chpasswd and yamllint completions
2025-11-02 00:35:31 +09:00
Shohei YOSHIDA 8433d73097
add yamllint completion 2025-10-30 23:06:37 +09:00
Shohei YOSHIDA 97621528c6
add chpasswd completion 2025-10-30 23:03:42 +09:00
Shohei YOSHIDA 1262853ed3
Merge pull request #1166 from zsh-users/add-more-util-linux
Add more util-linux completions
2025-10-30 17:08:12 +09:00
Shohei YOSHIDA 5a79f8c721 Add textutil completion 2025-10-30 16:01:01 +09:00
Shohei YOSHIDA 59e36ba77b Update screencapture completion 2025-10-30 15:30:05 +09:00
Shohei YOSHIDA 7f461a9a40 update networkQuality completion 2025-10-30 15:26:10 +09:00
Shohei YOSHIDA 0b9424d0c8
add rev completion 2025-10-29 20:51:33 +09:00
Shohei YOSHIDA 5384be72c5
add chcpu completion 2025-10-29 20:39:09 +09:00
Shohei YOSHIDA 7c4d643f58
add vipw completion 2025-10-29 20:33:43 +09:00
Shohei YOSHIDA d1478b05be
add wdctl completion 2025-10-29 20:11:54 +09:00
Shohei YOSHIDA a8fcd0402f
add zramctl completion 2025-10-29 12:37:27 +09:00
Shohei YOSHIDA b2d0232473
Merge pull request #1165 from zsh-users/add-util-linux
Add more util-linux command completions
2025-10-27 12:26:26 +09:00
Shohei YOSHIDA b66a1aba63
add lslogins completion 2025-10-26 16:44:52 +09:00
Shohei YOSHIDA 667494f334
add lsmem completion 2025-10-26 16:44:48 +09:00
Shohei YOSHIDA 215780cd9c
add lslocks completion 2025-10-26 16:43:49 +09:00
Shohei YOSHIDA 20423a74f8
add lsipc completion 2025-10-26 16:43:42 +09:00
Shohei YOSHIDA 55e9d8e6eb
Merge pull request #1164 from zsh-users/update-rails
update rails completion
2025-10-24 20:02:34 +09:00
Shohei YOSHIDA e51f50f5a5
update rails completion 2025-10-22 14:48:54 +09:00
Shohei YOSHIDA 1b97a1492b
Merge pull request #1163 from zsh-users/add-swap-utils
Add swap utils of util-linux
2025-10-22 00:25:16 +09:00
Shohei YOSHIDA 4a7179ffff
add swaplabel completion 2025-10-20 23:51:42 +09:00
Shohei YOSHIDA 7aeefd0020
add swapoff completion 2025-10-20 23:49:39 +09:00
Shohei YOSHIDA 9e2a5239dc
add swapon completion 2025-10-20 23:47:36 +09:00
Shohei YOSHIDA c47e10641a
Merge pull request #1162 from zsh-users/add-distro-info
Add distro-info completion
2025-10-19 10:17:19 +09:00
Shohei YOSHIDA c49bb88997
Add distro-info completion 2025-10-18 10:13:54 +09:00
Shohei YOSHIDA 5fd23d5376
Merge pull request #1161 from zsh-users/update-node-25.0.0
Update node.js completion to 25.0.0
2025-10-17 00:53:48 +09:00
Shohei YOSHIDA e74df1347f
Update node.js completion to 25.0.0 2025-10-16 11:36:50 +09:00
Shohei YOSHIDA 41a21a4d57
Merge pull request #1160 from zsh-users/update-2025-10
Update completions
2025-10-15 10:27:48 +09:00
Shohei YOSHIDA 1cbda7f841
update ts-node 2025-10-14 12:04:39 +09:00
Shohei YOSHIDA 26e54f9772
update protoc 2025-10-14 11:57:29 +09:00
Shohei YOSHIDA d682198a7b
fix option 2025-10-14 11:54:50 +09:00
Shohei YOSHIDA 4e8c09fa83
update glances 2025-10-14 11:52:39 +09:00
Shohei YOSHIDA a5f749cd4a
update exportfs 2025-10-14 11:44:47 +09:00
Shohei YOSHIDA 483c208156
Update emacs 2025-10-14 11:44:38 +09:00
Shohei YOSHIDA 173a14c436
Merge pull request #1154 from SuCicada/master
Fix [virtualbox][vboxmanage controlvm] subcommand completion order an…
2025-09-22 16:36:36 +09:00
SuCicada 1ffeeec3b6 Fix [virtualbox][vboxmanage controlvm] subcommand completion order and regex are incorrect 2025-09-22 14:59:42 +09:00
Shohei YOSHIDA d08cee09ce
Merge pull request #1152 from notmike-5/master
src/_bitcoin-cli: refresh argument/subcommand lists that had become stale
2025-09-14 14:13:53 +09:00
Shohei YOSHIDA 058383dc2d
Fix argument parameters 2025-09-14 12:46:00 +09:00
notmike d3d42e70ec src/_bitcoin-cli: updated flags for arguments/defaults 2025-09-13 16:22:51 -06:00
notmike 07ad869b7a src/_bitcoin-cli: refresh option/subcommand lists that had become stale 2025-09-10 16:15:03 -06:00
Shohei YOSHIDA b48b5de9d8
Merge pull request #1151 from zsh-users/update-chatblade
Update chatblade completion to version 0.7.0
2025-09-05 23:30:32 +09:00
Shohei YOSHIDA cd3cd0ab3b
Update chatblade completion to version 0.7.0 2025-09-05 12:42:18 +09:00
Shohei YOSHIDA 35228e5ac0
Merge pull request #1150 from zsh-users/nvm
Update nvm completion to version 0.40.3
2025-09-02 11:14:36 +09:00
Shohei YOSHIDA 3c89229e0e
Update nvm completion to version 0.40.3 2025-09-01 14:24:21 +09:00
Shohei YOSHIDA 8d5a945c93
Merge pull request #1149 from zsh-users/update_vnstat
Update vnstat completion to version 2.13
2025-08-24 12:37:43 +09:00
Shohei YOSHIDA cafb93cd93
Update vnstat completion to version 2.13 2025-08-23 19:14:12 +09:00
Shohei YOSHIDA e94efecefa
Merge pull request #1148 from zsh-users/update-gpgconf
Update gpgconf completion to version 2.4.4
2025-08-21 22:48:50 +09:00
Shohei YOSHIDA 1587db0b96
Update gpgconf completion to version 2.4.4 2025-08-21 13:49:33 +09:00
Shohei YOSHIDA 5884510698
Merge pull request #1147 from zsh-users/update-flutter-dart
Update flutter and dart completions
2025-08-15 17:07:56 +09:00
Shohei YOSHIDA cc16a51600
Update flutter completion to 3.35.1 2025-08-15 12:20:28 +09:00
Shohei YOSHIDA faa7c0f755
Update dart completion to version 3.9.0 2025-08-15 11:56:27 +09:00
Shohei YOSHIDA 90be2a206f
Merge pull request #1146 from zsh-users/go-1.25
Update flags for go 1.25.0
2025-08-13 15:36:30 +09:00
Shohei YOSHIDA cc18accaac
Update flags for go 1.25.0 2025-08-13 10:40:21 +09:00
Shohei YOSHIDA f55325505d
Merge pull request #1145 from zsh-users/add-uuid-utils
Add more uuid tool completions
2025-08-08 12:02:23 +09:00
Shohei YOSHIDA 6ba76c84eb
add uuidd completion 2025-08-07 13:56:36 +09:00
Shohei YOSHIDA ee6a2d0416
add uuidparse completion 2025-08-07 13:56:31 +09:00
Shohei YOSHIDA 1488badf72
Merge pull request #1144 from Aditi76117/missing-completions
Add missing completions for util-linux tools
2025-08-06 11:42:40 +09:00
Shohei YOSHIDA 73b5b78d70
Update blkid 2025-08-05 12:14:58 +09:00
Shohei YOSHIDA 50611e5b99
Update chmem 2025-08-05 12:01:27 +09:00
Shohei YOSHIDA 3ef170ff4f
Update fallocate 2025-08-05 11:56:29 +09:00
Shohei YOSHIDA dee6427296
Update ipcrm 2025-08-05 11:43:19 +09:00
Shohei YOSHIDA f21d28a4a1
Update ipcmk 2025-08-05 11:36:07 +09:00
Shohei YOSHIDA 420a3d78c9
Update ipcs 2025-08-05 11:30:57 +09:00
Shohei YOSHIDA 0032bac859
Update ldattach 2025-08-05 09:35:33 +09:00
Shohei YOSHIDA bdee8a976c
Update mcookie 2025-08-05 09:04:53 +09:00
Aditi76117 331e0ab9fa Remove _lsblk and _cal as they are already present in upstream zsh 2025-08-05 00:10:06 +05:30
Aditi76117 d9b1b2bfa9 Add completions for ipcmk (util-linux) 2025-08-04 01:27:06 +05:30
Aditi76117 8a7515adc8 Add completions for ipcmk (util-linux) 2025-08-04 01:12:02 +05:30
Aditi76117 3e05c06501 Add completions for chmem, ipcmk, ipcrm, ipcs, ldattach and mcookie (util-linux) 2025-08-04 01:03:12 +05:30
Aditi76117 0867c7fe93 Add completions for lsblk, cal, blkid, and fallocate (util-linux) 2025-08-03 19:08:01 +05:30
Shohei YOSHIDA 5f24f3bc42
Merge pull request #1142 from egorlem/diplodoc
Remove yfm completion
2025-07-27 15:13:16 +09:00
Shohei YOSHIDA fb87bc486f
Merge pull request #1141 from zsh-users/update-completions
Update nanoc and bundler completions
2025-07-20 20:06:13 +09:00
guesswhozzz dc58df104d Remove yfm completion
If Yandex ever tries to join a genuine free open-source community, don’t believe them—it’s deception
2025-07-19 01:31:09 +03:00
Shohei YOSHIDA 06b7c9bc38
Update bundle completion 2.7.0 2025-07-18 11:37:16 +09:00
Shohei YOSHIDA 12c780b2b1
Update nanoc completion version 4.13.5 2025-07-18 11:37:03 +09:00
Shohei YOSHIDA 922abfe707
Merge pull request #1140 from zsh-users/update-completions
Update completions cmake, node, xsel
2025-07-11 11:28:27 +09:00
Shohei YOSHIDA ed034970c2
Update xsel completion v1.2.1 2025-07-10 12:51:27 +09:00
Shohei YOSHIDA fe11bbe8b0
Update node completion v24.4.0 2025-07-10 12:41:55 +09:00
Shohei YOSHIDA 1ee071125e
Update cmake completion version 3.31 2025-07-10 11:56:56 +09:00
Shohei YOSHIDA 6ba54212d0
Merge pull request #1139 from zsh-users/update-shell-check
Update shellcheck completion v0.10.0
2025-07-09 11:56:48 +09:00
Shohei YOSHIDA 932c16fd0e
Update shellcheck completion 2025-07-08 11:35:41 +09:00
Shohei YOSHIDA e07f6fb780
Merge pull request #1137 from JesseAye/f2b-regex
Add fail2ban-regex options and parameters
2025-06-12 10:16:04 +09:00
Jesse Ayala d326bdc241
Fix error when no matching files in working dir
If there are no files in the current working directory, zparse opts complains with "missing argument for option: -g"

Co-authored-by: Shohei YOSHIDA <syohex@gmail.com>
2025-06-11 20:17:41 -04:00
Jesse 335af5c72d Add fail2ban-regex options and parameters 2025-06-09 00:40:28 -04:00
Shohei YOSHIDA c29efd0bc3
Merge pull request #1136 from zsh-users/update-cppcheck
Update cppcheck completion to version 2.17.1
2025-06-01 09:25:57 +09:00
Shohei YOSHIDA 4625071e98
Update cppcheck completion to version 2.17.1 2025-05-29 22:03:43 +09:00
Shohei YOSHIDA 21789376b8
Merge pull request #1135 from zsh-users/update-completions
Update kak and clang utility completions
2025-05-25 11:16:50 +09:00
Shohei YOSHIDA a221bd2653
Update clang utilities 2025-05-23 13:33:49 +09:00
Shohei YOSHIDA ab95699400
Update UI type name list 2025-05-23 13:33:08 +09:00
Shohei YOSHIDA 99d000d880
Merge pull request #1134 from zsh-users/update-completions
Update shallow-backup, ufw completions
2025-05-17 21:42:55 +09:00
Shohei YOSHIDA d1469c6e4f
Update ufw completion 2025-05-16 17:44:28 +09:00
Shohei YOSHIDA 77cad16cc7
Update shallow-backup completion 2025-05-16 16:30:13 +09:00
Shohei YOSHIDA 8af769e5f1
Format 2025-05-16 16:24:21 +09:00
Shohei YOSHIDA 67e6bdbc3c
Update setcap completion flags 2025-05-16 16:24:04 +09:00
Shohei YOSHIDA 98dd809126
Merge pull request #1133 from zsh-users/update-nodejs
Update node completion for version 24.0.0
2025-05-08 11:24:25 +09:00
Shohei YOSHIDA c4fca6525a
Update node completion for version 24.0.0 2025-05-07 11:25:19 +09:00
Shohei YOSHIDA 4f6441f9ee
Merge pull request #1131 from zsh-users/update-pre-commit
Update pre-commit completion to version 4.2.0
2025-04-28 09:57:22 +09:00
Shohei YOSHIDA 4e0cdee2e7
Update pre-commit completion to version 4.2.0 2025-04-22 15:19:11 +09:00
Shohei YOSHIDA e5507e0d0c
Merge pull request #1129 from mkzer/fix-ohmyzsh-readme
Improve oh-my-zsh install instructions to avoid compinit duplication …
2025-04-11 14:10:58 +09:00
mkzer 370253ca8c Improve oh-my-zsh install instructions to avoid compinit duplication (fixes #603) 2025-04-10 20:04:49 +02:00
Shohei YOSHIDA e61c9c14d6
Merge pull request #1126 from zsh-users/remove_issue_template
Remove empty issue template
2025-03-12 20:00:19 +09:00
Shohei YOSHIDA 00cf14deaa
Remove empty issue template
This causes warnings according to GitHub's new issue template
2025-03-12 19:39:41 +09:00
Shohei YOSHIDA 6ea205dc14
Merge pull request #1125 from egorlem/TS-5.7-5.8
Update TypeScript completion from 5.6 to 5.8
2025-03-04 16:26:40 +09:00
guesswhozzz fc979f7a3e Remove unnecessary addition of flags in commands 2025-03-04 09:15:10 +03:00
guesswhozzz 42e9e1e563 Update TypeScript completion to version 5.8
patch note: https://devblogs.microsoft.com/typescript/announcing-typescript-5-8/
2025-03-03 16:35:36 +03:00
guesswhozzz ee50f24411 Update TypeScript completion to version 5.7
patch note: https://devblogs.microsoft.com/typescript/announcing-typescript-5-7/
2025-03-03 16:16:40 +03:00
Shohei YOSHIDA 0adf2f053e
Merge pull request #1123 from zsh-users/update_node
Update node completion to version 23.8.0
2025-02-14 12:08:32 +09:00
Shohei YOSHIDA b84082e664
Update node completion to version 23.8.0 2025-02-14 12:06:51 +09:00
Shohei YOSHIDA 7f0a0c4451
Merge pull request #1122 from zsh-users/update-go-1.24.0
Update go completion to version 1.24.0
2025-02-13 15:27:34 +09:00
Shohei YOSHIDA f9c7cbe31f
Update go completion to version 1.24.0 2025-02-12 17:11:41 +09:00
Shohei YOSHIDA 85e041be36
Merge pull request #1119 from kyanagi/rubocop_1_71
Update rubocop completion for version 1.71.0
2025-01-28 13:49:31 +09:00
Kouhei Yanagita bb09f70830
Update rubocop completion for version 1.71.0 2025-01-28 10:27:53 +09:00
Shohei YOSHIDA a7f01622f7
Merge pull request #1118 from zsh-users/update_ccache
Update ccache completion to version 4.10.2
2025-01-12 19:43:23 +09:00
Shohei YOSHIDA 681bd4bff8
Update ccache completion to version 4.10.2 2025-01-12 19:32:53 +09:00
Shohei YOSHIDA 1819f7aefc
Merge pull request #1117 from zsh-users/update_node
Update node completion to 23.6.0
2025-01-12 15:57:17 +09:00
Shohei YOSHIDA 4201e3ca77
Update node completion to 23.6.0 2025-01-10 14:55:27 +09:00
Shohei YOSHIDA c160d09fdd
Merge pull request #1116 from Mic92/typos
fix typos
2024-12-23 08:30:29 +09:00
Jörg Thalheim 59184db64a fix typos 2024-12-22 08:12:06 +01:00
Shohei YOSHIDA 6ff1a671a8
Merge pull request #1115 from zsh-users/update_node
Update node.js completion to version 23.4
2024-12-11 15:57:12 +09:00
Shohei YOSHIDA 3f00e7cf9b
Update node.js completion to version 23.4 2024-12-11 15:53:40 +09:00
Shohei YOSHIDA a169722fb3
fix typos 2024-12-11 15:17:17 +09:00
Shohei YOSHIDA 97804d9b97
Merge pull request #1114 from egorlem/diplodoc
Add completion script for yfm (diplodoc cli)
2024-12-11 15:15:20 +09:00
guesswhozzz 375d578d84 Update authors block 2024-12-11 08:53:45 +03:00
Shohei YOSHIDA bb6d6ba990
Update completion according to the help documents 2024-12-11 14:32:16 +09:00
Shohei YOSHIDA 1ae4ab5dc2
Remove needless configurations 2024-12-11 12:33:11 +09:00
Shohei YOSHIDA e7068f9923
Set argument parameter to options that take an argument 2024-12-11 11:44:38 +09:00
Shohei YOSHIDA a9c9c72fae
Fix according to coding convention
- Don't define global variables
- add command prefix to avoid conflicting names
2024-12-11 00:03:21 +09:00
guesswhozzz 8f1b90cd4b Add help argument 2024-12-10 17:31:22 +03:00
guesswhozzz b97fdbd1a6 Fix typo 2024-12-10 17:09:07 +03:00
guesswhozzz a0effab950 Remove unused file_types var 2024-12-10 16:43:06 +03:00
guesswhozzz 1b16b6c697 Add completion script for yfm (diplodoc cli) 2024-12-10 16:30:04 +03:00
Shohei YOSHIDA 874917fa56
Merge pull request #1113 from kyanagi/update-rspec
Update rspec completion
2024-11-26 13:06:04 +09:00
Kouhei Yanagita 509d844cc8 Update rspec completion
* Fix -I
* Setting exclusive options
* Configuring options that can be used multiple times
* Add descriptions for each formatters
2024-11-26 11:58:56 +09:00
Shohei YOSHIDA f607e941cb
Merge pull request #1112 from hydrargyrum/age
add completion for age
2024-11-20 09:57:13 +09:00
Shohei YOSHIDA 8d42717387
Fix options that can be specified many times 2024-11-19 23:38:45 +09:00
Shohei YOSHIDA 610aef9f12
Don't complete options when '--help' is specified 2024-11-19 23:38:45 +09:00
Shohei YOSHIDA 692e96ce54
Add format information 2024-11-19 23:38:45 +09:00
Shohei YOSHIDA 360ee98d66
Fix comment 2024-11-19 23:36:00 +09:00
Hg 6dec4885d3 add completion for age 2024-11-19 14:47:27 +01:00
Shohei YOSHIDA df14fc4a66
Merge pull request #1111 from zsh-users/add-util-linux
Add lscpu and uuidgen completion
2024-11-17 23:27:52 +09:00
Shohei YOSHIDA fdc290d417
Consider BSD distributions 2024-11-17 23:25:48 +09:00
Shohei YOSHIDA 2c2d87889a Consider macOS's uuidgen 2024-11-14 18:10:40 +09:00
Shohei YOSHIDA 8f3baa3b1e
Add lscpu completion 2024-11-13 00:04:25 +09:00
Shohei YOSHIDA c791de1006
Add uuidgen 2024-11-12 23:37:32 +09:00
Shohei YOSHIDA 9df3345fe4
Merge pull request #1110 from zsh-users/update-tsc
Update tsc options
2024-11-08 10:12:35 +09:00
Shohei YOSHIDA 072561b06f
Update tsc options 2024-11-08 10:02:14 +09:00
Shohei YOSHIDA dedc7871fd
Merge pull request #1108 from zsh-users/update-flutter-dart
Update flutter and dart completion
2024-11-04 21:29:17 +09:00
Shohei YOSHIDA b6a32c0053
Update flutter completion 2024-10-29 13:08:41 +09:00
Shohei YOSHIDA e2e529a7fa
Update dart compiletion 2024-10-29 12:20:59 +09:00
Shohei YOSHIDA 066b069150
Merge pull request #1107 from zsh-users/update-node
Update node completion 23.0.0
2024-10-18 11:12:28 +09:00
Shohei YOSHIDA 16dd307a93
Update node completion 23.0.0 2024-10-17 11:55:18 +09:00
Shohei YOSHIDA d24f58d2f1
Merge pull request #1104 from telemachus/golang-telemetry
Add 'go telemetry' completion
2024-09-17 11:37:50 +09:00
Peter Aronoff 139dc0e2d9 Add 'go telemetry' completion 2024-09-15 14:50:31 -04:00
Shohei YOSHIDA 10dd51ded3
Merge pull request #1102 from zsh-users/update-node
Update node completion for version 22.8
2024-09-05 12:20:48 +09:00
Shohei YOSHIDA 06e2f14637
Update node completion for version 22.8 2024-09-04 12:47:39 +09:00
Shohei YOSHIDA 19ddc7f7cf
Merge pull request #1100 from zsh-users/update-node
Update node completion to version 22.7
2024-08-31 11:23:03 +09:00
Shohei YOSHIDA dbf4d71d5f
Update node completion to version 22.7 2024-08-30 11:26:34 +09:00
Shohei YOSHIDA f96778edad
Merge pull request #1097 from zsh-users/update-go
Update go completion for version 1.23
2024-08-15 09:47:56 +09:00
Shohei YOSHIDA 53d5876cfe
Update go completion for version 1.23 2024-08-14 11:58:59 +09:00
Shohei YOSHIDA b5e87b9a1a
Merge pull request #1096 from zsh-users/update-rails
Update rails completion list
2024-08-14 11:42:16 +09:00
Shohei YOSHIDA 3b824c596e
Update rails completion list
And update command that generates the list for Rails 7.2
2024-08-13 11:56:40 +09:00
Shohei YOSHIDA e897589c96
Merge pull request #1095 from zsh-users/update-misc
Update completions
2024-08-04 16:16:40 +09:00
Shohei YOSHIDA 35f2ed45dd
Update rubocop completion 2024-08-04 14:19:54 +09:00
Shohei YOSHIDA 5e40b7ba09
Update direnv completion 2024-08-04 14:19:43 +09:00
Shohei YOSHIDA 4dfb7a51c5
Cleanup code 2024-08-04 14:19:29 +09:00
Shohei YOSHIDA 8abb801db2
Update clang-tidy completion 2024-08-04 14:18:12 +09:00
Shohei YOSHIDA 3ce9d453ae
Update ccache completion 2024-08-04 14:17:57 +09:00
Shohei YOSHIDA 4145b89b06
Merge pull request #1094 from zsh-users/update-rails
Update rails completion
2024-08-01 17:12:28 +09:00
Shohei YOSHIDA f8a220d657
Update rails completion 2024-08-01 11:39:07 +09:00
Shohei YOSHIDA 77005bb0dc
Merge pull request #1093 from zsh-users/update-go-completion
Update go completion
2024-07-31 19:52:22 +09:00
Shohei YOSHIDA 22222832d8
Update environment variable completion
And don't use global variables
2024-07-31 16:42:02 +09:00
Shohei YOSHIDA f036321bc4
Update version 2024-07-31 12:10:56 +09:00
Shohei YOSHIDA ef50c3a7b9
Update 'go test' completion 2024-07-31 12:10:22 +09:00
Shohei YOSHIDA 9380071ffb
Update 'go mod' completion 2024-07-31 12:06:03 +09:00
Shohei YOSHIDA 580b096df4
Update 'go tool trace' completion 2024-07-30 12:58:19 +09:00
Shohei YOSHIDA da937c9124
Update 'go tool vet' completion 2024-07-30 12:51:36 +09:00
Shohei YOSHIDA a8dacc93aa
Update 'go tool pack' completion 2024-07-30 12:43:19 +09:00
Shohei YOSHIDA 238d3b0749
Update 'go tool fix' completion 2024-07-30 12:38:41 +09:00
Shohei YOSHIDA 13b8ba55e2
Update 'go tool compile' completion 2024-07-30 12:36:24 +09:00
Shohei YOSHIDA 89d7a5ec24
Update 'go list' completion 2024-07-30 12:26:31 +09:00
Shohei YOSHIDA 78c0ab5f95
Update 'go generate' completion 2024-07-30 12:19:18 +09:00
Shohei YOSHIDA aac56495ba
Update 'go fmt' completion 2024-07-30 12:17:57 +09:00
Shohei YOSHIDA 61c84a203c
Update 'go env' environment list 2024-07-30 12:15:24 +09:00
Shohei YOSHIDA 937cd0fcea
Complete package name in 'go doc' 2024-07-30 11:56:50 +09:00
Shohei YOSHIDA f475c1322f
Improve 'go help' completion 2024-07-29 18:47:46 +09:00
Shohei YOSHIDA 057d9a9940
Update 'go fix' completion 2024-07-29 18:36:59 +09:00
Shohei YOSHIDA 5a4bbc1ad8
Update 'go tool cgo' completion 2024-07-29 18:10:37 +09:00
Shohei YOSHIDA b4c970619b
Add 'go tool buildid' completion 2024-07-29 17:59:51 +09:00
Shohei YOSHIDA 91fce88036
Update 'go tool asm' completion 2024-07-29 17:57:17 +09:00
Shohei YOSHIDA 177fadadba
Update 'go vet' completion 2024-07-29 17:46:12 +09:00
Shohei YOSHIDA 4b55f149e6
Update help and work subcommand completions 2024-07-29 14:28:17 +09:00
Shohei YOSHIDA f8c41dbdbb
Merge pull request #1092 from zsh-users/refactor_go
Don't use global variables in go completion
2024-07-29 14:17:53 +09:00
Shohei YOSHIDA 499e5be22e
Don't use global variables
and fix indentations
2024-07-29 12:12:52 +09:00
Shohei YOSHIDA a50d486f6d
Merge pull request #1091 from zsh-users/update-nano
Update nano complete to version 8.1
2024-07-17 14:56:24 +09:00
Shohei YOSHIDA 14160839cb
Update nano complete to version 8.1 2024-07-17 11:30:28 +09:00
Shohei YOSHIDA 7a884c75b4
Merge pull request #1086 from zsh-users/update-node
Update node.js completion to version 22.3
2024-06-26 11:32:54 +09:00
Shohei YOSHIDA 7313f8360b
Merge pull request #1088 from Mumumu4/fix-nft-type-in-name
Fix nftables completion: when object name contains its type name
2024-06-26 11:32:26 +09:00
Shohei YOSHIDA 0a8eb1b0b7
Merge pull request #1087 from Mumumu4/update-nftable
Update nftables completion
2024-06-26 11:21:18 +09:00
Mumumu 0bd94fb993
Fix nftables completion: when object name contains its type name, the completion may mass up
E.g.
```
table inet foo {
        chain my_chain {
                jump my_chain2
        }
        chain my_chain2 {
        }
}
```

`nft delete chain inet foo <tab>`
get
```
handle                          -- address chain by handle
my_chain2                       -- (handle 31)
my_chain                        -- (handle 30)
\t\tjump my_chain2 # handle 33
```
the last line in the completion output is not wanted.
2024-06-25 21:34:06 +08:00
Mumumu 6621b9fa2f
Update nftables completion
add completion for set/map name in `nft add/delete element [family] table <tab>`
2024-06-25 20:13:44 +08:00
Shohei YOSHIDA 0a66357930
Update node.js completion to version 22.3 2024-06-24 16:37:02 +09:00
Shohei YOSHIDA 978e79e12c
Merge pull request #1084 from zsh-users/update-node
Update node completion for version 22.2.0
2024-05-21 09:40:12 +09:00
Shohei YOSHIDA fce3599932
Update node completion for version 22.2.0 2024-05-16 12:46:30 +09:00
Shohei YOSHIDA b1cf651870
Merge pull request #1081 from zsh-users/update-node
Update node completion to version v22.0.0
2024-04-25 13:03:23 +09:00
Shohei YOSHIDA a46f3ffca2
Update node completion to version v22.0.0 2024-04-25 12:56:56 +09:00
Shohei YOSHIDA efaa595ae9
Merge pull request #1080 from hydrargyrum/rdfind
add completion for rdfind
2024-04-17 09:41:25 +09:00
Shohei YOSHIDA 542e80beee
Add format configuration 2024-04-17 09:40:53 +09:00
Hg a830cb4229 add completion for rdfind 2024-04-15 11:21:45 +02:00
Shohei YOSHIDA 7e78199771
Merge pull request #1078 from hydrargyrum/neo
add completion for neo
2024-04-15 14:12:25 +09:00
Shohei YOSHIDA 8ded919b3f
Fix format 2024-04-15 14:11:16 +09:00
Shohei YOSHIDA c48586fd04
Merge pull request #1077 from hwknsj/fix-yarn-completion
fix(yarn): use `builtin cd` in yarn completion
2024-04-15 11:54:59 +09:00
joél hawkins torres 4fc8c131ba
fix(yarn): use builtin cd in yarn completion
Signed-off-by: joél hawkins torres <joel@joel.fm>
2024-04-13 22:54:49 -07:00
Hg a458210c1d add completion for neo 2024-04-13 22:41:26 +02:00
Shohei YOSHIDA 83cbd81082
Merge pull request #1076 from zsh-users/remove-fvm
Remove _fvm completion
2024-04-11 15:23:25 +09:00
Shohei YOSHIDA 7666b5fe6d
Remove _fvm completion
Because _fvm supports zsh completion itself since version 3.0
2024-04-10 11:19:58 +09:00
Shohei YOSHIDA 2f951267cd
Merge pull request #1074 from zsh-users/update-flutter-completion
Update flatter completion to 3.19.3
2024-03-18 22:06:27 +09:00
Shohei YOSHIDA c1f23ccd02
Update flatter completion to 3.19.3 2024-03-18 16:15:38 +09:00
Shohei YOSHIDA 507f1f8715
Merge branch 'pr-1065' 2024-02-07 18:20:31 +09:00
Shohei YOSHIDA 9f7a83c0ac
Refactoring
- Shorten too long descriptions
- Add missing option descriptions
- Improve completion
2024-02-07 18:19:32 +09:00
Shohei YOSHIDA 10d8919acb
Add magic comment 2024-02-07 17:43:53 +09:00
Wu Zhenyu 42c6d28610
Add pre-commit
Modified from rejected https://github.com/pre-commit/pre-commit/pull/2506
2024-02-06 11:17:19 +08:00
Shohei YOSHIDA 06bda0b3e9
Add magic comment 2024-02-06 09:09:41 +09:00
Wu Zhenyu f34f9d915d
Add l3build
Modified from rejected https://github.com/latex3/l3build/pull/267
2024-02-06 09:09:21 +09:00
Shohei YOSHIDA 0cfa4990ac
Merge pull request #1069 from simonzsolt/feat/add-mix-phx-gen-live
add completion for `mix phx.gen.live`
2024-02-01 17:25:09 +09:00
Zsolt Simon 9a23ac3509 add completion for `mix phx.gen.live` 2024-01-24 13:16:39 +01:00
Shohei YOSHIDA 25691f59b5
Merge pull request #1066 from slawekjaranowski/mvn-4
Support Maven 4.x and improvements
2024-01-24 11:41:19 +09:00
Slawomir Jaranowski 1a5f36cdc4
Support Maven 4.x and improvements
- support Maven 4
- fix missing short options for Maven 3
- fix error for unknown Maven  version
2024-01-23 22:50:08 +01:00
Shohei YOSHIDA f7c3173886
Merge pull request #1060 from zsh-users/update-node
Update node.js completion to version 21.3.0
2023-12-01 22:08:35 +09:00
Shohei YOSHIDA 11e5579d35
Update node.js completion to version 21.3.0 2023-12-01 16:47:58 +09:00
Shohei YOSHIDA 9da7488c11
Merge pull request #1059 from zsh-users/update-flutter
Update flutter and dart completion for flutter 3.16.0
2023-11-20 14:47:10 +09:00
Shohei YOSHIDA 719d72d025
Update flutter and dart completion for flutter 3.16.0 2023-11-20 11:47:46 +09:00
Shohei YOSHIDA 634736c009
Merge pull request #1058 from zsh-users/update-node
Update node completion v21.2.0
2023-11-16 09:41:02 +09:00
Shohei YOSHIDA e12430589c
Update node completion v21.2.0 2023-11-15 13:36:50 +09:00
Shohei YOSHIDA 9e341f6a20
Merge pull request #1057 from jeremy-rifkin/patch-1
Add -DBUILD_SHARED_LIBS completion for cmake completions
2023-11-14 09:30:16 +09:00
Jeremy Rifkin d04e01fce3
Add -DBUILD_SHARED_LIBS completion for cmake completions 2023-11-13 10:11:11 -05:00
Shohei YOSHIDA a0f027a1de
Merge pull request #1055 from zsh-users/update-node
Update node.js for version 21.1.0
2023-10-26 11:46:18 +09:00
Shohei YOSHIDA e097ee8b0c
Update node.js for version 21.1.0 2023-10-25 12:30:10 +09:00
Shohei YOSHIDA ac96055f0c
Merge pull request #1054 from aoyama-val/add-jest
Add jest completion
2023-10-22 00:07:52 +09:00
Shotaro Aoyama fee1c475af Add jest completion 2023-10-21 18:46:54 +09:00
Shohei YOSHIDA 7f84cdaf9c
Merge pull request #1053 from zsh-users/update-node
Update node completion for version 21.0.0
2023-10-18 12:46:12 +09:00
Shohei YOSHIDA bd6f7d8c5b
Update node completion for version 21.0.0 2023-10-18 11:05:11 +09:00
Shohei YOSHIDA 8a06b24ae1
Merge pull request #1051 from zsh-users/do-release-upgrade
Add do-release-upgrade completion
2023-10-18 10:25:55 +09:00
Shohei YOSHIDA 5979928262
Merge pull request #1052 from benash/patch-1
Fix homebrew link
2023-10-18 10:17:30 +09:00
Benjamin Nash 903b9b7134
Fix homebrew link 2023-10-17 11:00:00 -04:00
Shohei YOSHIDA fd6ac7bd64
Add do-release-upgrade completion 2023-10-16 12:13:05 +09:00
Shohei YOSHIDA e969ea6f6e
Merge pull request #1050 from alichtman/master
Add basic completions for shallow-backup
2023-10-13 18:39:55 +09:00
Aaron Lichtman 660b7e4963
Update src/_shallow-backup
Co-authored-by: Shohei YOSHIDA <syohex@gmail.com>
2023-10-12 23:51:02 -07:00
Aaron Lichtman 1e80d3c1bf
Update src/_shallow-backup
Co-authored-by: Shohei YOSHIDA <syohex@gmail.com>
2023-10-12 23:50:51 -07:00
Aaron Lichtman 9d358ae351
Update src/_shallow-backup
Co-authored-by: Shohei YOSHIDA <syohex@gmail.com>
2023-10-12 23:50:45 -07:00
Aaron Lichtman 8fed2d1e83
Update src/_shallow-backup
Co-authored-by: Shohei YOSHIDA <syohex@gmail.com>
2023-10-12 23:50:32 -07:00
Aaron Lichtman 9a59a71911
Update src/_shallow-backup
Co-authored-by: Shohei YOSHIDA <syohex@gmail.com>
2023-10-12 23:50:24 -07:00
Aaron Lichtman 1f93068627
Add basic completions for shallow-backup
This adds basic tab completion for
https://github.com/alichtman/shallow-backup/

This will fix https://github.com/alichtman/shallow-backup/issues/324
2023-10-12 15:11:06 -07:00
Shohei YOSHIDA 2c1e9af195
Merge pull request #1049 from zsh-users/bug-set-global-variable
Don't set global variable in srm completion
2023-10-04 10:24:53 +09:00
Shohei YOSHIDA 4351e11484
Don't set global variable in srm completion 2023-10-04 10:21:57 +09:00
Shohei YOSHIDA 88d1bceafb
Merge pull request #1047 from zsh-users/support-thc-impl
Support THC secure-delete
2023-10-04 01:03:08 +09:00
Shohei YOSHIDA 81013dbbc1
Merge pull request #1048 from zsh-users/update-cpp-check
Update cppcheck completion for version 2.12
2023-10-04 01:02:46 +09:00
Shohei YOSHIDA 1fab982047
Update cppcheck completion for version 2.12 2023-10-03 20:22:20 +09:00
Shohei YOSHIDA 41e7188db5
Support THC secure-delete
Recent Linux distribution uses newer THC secure-delete and
it only supports few options.
2023-10-03 20:05:59 +09:00
Shohei YOSHIDA 5e6f4da967
Merge pull request #1046 from zsh-users/do-not-use-global-variable
Do not use global variable, use local variable instead
2023-10-03 18:51:39 +09:00
Shohei YOSHIDA d88edeed35
Do not use global variable, use local variable instead 2023-10-03 16:51:13 +09:00
Shohei YOSHIDA c05d0fdfe0
Merge pull request #1045 from zsh-users/update_rails
Update rails completion version 7
2023-10-02 16:20:02 +09:00
Shohei YOSHIDA e7ccc55947
Fix missing completion 2023-10-02 14:14:03 +09:00
Shohei YOSHIDA 2c5bfabb5e
Add task completions 2023-09-29 21:18:44 +09:00
Shohei YOSHIDA 7a19598927
Update test completion 2023-09-29 11:23:43 +09:00
Shohei YOSHIDA 1a9467fdff
Update generate and destroy completions 2023-09-28 16:12:26 +09:00
Shohei YOSHIDA 8068693aee
Update console and server completions 2023-09-28 13:44:23 +09:00
Shohei YOSHIDA d7f6a06e1a
Remove needless generate functions 2023-09-28 12:29:52 +09:00
Shohei YOSHIDA 9f9c4dec36
Update generator subcommand completions 2023-09-28 12:28:38 +09:00
Shohei YOSHIDA 0a1a8b89d9
Update rails new and generate completion 2023-09-27 22:29:52 +09:00
Shohei YOSHIDA c0fe16fdad
Merge pull request #1044 from zsh-users/update-node
Update node.js completion
2023-09-19 19:31:30 +09:00
Shohei YOSHIDA b57558b024
Update node.js completion
Multiple `--env-file` options are accpeted since node v20.7
2023-09-19 14:35:20 +09:00
Shohei YOSHIDA bed209ca64
Merge pull request #1039 from johannes87/master
Add completion script for chatblade
2023-09-18 00:04:08 +09:00
Johannes Bittner c118ed452d implement suggestions 2023-09-17 13:15:19 +02:00
Johannes Bittner 0d26ab80ed "local state" breaks --session completion 2023-09-17 13:07:10 +02:00
Johannes Bittner fb7078044b
prevent global variables from overwriting
Co-authored-by: Shohei YOSHIDA <syohex@gmail.com>
2023-09-17 12:44:31 +02:00
Johannes Bittner bc8cdc6b79 Merge branch 'master' of github.com:johannes87/zsh-completions 2023-09-17 12:44:01 +02:00
Johannes Bittner 7e9e14517d remove trailing spaces 2023-09-17 12:43:32 +02:00
Shohei YOSHIDA 07fe4030a6
Merge pull request #1043 from zsh-users/update-fwupdmgr
Update fwupdmgr completion to 1.8.12
2023-09-15 18:46:43 +09:00
Shohei YOSHIDA 6cbfc1b942
Update fwupdmgr completion to 1.8.12
- Add new options and remove obsoleted options
- Fix broken device ID completions
- Simplify code
2023-09-13 14:41:03 +09:00
Johannes Bittner facf918250
Apply suggestions from code review
Co-authored-by: Shohei YOSHIDA <syohex@gmail.com>
2023-09-08 00:41:23 +02:00
Shohei YOSHIDA 0cee6ab508
Merge pull request #1041 from zsh-users/refactor-port
Refactoring port
2023-09-05 23:01:33 +09:00
Shohei YOSHIDA 35b2bfe90c
Merge pull request #1042 from zsh-users/update-node
Update node completion to v20.6.0
2023-09-05 23:00:54 +09:00
Shohei YOSHIDA 1ec2fd373f
Update node completion to v20.6.0 2023-09-05 12:50:51 +09:00
Shohei YOSHIDA 76dde7cb7b Refactoring port
- Reduce executing external commands
- Reduce escape characters
2023-09-05 12:17:43 +09:00
Shohei YOSHIDA c8c09241eb
Merge pull request #1040 from zsh-users/fix-invalid-initialization
Fix wrong initial value settings
2023-09-05 08:48:25 +09:00
Shohei YOSHIDA 898dbaf873
Merge pull request #1036 from zsh-users/update-gtk-launch
Fix broken gtk-launch completion and update
2023-09-05 08:45:48 +09:00
Shohei YOSHIDA 9dfd82bc78
Fix broken gtk-launch completion and update
- Use zsh builtin functions instead of external commands
- Stop parsing desktop file
  - Because it often causes error
  - It is difficult to extract the description that is in user's language
- Support gtk4-launch
2023-09-05 08:45:14 +09:00
Shohei YOSHIDA c23b29fff8
Merge pull request #1037 from zsh-users/refactor-direnv
Refactoring direnv
2023-09-05 08:43:28 +09:00
Shohei YOSHIDA da36aa8710
Merge pull request #1038 from zsh-users/fix-mac-ports-cache-policy-function
Fix port's cache policy function
2023-09-05 08:42:35 +09:00
Johannes Bittner 28f602902e Add completion script for chatblade 2023-09-04 13:48:19 +02:00
Shohei YOSHIDA ae3a2e4400 Fix port's cache policy function
The option of stat on macOS/BSD is wrong. So cache is always purged and
cache is always recreated so it is really slow.

Use 'zstat' module instead stat command for portability.
2023-09-04 17:12:07 +09:00
Shohei YOSHIDA db79320716
Fix wrong initial value settings 2023-09-04 15:49:49 +09:00
Shohei YOSHIDA abbd91220b
Refactoring direnv
- Do not use global variables, use local variables instead
- Reduce needless _arguments calls
2023-09-04 14:47:03 +09:00
Shohei YOSHIDA ab99231c26
Merge pull request #1033 from zsh-users/add-supervisord
Add supervisord completion
2023-09-01 10:55:47 +09:00
Shohei YOSHIDA 31845d56b2
Merge pull request #1032 from zsh-users/update_supervisorctl
Update supervisorctl completion
2023-09-01 10:55:34 +09:00
Shohei YOSHIDA 43a0fd3b44
Add supervisord completion 2023-08-29 00:08:52 +09:00
Shohei YOSHIDA a2dae495f7
Update supervisorctl completion
- Reduce executing 'supervisorctl (status|avail)' times
- Don't modify global variables
- Support new options
2023-08-28 23:47:39 +09:00
Shohei YOSHIDA 67921bc125
Merge pull request #1031 from zsh-users/update_nanoc
Update nanoc completion and cleanup its code
2023-08-28 12:03:18 +09:00
Shohei YOSHIDA 796ee337fa
Accpet multiple env arguments 2023-08-28 12:01:03 +09:00
Shohei YOSHIDA 7603240219
Update nanoc completion and cleanup its code 2023-08-27 20:43:14 +09:00
Shohei YOSHIDA 5ccec94b18
Merge pull request #1030 from zsh-users/refactor_fvm
Refactor fvm completion
2023-08-25 08:43:12 +09:00
Shohei YOSHIDA 5794f18e01
Refactor fvm completion 2023-08-24 23:42:07 +09:00
Shohei YOSHIDA 4172b053de
Merge pull request #1029 from zsh-users/refactor-udisksctl
Refactoring udisksctl completion
2023-08-24 23:09:26 +09:00
Shohei YOSHIDA 7494992bab
Refactoring udisksctl completion
- Apply formatting
- Use local variables instead of global variables
- Fix typos
- Update project URL
2023-08-24 17:45:42 +09:00
Shohei YOSHIDA 955ac75daf
Merge pull request #1028 from zsh-users/update-flutter
Update flutter and dart completion
2023-08-17 16:15:08 +09:00
Shohei YOSHIDA 2a2efae5f6
Update flutter and dart completion 2023-08-17 15:57:27 +09:00
Shohei YOSHIDA fdcb0ef6f3
Merge pull request #1027 from zsh-users/variable_name_issue
Avoid defining local variable 'options'
2023-08-17 15:06:55 +09:00
Shohei YOSHIDA ba54f170a6 Avoid defining local variable options
zsh has the built in variable 'options'. zsh sometimes behaves
weirdly when there is a local variable that is named 'options'
2023-08-17 12:13:27 +09:00
Shohei YOSHIDA 75094d7275
Merge pull request #1026 from zsh-users/update-rubocop
Update rubocop completion for version 1.55
2023-08-09 12:38:57 +09:00
Shohei YOSHIDA 5e0f32e676
Merge pull request #1025 from zsh-users/update-protoc
Update protoc completion for version 24.0
2023-08-09 12:38:24 +09:00
Shohei YOSHIDA 2732408990
Merge pull request #1024 from zsh-users/update-golang
Update for go 1.21
2023-08-09 12:35:39 +09:00
Shohei YOSHIDA b44635f0d9
Update rubocop completion for version 1.55 2023-08-09 11:39:37 +09:00
Shohei YOSHIDA 30fd820805
Update protoc completion for version 24.0 2023-08-09 11:21:29 +09:00
Shohei YOSHIDA 05fd700404
Update for go 1.21 2023-08-09 08:34:54 +09:00
Shohei YOSHIDA 5328eb7c01
Merge pull request #1021 from zsh-users/update-rfkill
Update rfkill completion
2023-07-02 09:42:12 +09:00
Shohei YOSHIDA 3a817b893e
Update rfkill completion 2023-07-02 09:41:31 +09:00
Shohei YOSHIDA 97c9884255
Merge pull request #1020 from zsh-users/update-rspec
Update rspec completion to version 3.12.0
2023-07-01 11:40:26 +09:00
Shohei YOSHIDA e359dcb1d3
Update rspec completion to version 3.12.0 2023-06-29 16:55:08 +09:00
Shohei YOSHIDA 83f09c4615
Merge pull request #1019 from zsh-users/update-golang
Update go completion version 1.21
2023-06-23 15:05:54 +09:00
Shohei YOSHIDA e8814323ff
Merge pull request #1017 from zsh-users/update_httpie
Update httpie 3.2.2 completion
2023-06-23 15:05:24 +09:00
Shohei YOSHIDA aa5af8f991
Merge pull request #1018 from zsh-users/add-version-info-dart
Add version to dart completion for maintenance
2023-06-22 19:05:29 +09:00
Shohei YOSHIDA cfc3d2a207
Update go completion version 1.21 2023-06-22 16:47:45 +09:00
Shohei YOSHIDA 323231ac9d
Add version to dart completion for maintenance 2023-06-22 11:27:22 +09:00
Shohei YOSHIDA 302f477e10
Update httpie completion 2023-06-22 11:17:10 +09:00
Shohei YOSHIDA 66c4b6fe72
Merge pull request #1015 from eclairevoyant/delete-yaourt
Delete yaourt completion
2023-06-04 21:15:41 +09:00
éclairevoyant 543f122195
Delete _yaourt 2023-06-04 02:38:34 -04:00
Shohei YOSHIDA 744af1910b
Merge pull request #1014 from zsh-users/add-mkcert
Add mkcert completion
2023-05-24 14:12:39 +09:00
Shohei YOSHIDA b9d86204bb
Add mkcert completion 2023-05-23 11:47:58 +09:00
Shohei YOSHIDA a7bdfdf56e
Merge pull request #1012 from zsh-users/typescript-tools
Add tsc and ts-node completions
2023-05-22 10:51:20 +09:00
Shohei YOSHIDA 128f6dec82
Merge pull request #1013 from zsh-users/update-vnstat
Add vnstat completion
2023-05-22 00:38:18 +09:00
Shohei YOSHIDA 8990e74097
Update vnstat completion 2023-05-22 00:36:29 +09:00
Shohei YOSHIDA 212b0d50f1
Add tsc and ts-node completions 2023-05-20 23:04:53 +09:00
Shohei YOSHIDA 0ebf45ba93
Merge pull request #1011 from zsh-users/dart-completion
Add dart completion
2023-05-20 07:40:59 +09:00
Shohei YOSHIDA 4516f61d96
Support 'fvm dart' completion 2023-05-18 15:15:16 +09:00
Shohei YOSHIDA 4f59353fe1
Remove deprecated 'flutter format' completion 2023-05-18 15:14:43 +09:00
Shohei YOSHIDA 7427f0a294
Add dart completion 2023-05-18 15:08:35 +09:00
Shohei YOSHIDA 449cc702dc
Merge pull request #1010 from zsh-users/update-flutter-3.10.0
Update flutter completion for version 3.10.0
2023-05-12 10:42:43 +09:00
Shohei YOSHIDA 90471c3877
Update flutter completion for version 3.10.0 2023-05-11 22:21:15 +09:00
Shohei YOSHIDA 64ec7994dc
Merge pull request #1009 from zsh-users/grpcurl
Add grpcurl completion
2023-04-27 11:04:33 +09:00
Shohei YOSHIDA ec557e1fed
Add grpcurl completion 2023-04-24 10:40:14 +09:00
Shohei YOSHIDA 45a37bc26f
Merge pull request #1006 from zsh-users/update-node
Update node.js completion for version 20.0.0
2023-04-23 21:28:59 +09:00
Shohei YOSHIDA e797437fe5
Update node.js completion for version 20.0.0 2023-04-19 11:31:42 +09:00
Shohei YOSHIDA 820aaba911
Merge pull request #1003 from notmike-5/master
updated _bitcoin-cli to match bitcoind v24.1rc1
2023-03-29 07:12:59 +09:00
notmike 889db4f8f6
Update src/_bitcoin-cli
Co-authored-by: Shohei YOSHIDA <syohex@gmail.com>
2023-03-28 15:54:27 -06:00
notmike cd3b8a4657
Update src/_bitcoin-cli
Co-authored-by: Shohei YOSHIDA <syohex@gmail.com>
2023-03-28 15:54:17 -06:00
notmike-5 c20d6e9212 updated _bitcoin-cli to match bitcoind v24.1rc1 2023-03-27 20:58:34 -06:00
Shohei YOSHIDA 98ea8e685c
Merge pull request #1001 from zsh-users/update-conan-2.0.0
Update conan completion and refactoring
2023-02-26 14:27:05 +09:00
Shohei YOSHIDA 40ae92e112
Update conan completion and refactoring 2023-02-24 23:33:53 +09:00
Shohei YOSHIDA 92dc417c3e
Merge pull request #999 from zsh-users/update-node
Update node.js completion for version 19.7.0
2023-02-23 18:58:17 +09:00
Shohei YOSHIDA d71ddaa6eb
Merge pull request #1000 from vsannikov/fix-virtualbox-medium
Fix virtualbox medium-related commands
2023-02-22 18:41:50 +09:00
Shohei YOSHIDA ddb66cf14c
Update node.js completion for version 19.7.0 2023-02-22 11:53:08 +09:00
Shohei YOSHIDA ec3fc086c3
Merge pull request #998 from vsannikov/fix-virtualbox-createvm
Fix `vboxmanage createvm --ostype` completion
2023-02-22 10:58:47 +09:00
V.Sannikov 234e5d3e61 Fix `vboxmanage` medium-related commands parameters:
These commands accept a file name (or an UUID), not a VM name, as a
positional parameter.
2023-02-21 18:14:13 +03:00
V.Sannikov 9fa28becba Fixed `vboxmanage closemedium` redundant parameters completion:
the command takes not more than two positional parameters.
2023-02-21 17:56:33 +03:00
V.Sannikov b030b22f64 Fix misleading description for `vboxmanage --ostype` values 2023-02-21 16:23:38 +03:00
V.Sannikov 348187fac2 Fix `--ostype` argument of `vboxmanage createvm` command 2023-02-21 15:49:07 +03:00
Shohei YOSHIDA 4de5a8cc6a
Merge pull request #997 from zsh-users/support-flutter-build-completion
Implement 'flutter build target' completion
2023-02-20 21:38:47 +09:00
Shohei YOSHIDA 60699cd07d
Merge pull request #996 from Freed-Wu/neofetch
Add neofetch
2023-02-20 15:16:16 +09:00
Wu Zhenyu 7f2beb4fd3
Add neofetch 2023-02-20 11:43:19 +08:00
Shohei YOSHIDA 04a65a56de
Implement 'flutter build target' completion 2023-02-19 18:34:41 +09:00
Shohei YOSHIDA 86d55972f5
Merge pull request #994 from infokiller/fix-tmuxp-custom-dir
tmuxp: fix xdg dir checked
2023-02-08 07:38:05 +09:00
Yoni Weill a2c3a97252 tmuxp: fix xdg dir checked 2023-02-07 16:05:31 +02:00
Shohei YOSHIDA 828fe2bd3c
Merge pull request #993 from infokiller/fix-tmuxp-custom-dir
tmuxp: fix using workspace dirs other than ~/.tmuxp
2023-02-06 19:43:54 +09:00
Yoni Weill e936451b03 tmuxp: fix using workspace dirs other than ~/.tmuxp
For reference see 3ba6426283/src/tmuxp/workspace/finders.py (L99-L128)
2023-02-06 11:54:20 +02:00
Shohei YOSHIDA 874bd4d323
Merge pull request #990 from zsh-users/update-iwyu
Update include-what-you-use completion
2023-01-31 18:41:41 +09:00
Shohei YOSHIDA b07000ca5f Update include-what-you-use completion 2023-01-30 12:52:45 +09:00
Shohei YOSHIDA 3e3e2f97f2
Merge pull request #987 from zsh-users/networkquality
Add networkQuality completion
2023-01-29 22:39:36 +09:00
Shohei YOSHIDA c156a2a548
Merge pull request #989 from zsh-users/improve-flutter-subcommand
Implement flutter pub sub command completions
2023-01-28 12:40:55 +09:00
Shohei YOSHIDA e9191ffa95
Implement flutter pub sub command completions 2023-01-27 22:59:48 +09:00
Shohei YOSHIDA 54156de9cb
Merge pull request #988 from zsh-users/update-flutter-3.7
Update flutter completion for version 3.7
2023-01-26 19:40:19 +09:00
Shohei YOSHIDA 14817f4f11
Update flutter completion for version 3.7 2023-01-26 12:36:37 +09:00
Shohei YOSHIDA 4f5a896b96 Add networkQuality completion 2023-01-25 14:16:30 +09:00
Shohei YOSHIDA dd686f35d1
Merge pull request #985 from vurden/master
Update completion for mix
2023-01-18 19:28:38 +09:00
vurden 865fd86d2e add phx.gen.auth 2023-01-17 22:55:49 -05:00
Shohei YOSHIDA 1204f45161
Merge pull request #982 from zsh-users/fix_broken_completion
Fix broken completion and use awk instead of perl for portability
2023-01-10 11:13:57 +09:00
Shohei YOSHIDA 4ac9173088
Fix broken completion and use awk instead of perl for portability 2023-01-10 10:54:42 +09:00
Shohei YOSHIDA 45d07f79b0
Merge pull request #980 from zsh-users/add-android-commands
Add avdmanager and sdkmanager completion
2023-01-10 10:31:02 +09:00
Shohei YOSHIDA 8c6ffb73e9
Add avdmanager and sdkmanager completion 2023-01-06 23:28:55 +09:00
Shohei YOSHIDA 61e6ab29ba
Merge pull request #976 from zsh-users/add-emacs-completions
Add emacs and emacsclient completion
2023-01-06 12:56:43 +09:00
Shohei YOSHIDA 5310fa6f33
Merge pull request #977 from zsh-users/add-screencapture
Add macOS screencapture command completion
2023-01-06 12:56:26 +09:00
Shohei YOSHIDA 852e1f35b2
Merge pull request #978 from zsh-users/update-scala
Fix broken scala/scalac completion and update to version 3.2.1
2023-01-06 12:56:06 +09:00
Shohei YOSHIDA f178a3b36b
Merge pull request #979 from rex4539/typos
Fix typos
2023-01-05 08:13:17 +09:00
Dimitris Apostolou 1d492c7151
Fix typos 2023-01-04 22:50:35 +02:00
Shohei YOSHIDA 7a3387ed46
Fix broken scala/scalac completion and update to version 3.2.1 2023-01-04 17:43:10 +09:00
Shohei YOSHIDA d368e2a3b8
Add macOS screencapture command completion 2023-01-02 12:51:35 +09:00
Shohei YOSHIDA 3acaeebfcb
Add emacs and emacsclient completion 2022-12-28 14:31:05 +09:00
Shohei YOSHIDA b46602db39
Merge pull request #975 from zsh-users/fix-typo-in-node
Fix typo in node.js completion
2022-12-27 19:26:27 +09:00
Shohei YOSHIDA ed5394d671
Fix typo in node.js completion 2022-12-27 19:13:23 +09:00
Shohei YOSHIDA 0682649330
Merge pull request #974 from zsh-users/update-bundle
Update bundle completion
2022-12-26 11:44:27 +09:00
Shohei YOSHIDA 0491bd2cbe
Update bundle completion
bundle gem --ext option should take language c or rust now
2022-12-26 10:53:54 +09:00
Shohei YOSHIDA 756831c818
Merge pull request #973 from zsh-users/update-sbt
Update sbt completion
2022-12-25 17:10:53 +09:00
Shohei YOSHIDA b3eb781837
Update sbt completion 2022-12-25 16:23:41 +09:00
Shohei YOSHIDA 62e0e74083
Merge pull request #960 from zsh-users/update-virtualbox
Update virtualbox
2022-12-25 14:40:50 +09:00
Shohei YOSHIDA eecf5d5c10
Update author list 2022-12-25 13:19:01 +09:00
Shohei YOSHIDA 2df4d30003
Add dhcpserver subcommand completion 2022-12-25 13:17:38 +09:00
Shohei YOSHIDA 9035bfb0a8
Reduce functions 2022-12-25 13:06:35 +09:00
Shohei YOSHIDA 4c66875a7b
Add hostonlynet subcommand completion 2022-12-25 13:00:17 +09:00
Shohei YOSHIDA 337c43064e
Add hostonlyif subcommand completion 2022-12-25 12:56:22 +09:00
Shohei YOSHIDA 46e5e95405
Add metrics subcommand completion 2022-12-25 12:52:22 +09:00
Shohei YOSHIDA d54db07dd5
Add debugvm subcommand completion 2022-12-25 12:44:18 +09:00
Shohei YOSHIDA fa57596f67
ADd guestcontrol subcommand completion 2022-12-25 12:20:38 +09:00
Shohei YOSHIDA 8d40ac67bf
Add natnetwork subcommand completion 2022-12-25 10:41:20 +09:00
Shohei YOSHIDA a6f3ed2616
Implement sharedfolder subcommand completion 2022-12-24 22:39:10 +09:00
Shohei YOSHIDA 2e02fa2bc4
Add usbdevsource subcommand completion 2022-12-24 22:00:29 +09:00
Shohei YOSHIDA bf30efa147
Merge pull request #972 from zsh-users/add-extpack
Add extpack subcommand completion
2022-12-24 21:36:15 +09:00
Shohei YOSHIDA 793c77ece9
Add extpack subcommand completion 2022-12-24 19:49:05 +09:00
Shohei YOSHIDA 428473bcc5
Merge pull request #971 from zsh-users/add-modifynvram
Add modifynvram subcommand completion
2022-12-24 19:15:14 +09:00
Shohei YOSHIDA a5cc26eee1
Add modifynvram subcommand completion 2022-12-24 18:38:00 +09:00
Shohei YOSHIDA e2aeee4ba5
Merge pull request #970 from zsh-users/add-updatecheck
Add updatecheck subcommand completion
2022-12-24 17:51:00 +09:00
Shohei YOSHIDA 01c0875bb5
Add updatecheck subcommand completion 2022-12-24 17:31:27 +09:00
Shohei YOSHIDA c4c820a54a
Merge pull request #969 from zsh-users/add-usbfilter
Add usbfilter subcommand completion
2022-12-24 16:59:40 +09:00
Shohei YOSHIDA eff72eacf6
Add usbfilter subcommand completion 2022-12-24 15:50:32 +09:00
Shohei YOSHIDA 2c8261ee2f
Merge pull request #968 from zsh-users/add_guestproperty
Add guestproperty subcommand completion
2022-12-24 15:41:41 +09:00
Shohei YOSHIDA 4f8614d0ac
Add guestproperty subcommand completion 2022-12-24 09:27:04 +09:00
Shohei YOSHIDA a7b82b0199
Merge pull request #967 from zsh-users/add-cloud
Add cloud subcommand completion
2022-12-24 08:13:10 +09:00
Shohei YOSHIDA 6ec58b685e
Add cloud subcommand completion 2022-12-23 21:59:58 +09:00
Shohei YOSHIDA 6fe5f8a46a
Merge pull request #966 from zsh-users/add-snapshot
Add snapshot subcommand completion
2022-12-23 21:17:00 +09:00
Shohei YOSHIDA 2228daef0e
Add snapshot subcommand completion 2022-12-23 20:55:17 +09:00
Shohei YOSHIDA a9ae3899b7
Merge pull request #965 from zsh-users/add-unattended
Add unattended subcommand completion
2022-12-23 20:47:07 +09:00
Shohei YOSHIDA 61ccfe353f
Add unattended subcommand completion 2022-12-23 18:13:26 +09:00
Shohei YOSHIDA 38e1989e64
Merge pull request #964 from zsh-users/add-cloudprofile
Add cloudprofile subcommand completion
2022-12-23 16:58:37 +09:00
Shohei YOSHIDA 7aba5946ca
Add cloudprofile subcommand completion 2022-12-23 16:46:30 +09:00
Shohei YOSHIDA 259eec99ba
Merge pull request #963 from zsh-users/add-mediumio
Add mediumio subcommand completion
2022-12-23 15:44:33 +09:00
Shohei YOSHIDA a2d4ea00d9
Add mediumio subcommand completion 2022-12-23 15:28:52 +09:00
Shohei YOSHIDA 317a63bc03
Merge pull request #962 from zsh-users/add-bandwidthctl
Add bandwidthctl subcommand completion
2022-12-23 14:50:35 +09:00
Shohei YOSHIDA 0211e566da
Add bandwidthctl subcommand completion 2022-12-23 14:12:29 +09:00
Shohei YOSHIDA f0af8a58bf
Merge pull request #961 from zsh-users/add-encryptvm
Implement encryptvm subcommand
2022-12-23 14:02:05 +09:00
Shohei YOSHIDA 7ec9280e88
Implement encryptvm subcommand 2022-12-22 21:36:57 +09:00
Shohei YOSHIDA 5ba8f9c405
Merge pull request #959 from zsh-users/virtualbox-setproperty
Add set property completion
2022-12-22 15:36:30 +09:00
Shohei YOSHIDA 021da0cde5
Add set property completion 2022-12-22 14:32:56 +09:00
Shohei YOSHIDA b215131217
Merge pull request #958 from zsh-users/fix-virtualbox
Update virtualbox completion
2022-12-15 22:21:11 +09:00
Shohei YOSHIDA 9a1ec0e9ee
Update virtualbox completion
- Fix broken option completion
- Format
- Update subcommands
- Add TODO comments in unimplemented subcommands
2022-12-14 23:29:37 +09:00
Shohei YOSHIDA 7b8bb64cbb
Merge pull request #955 from zsh-users/clang-tools
Add clang tools completions
2022-12-12 22:46:26 +09:00
Shohei YOSHIDA 12e788f4a5
Merge pull request #957 from zsh-users/update-go-1.20
Update go1.20
2022-12-12 22:45:28 +09:00
Shohei YOSHIDA 07a062b77e
Update go1.20
- add `-C` flag and `-pgo` flag
- remove `-i` flag from `go build` and `go test` because it was removed
2022-12-08 12:54:23 +09:00
Shohei YOSHIDA f9373c96c7
Merge pull request #956 from zsh-users/fix-broken-cmake-boolean-completion
Fix broken boolean parameter completion
2022-12-03 17:21:48 +09:00
Shohei YOSHIDA 10a706d337
Fix broken boolean parameter completion 2022-12-03 13:35:37 +09:00
Shohei YOSHIDA d6e8817991
Add clang-tidy completion 2022-12-03 13:16:02 +09:00
Shohei YOSHIDA 3b0477499e
Add clang-format completion 2022-12-03 13:15:31 +09:00
Shohei YOSHIDA 3d26c20452
Add clang-check completion 2022-12-03 13:15:25 +09:00
Shohei YOSHIDA a09284a734
Merge pull request #953 from zsh-users/update-setcap
Update setcap
2022-11-26 21:08:45 +09:00
Shohei YOSHIDA ccac058058
Merge pull request #954 from zsh-users/update-dhcpcd
Update dhcpcd completion
2022-11-26 21:08:29 +09:00
Shohei YOSHIDA fa0b8386b4
Update dhcpcd completion 2022-11-25 18:54:45 +09:00
Shohei YOSHIDA fc35e4e6c3
Update setcap 2022-11-25 18:15:00 +09:00
Shohei YOSHIDA 59560d43a4
Merge pull request #952 from zsh-users/update_qmk
Update qmk completion
2022-11-25 08:47:52 +09:00
Shohei YOSHIDA 3b7609ad4f
Update qmk completion 2022-11-24 22:37:42 +09:00
Shohei YOSHIDA 92eae00fa1
Merge pull request #951 from zsh-users/update-pixz
Update pixz
2022-11-24 19:00:07 +09:00
Shohei YOSHIDA 2a284cfefa
Update pixz 2022-11-24 17:45:00 +09:00
Shohei YOSHIDA 55a3314a2d
Merge pull request #949 from zsh-users/update-ccache
Update ccache
2022-11-23 16:26:31 +09:00
Shohei YOSHIDA 0439726d19
Merge pull request #950 from zsh-users/remove-zsh-supported-completions
Remove completions that zsh supports itself
2022-11-23 16:26:21 +09:00
Shohei YOSHIDA fc9ff87d12
Remove completions that zsh supports itself 2022-11-23 16:20:14 +09:00
Shohei YOSHIDA 17f57c2b2e
Update ccache 2022-11-23 16:18:02 +09:00
Shohei YOSHIDA e8f1574203
Merge pull request #948 from zsh-users/remove-debuild
Remove _debuild completion
2022-11-23 13:47:47 +09:00
Shohei YOSHIDA b96a310c96
Merge pull request #947 from zsh-users/update-dget
Update dget completion
2022-11-23 13:47:30 +09:00
Shohei YOSHIDA 2b16b33a10
Remove _debuild completion
zsh supports it itself now
2022-11-23 13:45:23 +09:00
Shohei YOSHIDA b263de0778
Update dget completion 2022-11-23 13:35:47 +09:00
Shohei YOSHIDA fddcae4a29
Merge pull request #946 from zsh-users/update-links
Update links
2022-11-23 13:32:56 +09:00
Shohei YOSHIDA 0b6e064850
Update links 2022-11-23 13:31:48 +09:00
Shohei YOSHIDA e6cb409135
Merge pull request #945 from zsh-users/update-conan
Update conan completion
2022-11-23 12:18:32 +09:00
Shohei YOSHIDA 3c49fc1f15
Merge pull request #944 from zsh-users/update-inxi
Update inxi completion
2022-11-23 11:56:18 +09:00
Shohei YOSHIDA 256e21a314
Merge pull request #943 from zsh-users/update-mvn
Update mvn completion
2022-11-23 11:56:08 +09:00
Shohei YOSHIDA 4527ea4c64
Update conan completion 2022-11-23 11:55:08 +09:00
Shohei YOSHIDA 3a9bc83c91
Update inxi completion 2022-11-21 23:59:33 +09:00
Shohei YOSHIDA 92199f20b2
Update mvn completion 2022-11-21 18:47:47 +09:00
Shohei YOSHIDA 6a5b7245be
Merge pull request #942 from zsh-users/update-pm2
Update pm2 completion
2022-11-20 00:08:04 +09:00
Shohei YOSHIDA bffb7ef747
Update pm2 completion 2022-11-19 18:46:28 +09:00
Shohei YOSHIDA 703b877bac
Merge pull request #941 from zsh-users/update-svm
Update svm
2022-11-18 22:34:20 +09:00
Shohei YOSHIDA 141d79e67b
Merge pull request #940 from zsh-users/update-cmake
Update cmake completion
2022-11-18 22:34:03 +09:00
Shohei YOSHIDA 09efd4c547
Merge pull request #939 from zsh-users/remove-force
Remove force completion
2022-11-18 22:33:37 +09:00
Shohei YOSHIDA bec6ca01b1
Merge pull request #938 from zsh-users/refactor-flutter
Refactoring flutter completion
2022-11-18 22:33:15 +09:00
Shohei YOSHIDA 6e7478967f
Merge pull request #937 from zsh-users/update-scrub
Format scrub completion and improve pattern completion
2022-11-18 22:32:41 +09:00
Shohei YOSHIDA 0f4dddf7d8
Update svm 2022-11-18 22:31:36 +09:00
Shohei YOSHIDA df1bba9803
Update cmake completion 2022-11-18 22:25:19 +09:00
Shohei YOSHIDA df4f71fb8c
Remove force completion
Because force command supports to generate zsh completion file itself
2022-11-18 17:46:18 +09:00
Shohei YOSHIDA 6b33831ab3
Refactoring flutter completion
- apply formatting
- remove unused functions
- DRY
2022-11-18 17:16:14 +09:00
Shohei YOSHIDA 8840190985
Format scrub completion and improve pattern completion 2022-11-18 12:17:35 +09:00
Shohei YOSHIDA ba6f1e662e
Merge pull request #934 from zsh-users/update-coffee
Update coffee completion
2022-11-18 11:52:14 +09:00
Shohei YOSHIDA 8052a7ef0b
Merge pull request #935 from zsh-users/remove_vagrant
Remove vagrant
2022-11-18 11:51:57 +09:00
Shohei YOSHIDA 1de72da1df
Merge pull request #936 from zsh-users/remove_perf
Remove perf completion
2022-11-18 11:42:45 +09:00
Shohei YOSHIDA 83842b03d6
Remove perf completion
Because zsh supports perf completion now
2022-11-18 11:32:19 +09:00
Shohei YOSHIDA e001c1e523
Remove vagrant
vagrant supports zsh completion itself now

Reference
- https://developer.hashicorp.com/vagrant/docs/cli#autocompletion
2022-11-18 11:30:20 +09:00
Shohei YOSHIDA b920d83b9a
Update coffee completion 2022-11-18 10:55:27 +09:00
Shohei YOSHIDA 8f55f16f8d
Merge pull request #932 from zsh-users/update-lunchy
Update lunchy completion
2022-11-18 10:43:55 +09:00
Shohei YOSHIDA c6fdfc6cfa
Merge pull request #933 from zsh-users/update-ibus
Update ibus
2022-11-18 10:43:21 +09:00
Shohei YOSHIDA bfe43af637
Update ibus 2022-11-18 00:11:23 +09:00
Shohei YOSHIDA 7483c68a70
Merge pull request #929 from zsh-users/update_lilypond
Update lilypond completion
2022-11-17 20:31:10 +09:00
Shohei YOSHIDA 00dca0baf8
Merge pull request #931 from zsh-users/add-mc-description
Add description of mc command
2022-11-17 20:28:51 +09:00
Shohei YOSHIDA 6f259a706e
Merge pull request #930 from zsh-users/remove-composer
Remove composer
2022-11-17 20:27:38 +09:00
Shohei YOSHIDA e7d3f4c6c6 Update lunchy completion 2022-11-17 19:14:26 +09:00
Shohei YOSHIDA 6569c7df34
Add description of mc command 2022-11-17 17:52:22 +09:00
Shohei YOSHIDA 812d2202c0
Remove composer 2022-11-17 17:38:37 +09:00
Shohei YOSHIDA 3eec22b0f6
Update lilypond completion 2022-11-17 08:38:06 +09:00
Shohei YOSHIDA b293a95465
Merge pull request #927 from zsh-users/update-showoff
Update showoff completion
2022-11-17 08:27:41 +09:00
Shohei YOSHIDA dd7a1378d0
Merge pull request #928 from zsh-users/update-cap
Update Capistrano completion
2022-11-17 08:27:16 +09:00
Shohei YOSHIDA 47e55a8715
Update Capistrano completion 2022-11-17 00:15:43 +09:00
Shohei YOSHIDA 80f7f13d6d
Update showoff completion 2022-11-16 23:53:17 +09:00
Shohei YOSHIDA c41e744e14
Merge pull request #924 from zsh-users/remove-git-journal
Remove git-journal completion
2022-11-16 23:10:37 +09:00
Shohei YOSHIDA da7339b4b2
Merge pull request #923 from zsh-users/update-docpad
Update docpad
2022-11-16 23:09:38 +09:00
Shohei YOSHIDA 100a9171ff
Merge pull request #922 from zsh-users/update-thor
Update thor completion
2022-11-16 23:09:04 +09:00
Shohei YOSHIDA c39f496be3
Merge pull request #921 from zsh-users/update-pygmentize
Update pygmentize completion
2022-11-16 23:08:33 +09:00
Shohei YOSHIDA 710e0c19a6
Merge pull request #925 from zsh-users/update-kak
Update kak completion
2022-11-16 23:07:52 +09:00
Shohei YOSHIDA 789db31745
Merge pull request #926 from zsh-users/remove-sublime-text
Remove subl completion
2022-11-16 23:07:10 +09:00
Shohei YOSHIDA 789054ed27
Remove subl completion
zsh supports Sublime text cli completion now
2022-11-16 20:44:29 +09:00
Shohei YOSHIDA 7cea53d40d
Update kak completion 2022-11-16 20:34:14 +09:00
Shohei YOSHIDA 8c8c42e123
Remove git-journal completion
git-journal supports to generate zsh(and bash) completion file.
And this completion file output is same as its output.
2022-11-16 20:10:07 +09:00
Shohei YOSHIDA d62dcaf896
Update docpad 2022-11-16 19:41:27 +09:00
Shohei YOSHIDA 63a275bc2e
Update thor completion 2022-11-16 16:09:14 +09:00
Shohei YOSHIDA 6de723fd36
Update pygmentize completion 2022-11-16 11:18:01 +09:00
Shohei YOSHIDA 01ff97e2fe
Merge pull request #919 from zsh-users/update-grances
Update glances completion
2022-11-16 09:04:46 +09:00
Shohei YOSHIDA 4fbbe31928
Merge pull request #920 from zsh-users/update_subliminal
Update subliminal completion
2022-11-16 09:04:21 +09:00
Shohei YOSHIDA 3e07b1e030
Update subliminal completion 2022-11-15 23:29:51 +09:00
Shohei YOSHIDA 22f873dc5e
Merge pull request #917 from zsh-users/update-bundle-doc
Update 'bundle clean --force' completion document
2022-11-15 22:33:04 +09:00
Shohei YOSHIDA 645936e055
Update glances completion 2022-11-15 22:31:59 +09:00
Shohei YOSHIDA fd462fc4dc
Merge pull request #918 from kaznovac/patch-1
nvm: remove extra space in exec command description
2022-11-15 21:05:54 +09:00
Marko Kaznovac 4ab4eaea2d
nvm: remove extra space in exec command description 2022-11-15 12:48:19 +01:00
Shohei YOSHIDA 90fc2e1c44
Update 'bundle clean --force' completion document 2022-11-15 11:48:04 +09:00
Shohei YOSHIDA 7916ba50ed
Merge pull request #915 from zsh-users/update-git-revise
Add git-revise completion
2022-11-15 10:38:32 +09:00
Shohei YOSHIDA b0206148f1
Merge pull request #916 from zsh-users/update-rslsync
Update rslsync completion
2022-11-15 10:37:53 +09:00
Shohei YOSHIDA 28070aa9e4
Update rslsync completion 2022-11-14 23:37:58 +09:00
Shohei YOSHIDA c3ff722d2e
Add git-revise completion 2022-11-14 23:23:44 +09:00
Shohei YOSHIDA 45b5a8a78d
Merge pull request #914 from zsh-users/update-rubocop
Update RuboCop completion
2022-11-14 23:17:12 +09:00
Shohei YOSHIDA 2d9d1ffa60
Update RuboCop completion 2022-11-14 13:35:02 +09:00
Shohei YOSHIDA ec65b307c7
Merge pull request #913 from zsh-users/fix-bundle-group
fix bundle group completion
2022-11-14 12:28:01 +09:00
Shohei YOSHIDA 6470db93fb
fix group completion
Original code does not work if multile directories are matched
2022-11-14 00:52:31 +09:00
Shohei YOSHIDA c03ee3f617
Merge pull request #912 from zsh-users/update-teamocil
Update Teamocil
2022-11-14 00:10:29 +09:00
Shohei YOSHIDA 28affc5c80
Update Teamocil 2022-11-13 23:54:30 +09:00
Shohei YOSHIDA 08cff30f4d
Merge pull request #911 from zsh-users/update-nvm
Update nvm completion
2022-11-13 23:44:11 +09:00
Shohei YOSHIDA 27e61dfbaf
Update nvm completion 2022-11-12 21:23:46 +09:00
Shohei YOSHIDA 1db9015d76
Merge pull request #910 from zsh-users/update-gist
Update gist completion
2022-11-11 20:30:55 +09:00
Shohei YOSHIDA d45e52f607
Update gist completion 2022-11-11 11:46:54 +09:00
Shohei YOSHIDA 23e63a98c2
Merge pull request #909 from zsh-users/update-cppcheck
Update cppcheck completion
2022-11-11 10:00:39 +09:00
Shohei YOSHIDA 20edd70f84
Update cppcheck completion 2022-11-10 22:57:27 +09:00
Shohei YOSHIDA 4e63f4566a
Merge pull request #908 from zsh-users/update-bundle
Update bundle zsh completion
2022-11-10 11:43:54 +09:00
Shohei YOSHIDA 6310817eb4
Update bundle zsh completion
And fix some broken completions
2022-11-09 18:43:31 +09:00
Shohei YOSHIDA b736f2679c
Merge pull request #907 from zsh-users/update_afew
Update afew
2022-11-07 23:11:30 +09:00
Shohei YOSHIDA 0913143538
Update afew 2022-11-07 22:39:17 +09:00
Shohei YOSHIDA 52188442a4
Merge pull request #906 from zsh-users/update-httpie
Update httpie completion and reformat code
2022-11-07 18:07:29 +09:00
Shohei YOSHIDA bfc56a2e4c
Update httpie completion and reformat code
- Reformat
- Remove deprecated options
- Add missing candidates of `--style` and `--auth-type`
2022-11-07 16:41:39 +09:00
Shohei YOSHIDA 14da57e8e2
Merge pull request #891 from max-ae/httpie-https
make httpie completion work for both `http` and `https`
2022-11-07 16:16:39 +09:00
Shohei YOSHIDA 1794788d69
Merge pull request #905 from zsh-users/cmake-generator
Extract generators from 'cmake --help'
2022-11-03 14:14:23 +09:00
Shohei YOSHIDA 4bf24327ba
Extract generators from 'cmake --help' 2022-11-02 12:01:16 +09:00
Shohei YOSHIDA 57c868face
Merge pull request #904 from zsh-users/bug/fvm-bsd-sed-issue
Original sed code does not work on BSD sed with BRE
2022-11-01 16:15:28 +09:00
Shohei YOSHIDA 3e46a875d4
Original sed code does not work on BSD sed with BRE 2022-11-01 15:59:07 +09:00
Shohei YOSHIDA b4ec85ede7
Merge pull request #902 from zsh-users/add-fvm
Add fvm completion
2022-10-31 22:21:12 +09:00
Shohei YOSHIDA 1d13f2ad9b
Merge pull request #903 from zsh-users/update-tmuxp
Update tmuxp
2022-10-31 22:20:23 +09:00
Shohei YOSHIDA aedae136e7
Add fvm completion 2022-10-31 18:24:30 +09:00
Shohei YOSHIDA 2dfe3ca220
Update tmuxp 2022-10-30 17:53:46 +09:00
Shohei YOSHIDA 655576f336
Merge pull request #901 from zsh-users/node-v19.0.0
Update node.js completion to 19.0.0
2022-10-19 17:23:34 +09:00
Shohei YOSHIDA 79b3418462
Update node.js completion to 19.0.0 2022-10-19 11:09:06 +09:00
Shohei YOSHIDA 10b46f923a
Merge pull request #895 from Freed-Wu/master
Remove _trash* because trashcli support completion
2022-10-16 22:54:48 +09:00
Shohei YOSHIDA 879f4b6515
Merge pull request #896 from huyz-git/master
Fix nftables completion
2022-10-04 23:15:50 +09:00
test e64e3c2d02 Fix nftables completion 2022-10-04 15:29:19 +08:00
Wu Zhenyu 527c3d3d79 Remove _trash* because trashcli support completion
https://github.com/andreafrancia/trash-cli/blob/master/trashcli/shell_completion.py
2022-09-30 14:36:59 +08:00
Shohei YOSHIDA 57330ba11b
Merge pull request #894 from selfish/add-direnv-completion
Add Direnv completion
2022-09-21 00:27:10 +09:00
Nitai J. Perez 6a33c3f666 Add Direnv completion 2022-09-19 14:39:54 +03:00
Shohei YOSHIDA acd4de5268
Merge pull request #893 from BreakbeatTechnology/usegrepemode
Utilize grep -E instead of deprecated/obsolescent egrep
2022-09-13 09:54:41 +09:00
rtisdale e6fdabb97d Utilize grep -E instead of deprecated/obsolescent egrep 2022-09-12 17:51:37 +02:00
Max Eisner c1de68a88f
make httpie completion work for both `http` and `https` 2022-09-09 14:36:46 +02:00
Shohei YOSHIDA 53f2eab090
Merge pull request #888 from zsh-users/fix-typo
Fix node completion typo
2022-08-29 16:28:41 +09:00
Shohei YOSHIDA 11ad45a66e
Fix node completion typo 2022-08-29 16:15:23 +09:00
Shohei YOSHIDA 9571c507f4
Merge pull request #887 from zsh-users/node-update
Update node.js options
2022-08-29 14:03:20 +09:00
Shohei YOSHIDA 87f190da85
Update node.js options 2022-08-29 12:30:52 +09:00
Julien Nicoulaud f360827b88
Merge pull request #846 from syohex/issue845
Remove _tarsnap
2022-08-13 19:50:53 +02:00
Shohei YOSHIDA b131623ee4
Merge pull request #884 from zsh-users/cmake-3.24
Update cmake options for version 3.24
2022-08-11 16:54:17 +09:00
Shohei YOSHIDA ae63b5ae41
Update cmake options for version 3.24 2022-08-10 16:16:59 +09:00
Shohei YOSHIDA 85a0874060
Merge pull request #883 from zsh-users/go-env-completion
Update go environment variable completion
2022-08-10 12:14:19 +09:00
Shohei YOSHIDA 88b284dc6d
Update go environment variable completion 2022-08-10 10:07:48 +09:00
Shohei YOSHIDA b5ba0051dc
Merge pull request #882 from zsh-users/go1.19
Update for go 1.19
2022-08-07 23:17:01 +09:00
Shohei YOSHIDA 40c1e44216
Update for go 1.19
'tool compile' no longer accepts '-importmap'
2022-08-07 12:04:22 +09:00
Shohei YOSHIDA 11258bcd48
Merge pull request #881 from nolange/fix_cmake_presets
_cmake: fix cmake presets for real
2022-07-19 22:49:38 +09:00
Norbert Lange 061f09cd53 _cmake: fix cmake presets for real
support presets without descriptions, and modify the commandline
to add --list-presets at the end.

Improve how cmake presets are listed, should be more robust
in regards to quoting.
2022-07-19 13:59:06 +02:00
Shohei YOSHIDA 073379d908
Merge pull request #880 from zsh-users/update-nano
Update nano completion
2022-07-06 15:47:02 +09:00
Shohei YOSHIDA 7f84f65d60
Update nano completion 2022-07-06 00:07:15 +09:00
Shohei YOSHIDA 0331b2908f
Merge pull request #879 from zsh-users/update-jmeter
Update jmeter options
2022-07-02 18:09:41 +09:00
Shohei YOSHIDA cc2df4217e
Update jmeter options 2022-07-02 15:44:11 +09:00
Shohei YOSHIDA f193f0d4fb
Merge pull request #878 from zsh-users/go-test-flags
Add go 1.18 test flags
2022-07-02 00:57:40 +09:00
Shohei YOSHIDA 12a73d0200
Add go 1.18 test flags
And fix some typo
2022-07-02 00:55:29 +09:00
Shohei YOSHIDA 07c37ce8c4
Merge pull request #873 from zsh-users/update-httpie
Update httpie completion
2022-06-20 01:38:36 +09:00
Shohei YOSHIDA fc517dd8ad
Update httpie completion 2022-06-19 23:51:20 +09:00
Shohei YOSHIDA f230d3cf81
Merge pull request #871 from zsh-users/update-tox
Update tox options
2022-06-18 22:31:48 +09:00
Shohei YOSHIDA bacf79fc34
Update tox options 2022-06-18 22:17:51 +09:00
Shohei YOSHIDA dd45d21d06
Merge pull request #870 from seankhliao/go1.18
go: update completions for 1.18
2022-06-17 12:07:32 +09:00
Sean Liao af030b381f
fix typos
Co-authored-by: Shohei YOSHIDA <syohex@gmail.com>
2022-06-17 03:53:10 +01:00
Sean Liao 6f407f5287
update completions for 1.18 2022-06-16 20:27:29 +01:00
Shohei YOSHIDA 45cb3becd8
Revert "Merge pull request #868 from ibayramli2001/fig"
This reverts commit 263c14d969, reversing
changes made to fcf490292e.
2022-06-17 01:21:11 +09:00
Shohei YOSHIDA 263c14d969
Merge pull request #868 from ibayramli2001/fig
Add Fig as an installation method to the README
2022-06-16 12:35:44 +09:00
Ilkin Bayramli 28ef391e35
Add Fig as an installation method to the README 2022-06-15 19:02:46 -07:00
Shohei YOSHIDA fcf490292e
Merge pull request #867 from zsh-users/flutter3
Update to flutter3
2022-06-14 22:44:56 +09:00
Shohei YOSHIDA 63d333ce88
Update to flutter3 2022-06-14 19:55:33 +09:00
Shohei YOSHIDA 2e3c3f6cf0
Merge pull request #863 from ninedotnine/danso/trash-d
Add completion for trash-d
2022-05-23 09:04:36 +09:00
dan soucy 14de4f5b13
Add completion for trash-d
https://github.com/rushsteve1/trash-d

trash-d is an implementation of the FreeDesktop trash bin
designed to be a drop-in replacement for `rm`.

This completion conflicts with trash-cli,
as both projects name their main executable `trash`.
2022-05-22 18:00:45 -04:00
Shohei YOSHIDA 7a72511f7b
Merge pull request #862 from kyanagi/bundle-add-commands
Added add, binstubs, clean, doctor, remove commands to bundler completions
2022-05-10 19:06:00 +09:00
Kouhei Yanagita 19b03c3b2d Added add, binstubs, clean, doctor, remove commands to bundler completions 2022-05-10 17:56:19 +09:00
Shohei YOSHIDA ca484eac40
Merge pull request #861 from saeltz/patch-1
Drop unsupported git protocol from Readme
2022-04-26 18:31:58 +09:00
Bendix Sältz 20b3e087fd
Drop unsupported git protocol from Readme
When trying to clone the repository, git complained with:
```
fatal: remote error: 
  The unauthenticated git protocol on port 9418 is no longer supported.
```

Using HTTPS in the URL works just fine.
2022-04-26 11:21:01 +02:00
Shohei YOSHIDA 00a7cc2200
Merge pull request #859 from zsh-users/node-v18
Update node-v18
2022-04-20 15:41:18 +09:00
Shohei YOSHIDA 03731671e3
Update node-v18 2022-04-20 12:51:48 +09:00
Shohei YOSHIDA 3d394ebaa1
Merge pull request #858 from zsh-users/update-node
Update node.js options
2022-04-11 10:05:55 +09:00
Shohei YOSHIDA ac3e08c9d4
Update node.js options 2022-04-10 23:22:38 +09:00
Shohei YOSHIDA 6db5ddc655
Merge pull request #857 from Freed-Wu/hello
Add completion for hello
2022-04-01 16:40:21 +09:00
Freed-Wu 4371e1a831 Add completion for hello 2022-04-01 11:28:41 +08:00
Shohei YOSHIDA 55d07cc577
Merge pull request #854 from sh-cho/patch-1
Add install guide with zinit
2022-03-04 10:06:32 +09:00
Seonghyeon Cho 3933b18fb3
Add install guide with zinit 2022-03-04 01:01:25 +09:00
Shohei YOSHIDA 51a663f0d6
Merge pull request #853 from syohex/issue-852
Don't complete if here is not git repository
2022-03-04 00:15:34 +09:00
Shohei YOSHIDA e17d424462
Don't complete if here is not git repository 2022-03-03 23:50:33 +09:00
Shohei YOSHIDA 6fbf5fc9a7
Merge pull request #850 from syohex/pr-849
Rewrite #849 in Perl for portability
2022-02-24 15:34:45 +09:00
Shohei YOSHIDA d9e81e08f2
Rewrite JSON parsing code in Perl for portability 2022-02-24 15:04:47 +09:00
Huw Percival ff6031a8ea re-write to use python, hopefully this is portable enough, tested with python 3.6.5 anf 2.7.18 2022-02-23 10:40:29 +00:00
Shohei YOSHIDA fa5a3843f4
Merge pull request #848 from lukaszmoroz/fix/remove_cheat
Remove cheat completions
2022-02-23 09:45:25 +09:00
Huw Percival b34650ea31 fix presets 2022-02-22 16:36:35 +00:00
Łukasz Moroz 83d9ea9218 Remove cheat completions 2022-02-22 15:48:43 +01:00
Julien Nicoulaud 3fb84ee9cc
Merge pull request #844 from felipecrs/patch-1
Improve OMZ installation instructions
2022-02-14 16:50:10 +01:00
Shohei YOSHIDA 530ee90b48
Remove _tarsnap
because it provides the zsh completion file now
2022-02-13 18:30:50 +09:00
Felipe Santos 81cd07bb9e
Improve OMZ installation instructions 2022-02-12 14:37:11 -03:00
Shohei YOSHIDA 298020e4e3
Merge pull request #842 from dark-panda/add-pg-completions
Add additional PostgreSQL completions for 13+ and reorganize
2022-01-28 11:09:24 +09:00
J Smith 406167058b Add additional PostgreSQL completions for 13+ and reorganize 2022-01-27 18:23:03 -04:00
Shohei YOSHIDA 1f1962e867
Merge pull request #841 from paaguti/master
Add initial natnetwork handling to virtualbox
2022-01-26 08:54:25 +09:00
Pedro A. Aranda Gutierrez 2c3b218d24 Add list natnets and natnetwork option 2022-01-25 19:58:48 +01:00
Pedro A. Aranda Gutierrez b3469afc24 Add initial support for natnetwork subcommand 2022-01-25 17:31:53 +01:00
Pedro A. Aranda Gutierrez c83b6a505b Add function to list natnetworks 2022-01-25 17:30:35 +01:00
Pedro A. Aranda Gutierrez f20a81f813 Add (unCamelised) vboxmanage for Linux 2022-01-25 17:29:23 +01:00
Shohei YOSHIDA 546fa7e5bb
Merge pull request #837 from seivan/patch-1
git-flow: Adding description to be picked up.
2022-01-18 09:29:12 +09:00
Seivan 97093ddac6
git-flow: Adding description to be picked up.
Will describe what flow is, as a git sub command.
2022-01-17 17:44:56 +01:00
Shohei YOSHIDA 20f3cd5f5d
Merge pull request #836 from syohex/colon-script
Fix script completion which contains colons
2022-01-06 20:39:22 +09:00
Shohei YOSHIDA 1b1b0c7c8f
Fix script completion which contains colons 2022-01-06 19:47:55 +09:00
Shohei YOSHIDA bffff37c3e
Merge pull request #834 from syohex/issue833
Fix perl one liner bug
2021-12-30 12:12:53 +09:00
Shohei YOSHIDA d84a6d3b21
Fix perl one liner bug
decode_json returns hash reference, so scalar variable should be
used instead of hash variable.
2021-12-30 11:51:55 +09:00
Shohei YOSHIDA b3876c5982
Merge pull request #830 from syohex/issue-829
Fix issue when package.json is not in current directory
2021-12-21 23:54:32 +09:00
Shohei YOSHIDA da037c4ba7
Fix issue when package.json is not in current directory 2021-12-21 23:52:30 +09:00
Shohei YOSHIDA e4090f1baa
Merge pull request #827 from syohex/issue-802
Update collect workspaces command
2021-12-11 12:27:14 +09:00
Shohei YOSHIDA 790890e256
Fix no node_modules case 2021-12-09 19:44:11 +09:00
Shohei YOSHIDA 839df66922
Don't use yarn run --json for newer yarn 2021-12-09 01:37:29 +09:00
Shohei YOSHIDA 2f54f2b212
Support both older and newer versions 2021-12-08 00:19:46 +09:00
Shohei YOSHIDA c6bce7358c
Update collect workspaces command 2021-12-07 23:06:33 +09:00
Shohei YOSHIDA 1a0808696c
Merge pull request #825 from MunifTanjim/fix-entrypoint
fix: entrypoint fpath expansion
2021-12-01 15:21:22 +09:00
Munif Tanjim ac3ceba238 fix: entrypoint fpath expansion 2021-12-01 12:08:52 +06:00
Shohei YOSHIDA 536bd1d3d4
Merge pull request #824 from midchildan/update/knife
knife: improve completion
2021-11-30 09:54:55 +09:00
midchildan 1f5e5ff471
knife: improve completion for Chef Vault commands 2021-11-30 00:52:28 +09:00
midchildan 392487b0fa
knife: improve code quality
- Quote variables
- Remove unnecessary subshells
- Use local variables
- Unify _chef_*s_remote functions
- Prefix auxillary functions with _knife_*
- Use _call_program when invoking the knife command to silence stderr
  output
2021-11-29 21:58:53 +09:00
midchildan da42a24a07
knife: backport #531 and #131 2021-11-19 00:15:06 +09:00
midchildan b5de3d53e0
knife: sync with oh-my-zsh 2021-11-19 00:02:10 +09:00
Vadim A. Misbakh-Soloviov a1a11caf4f
Merge pull request #823 from rex4539/typos
Fix typos
2021-11-13 01:29:48 +03:00
Dimitris Apostolou 0fd25cda7a
Fix typos 2021-11-12 23:56:34 +02:00
Shohei YOSHIDA bebaa6126e
Merge pull request #819 from turboBasic/master
Update ccache completions
2021-09-16 07:20:30 +09:00
andriy melnyk ╔╬═╚╗╠ ╠╣╔╦╣╚╗ ╔╬╗╚╗╚╝ cd18e471bb
Update ccache completions 2021-09-15 20:03:44 +03:00
Shohei YOSHIDA 32732916a0
Merge pull request #816 from okapia/combine-rmlint
combine _rmlint.sh into _rmlint
2021-08-27 18:38:40 +09:00
Oliver Kiddle 99a6b6cb6e combine _rmlint.sh into _rmlint
The usual zsh approach is one function switching on $service
and the .sh extension seems to cause some people problems with
their setups.
2021-08-27 11:14:17 +02:00
Shohei YOSHIDA f52061cd68
Merge pull request #815 from yut23/patch-1
xinput: escape colons in device names
2021-08-24 08:54:03 +09:00
Eric Johnson b49f300934
xinput: escape colons in device names
The completion menu breaks if any device names have colons in them, as colons are used to separate completion matches from their descriptions.
2021-08-23 18:39:34 -04:00
Shohei YOSHIDA 394239d746
Merge pull request #812 from undg/openvpn3-upstream
Completion for openvpn3.
2021-08-14 09:55:13 +09:00
und3rdg ae82a1efae Lowercase variables. 2021-08-13 22:42:29 +01:00
und3rdg 00b5130b26 Globals are bad! keep var's local, nice and cozzy. 2021-08-12 22:21:16 +01:00
und3rdg 8ed1a90bde Completion for openvpn3. 2021-08-11 18:43:45 +01:00
Shohei YOSHIDA d4511c2365
Merge pull request #808 from oxiedi/rmlint
Add completion for rmlint
2021-07-19 19:11:51 +09:00
oxiedi f996cf93ed Add completion for rmlint 2021-07-19 12:35:04 +05:00
Shohei YOSHIDA a736cfe8e5
Merge pull request #805 from undg/qmk
Autocompletion for qmk.
2021-06-28 19:48:34 +09:00
und3rdg 5025527880 new completion for QMK CLI 2021-06-28 07:29:25 +01:00
nicoulaj 9dfd5c6670
Merge pull request #774 from simnalamburt/mssh-errorhandling
_mssh: Handle error cases more gracefully
2021-05-03 19:28:33 +02:00
Shohei YOSHIDA 11ad0a45ff
Merge pull request #800 from maniac-en/pr/gist_update
gist -u or gist --update will auto-complete user gists
2021-05-02 23:50:46 +09:00
maniac c4b8c83315
gist -u or gist --update will auto-complete user gists
This commit will help the user to easily update their existing gist
using zsh auto-completion rather than going to github and then
extracting the required gist hash/URL

Note: This commit effects the working of file: `src/_gist`
2021-05-02 19:24:38 +05:30
okapia e14d47010a
Merge pull request #799 from syohex/license
fix license
2021-04-30 08:16:29 +02:00
Shohei YOSHIDA 876e972fe0 fix license 2021-04-30 12:56:12 +09:00
Shohei YOSHIDA 773ead6ea7
Merge pull request #798 from kugland/master
completions for lilypond (https://lilypond.org/)
2021-04-25 12:30:25 +09:00
André Kugland 67ced04c7f
completions for lilypond 2021-04-24 02:45:29 -03:00
Shohei YOSHIDA 252c7a995b
Merge pull request #795 from kugland/master
changed "(%)" to "(percent)" in optarg descriptions
2021-04-23 10:22:21 +09:00
André Kugland 78fb97c24d
changed "(%)" to "(percent)" in optarg descriptions 2021-04-22 18:58:03 -03:00
Shohei YOSHIDA d7959bb716
Merge pull request #794 from syohex/pr-793
Add license header to #793
2021-04-21 09:51:33 +09:00
Shohei YOSHIDA fea56d1a7b Add zsh license header 2021-04-21 09:45:28 +09:00
André Kugland 57ba534a6a
added appropriate opts for _arguments 2021-04-19 16:57:12 -03:00
André Kugland d930094f84
fixed issues raised in the review 2021-04-19 16:43:00 -03:00
Shohei YOSHIDA 901a787b2d
Merge pull request #792 from kugland/master
added completions for opus-tools (opusenc, opusdec & opusinfo)
2021-04-19 11:56:44 +09:00
André Kugland b65eb5d64e
added completions for opus-tools (opusenc, opusdec & opusinfo) 2021-04-18 23:00:47 -03:00
Oliver Kiddle cb4b721ada Add exclusion lists to nano completion 2021-04-12 23:53:05 +02:00
okapia 43fecdfe87
Merge pull request #790 from FederAndInk/fix/functions_tests
fix (( $+functions[_f] )) || _f()
2021-04-08 16:36:21 +02:00
Ludovic Jozeau 98cb234270
fix (( $+functions[_f] )) || _f()
checked with: "\(\( \$\+functions\[(.*)\] \)\) \|\|\n(?!\1)"
2021-04-08 15:50:39 +02:00
Shohei YOSHIDA f0c856912c
Merge pull request #789 from syohex/add-table-of-contents
Add table of contents
2021-03-23 15:27:54 +09:00
Shohei YOSHIDA cec348209c Add table of contents 2021-03-23 14:33:20 +09:00
Shohei YOSHIDA 788926ffba
Merge pull request #787 from marlonrichert/patch-1
Remove deprecated `-$` option
2021-03-22 20:17:17 +09:00
Marlon Richert 24834255e9
Remove deprecated `-$` option 2021-03-22 12:21:08 +02:00
Shohei YOSHIDA f1ab6110ce
Merge pull request #786 from ajvondrak/patch-1
Autocomplete files for mix run
2021-03-17 10:05:13 +09:00
Alex Vondrak b152a4901f
Autocomplete files for mix run
Previously, `mix run <tab>` would not expand into anything, even though the [`mix run`](https://hexdocs.pm/mix/Mix.Tasks.Run.html) task accepts filenames as inputs. This commit collapses the growing list of such cases (`test`, `format`, `run`) into one clause that autocompletes files.

Although `mix run` accepts several different `--flags`, the autocompletion isn't currently set up to deal with subcommands' specific options, so I'm punting on that part.
2021-03-16 13:44:40 -07:00
Shohei YOSHIDA aa98bc593f
Merge pull request #784 from Z5483/shellcheck
add 'shellcheck' completion
2021-03-01 09:32:03 +09:00
Khue Nguyen 23ce4b9085 add 'shellcheck' completion 2021-02-28 06:44:59 -05:00
Shohei YOSHIDA 322d5f24f7
Merge pull request #783 from syohex/go-1.16
Add new flags which are introduced at Go 1.16
2021-02-25 17:54:02 +09:00
Shohei YOSHIDA d16c8aea54 Add new flags which are introduced at Go 1.16 2021-02-25 11:32:20 +09:00
Shohei YOSHIDA c7baec49d3
Merge pull request #782 from davidhcefx/master
Update nano to version 5.4
2021-02-11 09:04:59 +09:00
davidhcefx 37a9a485ee update nano to version 5.4 2021-02-11 02:51:33 +08:00
Shohei YOSHIDA 6fe9995fd9
Merge pull request #781 from ScoreUnder/add-gpgconf
Add completion for gpgconf
2021-02-05 08:45:03 +09:00
Score_Under 4c5a8ef41e
Add license notice to _gpgconf 2021-02-04 15:48:07 +00:00
Score_Under ab80ddd379
Shorter perl one-liner in _gpgconf 2021-02-04 14:45:30 +00:00
Score_Under a1d53f8824
Add missing homedir option to _gpgconf 2021-02-04 14:41:16 +00:00
Score_Under c90c27f8fc
Add completion for gpgconf 2021-02-04 13:20:36 +00:00
Shohei YOSHIDA b8cc3b9b67
Merge pull request #777 from dancek/patch-1
udisksctl: fix paths with a colon
2021-01-19 00:31:01 +09:00
Hannu Hartikainen 19a412373f
udisksctl: fix paths with a colon
For paths such as `/dev/disk/by-id/usb-JetFlash_Transcend_64GB_15AFGA849642-0:0`, `_describe` parses the colon as field separator. This results in wrong completions and the general feeling that udisksctl is broken because it won't mount my pendrive.

Since the output of `udisksctl complete` is (apparently) just a list of paths, it's safe to escape all colons with a backslash.
2021-01-18 10:13:44 +00:00
Shohei YOSHIDA 00c7e28e4a
Merge pull request #776 from askebm/cmake-targets-fix
Use correct makefile for target completion
2021-01-16 19:26:12 +09:00
Aske Bækdal Møller 3511fb04db Use correct makefile for target completion 2021-01-16 10:37:26 +01:00
nicoulaj 244cbfc832
Merge pull request #775 from brainplot/openssl-fix
Fix completion of cipher algorithms
2021-01-03 18:41:18 +01:00
Gianluca Recchia 17d92b0a8e
Fix completion of cipher algorithms 2021-01-03 16:31:19 +01:00
Hyeon Kim 5922465d53
_mssh: Handle error cases more gracefully
1.  Do nothing when there's no AWS CLI
2.  Print error message gracefully if AWS CLI failed
2020-12-31 17:27:10 +09:00
Shohei YOSHIDA 9def41ae64
Merge pull request #773 from simnalamburt/mssh
Add 'mssh' completion
2020-12-31 00:36:40 +09:00
Hyeon Kim 7a4574cd45
_mssh: Add a license header 2020-12-30 20:03:56 +09:00
Hyeon Kim 43a6b81308
Add 'mssh' completion
mssh is a Python client for accessing EC2 instances via AWS EC2 Instance
Connect.

References:
  https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-methods.html#ec2-instance-connect-connecting-ec2-cli
  https://github.com/aws/aws-ec2-instance-connect-cli
  https://pypi.org/project/ec2instanceconnectcli/
2020-12-30 17:02:50 +09:00
nicoulaj 44c5bce312
Merge pull request #711 from kanashimia/master
Update stack completions as in the current version 2.3.0.1
2020-12-27 16:41:58 +01:00
nicoulaj 118cc8b544
Merge pull request #772 from nolange/cmake_improvements
CMake improvements and fixes, synced to version 3.19
2020-12-27 16:33:23 +01:00
Norbert Lange 6dff9453ca CMake: note myself as additional author 2020-12-25 23:50:13 +01:00
Norbert Lange 19e65b20dd CMake: udpate generators list 2020-12-25 23:34:56 +01:00
Norbert Lange f5d179b0b5 CMake: Major update to options, adapted to 3.19
Now listed in the same order as the builtin help (CMake 3.19),
for easier audit in the feature.

Commands and descriptions updated.

Support for listing presets.

Use this command to create output for comparison
(not 100% exact obviously):

cmake --help |
  sed -n "s,^ *\(--*[^= ]*\).* = *\([^=]*\),    '\1[\2]',p" |
  sed 's,\.],],'
2020-12-25 23:05:51 +01:00
Norbert Lange 7246533baa CMake: add -E command completions 2020-12-25 22:21:49 +01:00
Norbert Lange 990e604652 CMake: Completely overhaul help command completions
Several argument names where wrong,
completed all available -list functions,
escape brackets in the list, etc.
2020-12-25 22:18:42 +01:00
Norbert Lange 2dc84783fe CMake: Turn some property values into local arrays
Update C/C++ Standards supported aswell
2020-12-25 22:11:49 +01:00
Norbert Lange 63b470243b CMake: fix option completion after first argument
for some reason this just ended after the first option.
2020-12-25 21:57:24 +01:00
Shohei YOSHIDA 2e009c7ab8
Merge pull request #764 from syohex/syohex/remove-flameshot
Remove flameshot completion
2020-09-29 10:58:52 +09:00
Shohei YOSHIDA 2d5a8a3ef1 Remove flameshot completion
It is provided from original project now
2020-09-23 14:39:32 +09:00
Shohei YOSHIDA 454d236d3a
Merge pull request #752 from pseyfert/go1.15
prepare go 1.15
2020-09-01 12:12:00 +09:00
Shohei YOSHIDA 17ba32f8e2
Merge pull request #757 from syohex/syohex/update-nano
Update nano completion
2020-08-11 11:24:43 +09:00
Shohei YOSHIDA 55026f8ed9 Update nano completion
Add '-u', '--unix' flag
2020-08-10 13:17:28 +09:00
Shohei YOSHIDA 4407a48b96
Merge pull request #756 from lwhsu/freebsd
Add package information of FreeBSD
2020-08-05 14:36:43 +09:00
Li-Wen Hsu 84c523505e
Add package information of FreeBSD 2020-08-05 11:58:45 +08:00
Shohei YOSHIDA c6621bb692
Merge pull request #754 from kamleshkc2002/flutter
Update new completions for Flutter
2020-07-21 11:58:34 +09:00
Kamlesh 31c76d90a7 incporporated code review comments
incporporated code review comments from @syohex
2020-07-20 22:38:46 -04:00
Kamlesh 231db68806 Update new completions for Flutter
closes https://github.com/zsh-users/zsh-completions/issues/682

Add new completions for the Flutter CLI
2020-07-20 00:13:15 -04:00
Shohei YOSHIDA 16b89473a7
Merge pull request #753 from syohex/syohex/update-node
Update node flags
2020-07-18 19:01:21 +09:00
Shohei YOSHIDA afcaccd3ca Update node flags 2020-07-17 22:16:36 +09:00
Paul Seyfert 74a316cca8 prepare go 1.15 2020-06-17 22:22:01 +02:00
Shohei YOSHIDA 3b247d3071
Merge pull request #749 from arp242/psqlrc
pgsql: add -X to psql commands to prevent loading ~/.psqlrc
2020-06-03 14:24:46 +09:00
Shohei YOSHIDA 3eea79e9e6
Merge pull request #748 from arp242/pg_config
pgsql: Check for pg_config existence
2020-06-03 14:23:50 +09:00
Martin Tournoij 76efcab2f9
pgsql: Check for pg_config existence
pg_config isn't installed by default on many systems, and is usually
part of postgresql-libs-devel or some such, leading to needless
"pg_config not found" errors on completion.
2020-06-03 12:33:45 +08:00
Martin Tournoij f371431619
pgsql: add -X to psql commands to prevent loading ~/.psqlrc
The ~/.psqlrc may alter the output. In particular, I have '\timing on'
in there to add timings. This is useful when using psql, but not when
relying on it in scripts.

For example:

    psql -Aqt -c "select n.nspname \
        from pg_catalog.pg_namespace n \
        where n.nspname "'!~'" '^pg_' \
          and n.nspname <> 'information_schema' \
        order by 1;" postgres 2>/dev/null

Gives the output:

    public
    Time: 1.882 ms

Whereas with -X it gives the standard output:

    public
2020-06-03 11:40:37 +08:00
Shohei YOSHIDA cfb2dc47db
Merge pull request #747 from okuramasafumi/nanoc-completion
Add completion for nanoc
2020-05-28 08:01:03 +09:00
OKURA Masafumi 0bd08521f9 Add completion for nanoc
nanoc is a static site generator written in Ruby.
Website for nanoc is here: https://nanoc.ws/
2020-05-28 07:47:52 +09:00
Shohei YOSHIDA 786d0f5758
Merge pull request #746 from syohex/syohex/745
Move comment line for avoiding completion error
2020-05-27 23:11:23 +09:00
Shohei YOSHIDA ae19ab20f5 Move comment line for avoiding completion error 2020-05-27 23:07:34 +09:00
Shohei YOSHIDA d3c3df0f2e
Merge pull request #744 from syohex/syohex/update-vnstat
Update vnstat completion
2020-05-27 09:54:48 +09:00
Shohei YOSHIDA 787ea7a719 Update vnstat completion 2020-05-27 08:49:43 +09:00
Kanashimia d57ce3b635
Remove '*' from nix* and docker* 2020-05-05 02:52:58 +03:00
Kanashimia 378d08d82d
Another minor changes.. 2020-05-05 02:46:48 +03:00
Kanashimia 44b3d21dd7
Fix all words to start with a lowercase letter. 2020-05-05 02:41:27 +03:00
Kanashimia 565d378f00
Update _stack 2020-05-05 02:24:33 +03:00
217 changed files with 27963 additions and 17293 deletions

View File

@ -1,5 +1,5 @@
; This file is for unifying the coding style for different editors and IDEs. ; This file is for unifying the coding style for different editors and IDEs.
; More information at http://EditorConfig.org ; More information at https://editorconfig.org/
root = true root = true

View File

@ -1 +0,0 @@

View File

@ -1,10 +1,11 @@
zsh-completions ![GitHub release](https://img.shields.io/github/release/zsh-users/zsh-completions.svg) ![GitHub contributors](https://img.shields.io/github/contributors/zsh-users/zsh-completions.svg) [![IRC](https://img.shields.io/badge/IRC-%23zsh--completions-yellow.svg)](irc://irc.freenode.net/#zsh-completions) [![Gitter](https://badges.gitter.im/zsh-users/zsh-completions.svg)](https://gitter.im/zsh-users/zsh-completions?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) zsh-completions ![GitHub release](https://img.shields.io/github/release/zsh-users/zsh-completions.svg) ![GitHub contributors](https://img.shields.io/github/contributors/zsh-users/zsh-completions.svg) [![IRC](https://img.shields.io/badge/IRC-%23zsh--completions-yellow.svg)](irc://irc.freenode.net/#zsh-completions) [![Gitter](https://badges.gitter.im/zsh-users/zsh-completions.svg)](https://gitter.im/zsh-users/zsh-completions?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
============= =============
**Additional completion definitions for [Zsh](http://www.zsh.org).** **Additional completion definitions for [Zsh](https://www.zsh.org/).**
*This projects aims at gathering/developing new completion scripts that are not available in Zsh yet. The scripts may be contributed to the Zsh project when stable enough.* *This project aims at gathering/developing new completion scripts that are not available in Zsh yet. The scripts may be contributed to the Zsh project when stable enough.*
---
## Usage ## Usage
@ -16,13 +17,15 @@ zsh-completions ![GitHub release](https://img.shields.io/github/release/zsh-user
| Fedora / CentOS / RHEL / Scientific Linux | [zsh-completions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-completions&package=zsh-completions) | | Fedora / CentOS / RHEL / Scientific Linux | [zsh-completions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-completions&package=zsh-completions) |
| OpenSUSE / SLE | [zsh-completions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-completions&package=zsh-completions) | | 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) | | 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](http://packages.gentoo.org/package/app-shells/zsh-completions) | | 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) | | 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/) | | Slackware | [Slackbuilds](https://slackbuilds.org/repository/14.2/system/zsh-completions/) |
| macOS | [homebrew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/zsh-completions.rb), [MacPorts](https://github.com/macports/macports-ports/blob/master/sysutils/zsh-completions/Portfile) | | 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) |
| NetBSD | [pkgsrc](http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/shells/zsh-completions/README.html) | | NetBSD | [pkgsrc](https://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/shells/zsh-completions/README.html) |
| FreeBSD | [shells/zsh-completions](https://www.freshports.org/shells/zsh-completions) |
---
### Using zsh frameworks ### Using zsh frameworks
@ -30,36 +33,63 @@ zsh-completions ![GitHub release](https://img.shields.io/github/release/zsh-user
Add `antigen bundle zsh-users/zsh-completions` to your `~/.zshrc`. Add `antigen bundle zsh-users/zsh-completions` to your `~/.zshrc`.
#### [oh-my-zsh](http://github.com/robbyrussell/oh-my-zsh) #### [oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh)
* Clone the repository inside your oh-my-zsh repo: To avoid issues with redundant `.zcompdump` cache generation (see [#603](https://github.com/zsh-users/zsh-completions/issues/603)), do **not** load `zsh-completions` as a standard plugin.
Instead, follow this optimized approach:
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions 1. Clone the repository into your custom plugins directory:
* Enable it in your `.zshrc` by adding it to your plugin list and reloading the completion: ```bash
git clone https://github.com/zsh-users/zsh-completions.git \
${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
```
plugins=(… zsh-completions) 2. Update your `~/.zshrc` configuration **before** sourcing oh-my-zsh:
autoload -U compinit && compinit
```bash
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
autoload -U compinit && compinit
source "$ZSH/oh-my-zsh.sh"
```
This prevents `compinit` from being called twice and significantly improves shell startup time.
#### [zinit](https://github.com/zdharma-continuum/zinit)
Add `zinit light zsh-users/zsh-completions` to your `~/.zshrc`.
---
### Manual installation ### Manual installation
* Clone the repository: * Clone the repository:
git clone git://github.com/zsh-users/zsh-completions.git ```bash
git clone https://github.com/zsh-users/zsh-completions.git
```
* Include the directory in your `$fpath`, for example by adding in `~/.zshrc`: * Include the directory in your `$fpath`, for example by adding in `~/.zshrc`:
fpath=(path/to/zsh-completions/src $fpath) ```bash
fpath=(path/to/zsh-completions/src $fpath)
```
* You may have to force rebuild `zcompdump`: * You may have to force rebuild `zcompdump`:
rm -f ~/.zcompdump; compinit ```bash
rm -f ~/.zcompdump; compinit
```
---
### Contributing ### Contributing
Contributions are welcome, see [CONTRIBUTING](https://github.com/zsh-users/zsh-completions/blob/master/CONTRIBUTING.md). Contributions are welcome, see [CONTRIBUTING](https://github.com/zsh-users/zsh-completions/blob/master/CONTRIBUTING.md).
---
## License ## License
Completions use the Zsh license, unless explicitly mentioned in the file header.
Completions use the Zsh license, unless explicitly mentioned in the file header.
See [LICENSE](https://github.com/zsh-users/zsh-completions/blob/master/LICENSE) for more information. See [LICENSE](https://github.com/zsh-users/zsh-completions/blob/master/LICENSE) for more information.

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

@ -1,6 +1,6 @@
#compdef afew #compdef afew
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,7 +28,8 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for afew an initial tagging script for notmuch mail. (https://github.com/teythoon/afew) # Completion script for afew(version 3.0.1) an initial tagging script for notmuch mail.
# (https://github.com/teythoon/afew)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -39,22 +40,20 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments \ _arguments \
'(- 1 *)-h[display usage information]' \ '(- 1 *)'{-h,--help}'[display usage information]' \
"(-c --classify -l --learn= -t --tag -u --update -U --update-reference -m --move-mails)"{-w,--watch}"[continuously monitor the mailbox for new messages matching the given query]" \ '(- 1 *)'{-V,--version}"[show program's version number and exit]" \
"(-c --classify -l --learn= -u --update -U --update-reference -m --move-mails -w --watch)"{-t,--tag}"[run the tag filters]" \ "(-t --tag -m --move-mails)"{-w,--watch}"[continuously monitor the mailbox for new messages matching the given query]" \
"(-c --classify -t --tag -u --update -U --update-reference -m --move-mails -w --watch)"{-l,--learn=}"[train category with the messages matching query]" \ "(-m --move-mails -w --watch)"{-t,--tag}"[run the tag filters]" \
"(-c --classify -l --learn= -t --tag -U --update-reference -m --move-mails -w --watch)"{-u,--update}"[update the categories (requires no query)]" \ "(-w --watch -m --move-mails)"{-m,--move-mails}"[move mail files between maildir folders]" \
"(-c --classify -l --learn= -t --tag -u --update -m --move-mails -w --watch)"{-U,--update-reference}"[update the reference category (takes quite some time) (requires no query)]" \ "(-a --all)"{-a,--all}"[operate on all email]" \
"(-l --learn= -t --tag -u --update -U --update-reference -m --move-mails -w --watch)"{-c,--classify}"[classify each message matching the iven query]" \ "(-n --new)"{-n,--new}"[operate on all new email]" \
"(-c --classify -l --learn= -t --tag -u --update -U --update-reference -w --watch)"{-m,--move-mails}"[move mail files between maildir folders]" \
"(-n --all)"{-a,--all}"[operate on all email]" \
"(-a --new)"{-n,--new}"[operate on all new email]" \
{-C,--notmuch-config=}"[specify path to notmuch configuration file]:files:_files" \ {-C,--notmuch-config=}"[specify path to notmuch configuration file]:files:_files" \
{-e,--enable-filters=}"[specify filter classes to use]:filter" \ {-e,--enable-filters=}"[specify filter classes to use]:filter" \
{-d,--dry-run}"[don't change the DB]" \ {-d,--dry-run}"[don't change the DB]" \
{-R,--reference-set-size=}"[specify size of the reference set]:size [1000]" \ {-R,--reference-set-size=}"[specify size of the reference set]:size [1000]" \
{-T,--reference-set-timeframe-days=}"[don't use emails older than specified age]:age (days) [30]" \ {-T,--reference-set-timeframe-days=}"[don't use emails older than specified age]:age (days) [30]" \
{--verbose,-v}"[be more verbose]" \ {-N,--notmuch-args=}"[arguments for notmuch new(in move mode)]:notmuch arg" \
{-v,--verbose}"[be more verbose]" \
'*: :_guard "^-*" query' '*: :_guard "^-*" query'
# Local Variables: # Local Variables:

45
src/_age Normal file
View File

@ -0,0 +1,45 @@
#compdef age age-keygen
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for age 1.2.1 (https://github.com/FiloSottile/age).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Hydrargyrum (https://github.com/hydrargyrum)
#
# ------------------------------------------------------------------------------
case $service in
(age)
_arguments \
-A '-*' \
'(- *)'{-h,--help}'[show help message and exit]' \
'(-e --encrypt -d --decrypt)'{-e,--encrypt}'[Encrypt the input to the output. Default if omitted]' \
'(-e --encrypt -d --decrypt -a --armor -p --passphrase -r --recipient -R --recipients-file)'{-d,--decrypt}'[Decrypt the input to the output]' \
'(-o --output)'{-o,--output=}'[Write the result to the given file]:OUTPUT:_files' \
'(-a --armor -d --decrypt)'{-a,--armor}'[Encrypt to a PEM encoded format]' \
'(-p --passphrase -d --decrypt)'{-p,--passphrase}'[Encrypt with a passphrase]' \
'(-d --decrypt)'\*{-r,--recipient=}'[Encrypt to the explicitly specified RECIPIENT]:RECIPIENT:' \
'(-d --decrypt)'\*{-R,--recipients-file=}'[Encrypt to the RECIPIENTS listed in the file at PATH]:RECIPIENTS_FILE:_files' \
\*{-i,--identity=}'[Use the given identify file]:IDENTITY:_files' \
:INPUT:_files
;;
(age-keygen)
_arguments \
'(-o --output)'{-o,--output}'[write the result to the given file]:file:_files' \
'-y[convert an identity file to a recipients file]' \
'*:input'
;;
esac
# 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

@ -1,308 +0,0 @@
#compdef android
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for the android command (Revision 12)
# (http://developer.android.com/guide/developing/tools/android.html).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
#
# ------------------------------------------------------------------------------
_android() {
typeset -A opt_args
local context state line curcontext="$curcontext"
local ret=1
_arguments -C -A "-*" \
'(- : *)'{-h,--help}'[get help on a specific command]:command:_android_cmds' \
'(-s --silent -v --verbose)'{-v,--verbose}'[verbose mode: errors, warnings and informational messages are printed]' \
'(-v --verbose -s --silent)'{-s,--silent}'[silent mode: only errors are printed out]' \
'1: :_android_cmds' \
'*::arg:->args' \
&& ret=0
case "$state" in
(args)
curcontext="${curcontext%:*:*}:android-cmd-$words[1]:"
case $words[1] in
(list)
_arguments -C \
'1: :_android_list_entities' \
'*::list-arg:->list-args' \
&& ret=0
case "$state" in
(list-args)
case $words[1] in
(avd|target)
_arguments \
'(-0 --null)'{-0,--null}'[terminate lines with \0 instead of \n (e.g. for xargs -0)]' \
'(-c --compact)'{-c,--compact}'[compact output (suitable for scripts)]' \
&& ret=0
;;
(sdk)
_arguments \
'(-o --obsolete)'{-o,--obsolete}'[install obsolete packages]' \
'--proxy-host[HTTP/HTTPS proxy host (overrides settings if defined)]:proxy host:_hosts' \
'--proxy-port[HTTP/HTTPS proxy port (overrides settings if defined)]:proxy port number' \
'(-s --no-https)'{-s,--no-https}'[use HTTP instead of HTTPS (the default) for downloads]' \
'(-u --no-ui)'{-u,--no-ui}'[display list result on console (no GUI)]' \
&& ret=0
;;
esac
;;
esac
;;
(create)
_arguments -C \
'1: :_android_create_entities' \
'*::create-arg:->create-args' \
&& ret=0
case "$state" in
(create-args)
case $words[1] in
(avd)
_arguments \
'(-c --sdcard)'{-c,--sdcard}'[path to a shared SD card image, or size of a new sdcard for the new AVD]:SD card image or size:_files -g "*.img"' \
'(-n --name)'{-n,--name}'[name of the new AVD]:name' \
'(-a --snapshot)'{-a,--snapshot}'[place a snapshots file in the AVD, to enable persistence]' \
'(-p --path)'{-p,--path}'[directory where the new AVD will be created]: :_files -/' \
'(-f --force)'{-f,--force}'[forces creation (overwrites an existing AVD)]' \
'(-s --skin)'{-s,--skin}'[skin for the new AVD]:skin' \
'(-t --target)'{-t,--target}'[target ID of the new AVD]: :_android_targets' \
&& ret=0
;;
(project)
_arguments \
'(-n --name)'{-n,--name}'[project name]:project name' \
'(-p --path)'{-p,--path}'[the new project'\''s directory]: :_files -/' \
'(-k --package)'{-k,--package}'[Android package name for the application]:package name' \
'(-a --activity)'{-a,--activity}'[name of the default Activity that is created]:activity name' \
'(-t --target)'{-t,--target}'[target ID of the new project]: :_android_targets' \
&& ret=0
;;
(test-project)
_arguments \
'(-n --name)'{-n,--name}'[project name]:project name' \
'(-p --path)'{-p,--path}'[the new project'\''s directory]: :_files -/' \
'(-m --main)'{-m,--main}'[path to directory of the app under test, relative to the test project directory]:path' \
&& ret=0
;;
(lib-project)
_arguments \
'(-n --name)'{-n,--name}'[project name]:project name' \
'(-p --path)'{-p,--path}'[the new project'\''s directory]: :_files -/' \
'(-k --package)'{-k,--package}'[Android package name for the application]:package name' \
'(-t --target)'{-t,--target}'[target ID of the new project]: :_android_targets' \
&& ret=0
;;
esac
;;
esac
;;
(update)
_arguments -C \
'1: :_android_update_entities' \
'*::update-arg:->update-args' \
&& ret=0
case "$state" in
(update-args)
case $words[1] in
(avd)
_arguments \
'(-n --name)'{-n,--name}'[name of the AVD to update]: :_android_avd_names' \
&& ret=0
;;
(project)
_arguments \
'(-l --library)'{-l,--library}'[directory of an Android library to add, relative to this project'\''s directory]: :_files -/' \
'(-p --path)'{-p,--path}'[the project'\''s directory]: :_files -/' \
'(-n --name)'{-n,--name}'[project name]:name' \
'(-t --target)'{-t,--target}'[target ID to set for the project]: :_android_targets' \
'(-s --subprojects)'{-s,--subprojects}'[also updates any projects in sub-folders, such as test projects]' \
&& ret=0
;;
(test-project)
_arguments \
'(-p --path)'{-p,--path}'[the project'\''s directory]: :_files -/' \
'(-m --main)'{-m,--main}'[directory of the app under test, relative to the test project directory]:path' \
&& ret=0
;;
(lib-project)
_arguments \
'(-p --path)'{-p,--path}'[the project'\''s directory]: :_files -/' \
'(-t --target)'{-t,--target}'[target ID to set for the project]: :_android_targets' \
&& ret=0
;;
(sdk)
_arguments \
'(-o --obsolete)'{-o,--obsolete}'[install obsolete packages]' \
'--proxy-host[HTTP/HTTPS proxy host (overrides settings if defined)]:proxy host:_hosts' \
'--proxy-port[HTTP/HTTPS proxy port (overrides settings if defined)]:proxy port number' \
'(-s --no-https)'{-s,--no-https}'[use HTTP instead of HTTPS (the default) for downloads]' \
'(-u --no-ui)'{-u,--no-ui}'[update from command-line (no GUI)]' \
'(-f --force)'{-f,--force}'[force replacement of a package or its parts, even if something has been modified]' \
'(-t --filter)'{-t,--filter}'[a filter that limits the update to the specified types of packages]: :_android_sdk_update_filters -s ,' \
'(-n --dry-mode)'{-n,--dry-mode}'[simulate the update but does not download or install anything]' \
&& ret=0
;;
esac
;;
esac
;;
(move)
_arguments -C \
'1: :_android_move_entities' \
'*::move-arg:->move-args' \
&& ret=0
case "$state" in
(move-args)
case $words[1] in
(avd)
_arguments \
'(-n --name)'{-n,--name}'[name of the AVD to move or rename]: :_android_avd_names' \
'(-p --path)'{-p,--path}'[path to the AVD'\''s new directory]: :_files -/' \
'(-r --rename)'{-r,--rename}'[new name of the AVD]:name' \
&& ret=0
;;
esac
;;
esac
;;
(delete)
_arguments -C \
'1: :_android_delete_entities' \
'*::delete-arg:->delete-args' \
&& ret=0
case "$state" in
(delete-args)
case $words[1] in
(avd)
_arguments \
'(-n --name)'{-n,--name}'[name of the AVD to delete]: :_android_avd_names' \
&& ret=0
;;
esac
;;
esac
;;
(display)
_arguments \
'1: :_android_display_entities' \
&& ret=0
;;
esac
;;
esac
return ret
}
(( $+functions[_android_cmds] )) ||
_android_cmds() {
local commands; commands=(
'list:list existing targets or virtual devices'
'create:create new virtual devices or projects'
'update:update a virtual device, project, SDK or adb'
'move:move a virtual device'
'delete:delete a virtual device'
'avd:displays the AVD Manager window'
'sdk:displays the SDK Manager window'
'display:display manager windows'
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_android_list_entities] )) ||
_android_list_entities() {
local entities; entities=(
'avd:list existing Android Virtual Devices'
'target:list existing targets'
'sdk:list remote SDK repository'
)
_describe -t entities 'entity' entities "$@"
}
(( $+functions[_android_create_entities] )) ||
_android_create_entities() {
local entities; entities=(
'avd:create a new Android Virtual Device'
'project:create a new Android project'
'test-project:create a new Android project for a test package'
'lib-project:create a new Android library project'
)
_describe -t entities 'entity' entities "$@"
}
(( $+functions[_android_update_entities] )) ||
_android_update_entities() {
local entities; entities=(
'avd:update an Android Virtual Device to match the folders of a new SDK'
'project:update an Android project'
'test-project:update the Android project for a test package'
'lib-project:update an Android library project'
'adb:update adb to support the USB devices declared in the SDK add-ons'
'sdk:update the SDK by suggesting new platforms to install if available'
)
_describe -t entities 'entity' entities "$@"
}
(( $+functions[_android_move_entities] )) ||
_android_move_entities() {
local entities; entities=(
'avd:move or rename an Android Virtual Device'
)
_describe -t entities 'entity' commands "$@"
}
(( $+functions[_android_delete_entities] )) ||
_android_delete_entities() {
local entities; entities=(
'avd:delete an Android Virtual Device'
)
_describe -t entities 'entity' entities "$@"
}
(( $+functions[_android_display_entities] )) ||
_android_display_entities() {
local entities; entities=(
'sdk:display the SDK Manager window'
'avd:display the AVD Manager window'
)
_describe -t entities 'entity' entities "$@"
}
(( $+functions[_android_targets] )) ||
_android_targets() {
local targets; targets=(${(f)"$(_call_program targets $service list target --compact)"//:/\\:})
_describe -t targets 'target' targets "$@"
}
(( $+functions[_android_avd_names] )) ||
_android_avd_names() {
local avd_names; avd_names=(${(f)"$(_call_program targets $service list avd --compact)"//:/\\:})
_describe -t avd-names 'AVD name' avd_names "$@"
}
(( $+functions[_android_sdk_update_filters] )) ||
_android_sdk_update_filters() {
local filters; filters=(platform tool platform-tool doc sample extra)
_values $@ 'filter' "${filters[@]}"
}
_android "$@"
# 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

@ -1,6 +1,6 @@
#compdef archlinux-java #compdef archlinux-java
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@ _archlinux-java_command_arguments() {
case $words[1] in case $words[1] in
(set) (set)
local java_versions=("${(@f)$(archlinux-java status | tail -n +2 | tr -s ' ' | cut -d ' ' -f2)}") local java_versions=("${(@f)$(archlinux-java status | tail -n +2 | tr -s ' ' | cut -d ' ' -f2)}")
_describe -t output 'Downloads to delete' java_versions _describe -t output 'Java environments' java_versions
;; ;;
esac esac
} }

View File

@ -1,6 +1,6 @@
#compdef atach #compdef atach
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# #
# Permission is hereby granted, free of charge, to any person obtaining # Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the # a copy of this software and associated documentation files (the
@ -69,3 +69,10 @@ esac
return $ret 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

@ -1,6 +1,6 @@
#compdef composer #compdef augmatch
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,49 +28,39 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for composer (https://getcomposer.org/). # Completion script for augmatch 1.14.1 (https://augeas.net/)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
# ------- # -------
# #
# * Daniel Gomes (me@danielcsgomes.com) # * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
# * Valerii Hiora (https://github.com/vhbit)
# * loranger (https://github.com/loranger)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
local curcontext=$curcontext state line _augmatch_lens() {
declare -A opt_args local lenses=($(augtool --noload 'match /augeas/load/*/lens' | sed -e 's/.*@//'))
_values lenses $lenses
_composer_get_command_list () {
composer --no-ansi | sed "1,/Available commands/d" | awk '/ [a-z]+/ { print $1 }'
} }
_composer_get_required_list () { _arguments \
composer show -s --no-ansi | sed '1,/requires/d' | awk 'NF > 0 && !/^requires \(dev\)/{ print $1 }' '(- *)'{-h,--help}'[show help message]' \
} '(-a --all)'{-a,--all}'[print all tree nodes, even ones without an associated value]' \
'(-e --extract)'{-e,--extract}'[only print the parts of the tree that are matched with --match]' \
\*{-I,--include=}'[add directory to the module loadpath]:dir:_files -/' \
'(-l --lens)'{-l,--lens=}'[use lens for the given file]:lens:_augmatch_lens' \
'(-L --print-lens)'{-L,--print-lens}'[print the name of lens]' \
'(-m --match)'{-m,--match=}'[only print the parts of the tree that match]:expr' \
'(-r --root)'{-r,--root=}'[use directory as the root of the filesystem]:dir:_files -/' \
'(-S --nostdinc)'{-S,--nostdinc}'[do not search any of the default directories for lenses]' \
'(-o --only-value)'{-o,--only-value}'[print only the value and not label or the path of nodes]' \
'(-q --quiet)'{-q,--quiet}'[do not print anything]' \
'*:: :_files'
# Local Variables:
_composer () { # mode: Shell-Script
local curcontext="$curcontext" state line # sh-indentation: 2
typeset -A opt_args # indent-tabs-mode: nil
# sh-basic-offset: 2
_arguments \ # End:
'1: :->command'\ # vim: ft=zsh sw=2 ts=2 et
'*: :->args'
if [ -f composer.json ]; then
case $state in
command)
compadd `_composer_get_command_list`
;;
*)
compadd `_composer_get_required_list`
;;
esac
else
compadd create-project init search selfupdate show
fi
}
compdef _composer composer

View File

@ -1,6 +1,6 @@
#compdef artisan #compdef augparse
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,36 +28,29 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for artisan (http://laravel.com/docs/artisan). # Completion script for augparse 1.14.1 (https://augeas.net/)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
# ------- # -------
# #
# * loranger (https://github.com/loranger) # * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
# * Yohan Tambè (https://github.com/Cronos87)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'(- *)--version[print version information and exit]' \
\*{-I,--include=}'[add directory to the module loadpath]:dir:_files -/' \
'(-t --trace)'{-t,--trace}'[print a trace of modules that are being loaded]' \
'--nostdinc[do not search any of the default directories for modules]' \
'--notypecheck[do not perform lens type checks]' \
'*:: :_files'
_artisan_get_command_list () { # Local Variables:
IFS=" " # mode: Shell-Script
php artisan --no-ansi | \ # sh-indentation: 2
sed "1,/Available commands/d" | \ # indent-tabs-mode: nil
awk '/ [a-z]+/ { print $1 }' | \ # sh-basic-offset: 2
sed -E 's/^[ ]+//g' | \ # End:
sed -E 's/[:]+/\\:/g' | \ # vim: ft=zsh sw=2 ts=2 et
sed -E 's/[ ]{2,}/\:/g'
}
_artisan () {
if [ -f artisan ]; then
local -a commands
IFS=$'\n'
commands=(`_artisan_get_command_list`)
_describe 'commands' commands
fi
}
compdef _artisan php artisan
compdef _artisan artisan

View File

@ -1,6 +1,6 @@
#compdef homestead #compdef augprint
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,26 +28,34 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for homestead (http://laravel.com/docs/homestead). # Completion script for augprint 1.14.1 (https://augeas.net/)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
# ------- # -------
# #
# * loranger (https://github.com/loranger) # * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_augprint_lens() {
_homestead_get_command_list () { local lenses=($(augtool --noload 'match /augeas/load/*/lens' | sed -e 's/.*@//'))
homestead --no-ansi | sed "1,/Available commands/d" | awk '/ [a-z]+/ { print $1 }' _values lenses $lenses
} }
_homestead () { _arguments \
if [ -f homestead ]; then '(- *)'{-h,--help}'[show help message]' \
compadd `_homestead_get_command_list` '(-v --verbose)'{-v,--verbose}'[include the original numbered paths as comments in the output]' \
fi '(-r --regexp)'{-r-,--regexp=-}'[generate regular expressions to match values]:num' \
} '(-l --lens)'{-l,--lens=}'[use lens for the given file]:lens:_augprint_lens' \
'(-t --target)'{-t,--target=}'[generate the script as if its path was really targetfile]:file:_files' \
'(-s --noseq)'{-s,--noseq}'[do not use "seq::*" in the output]' \
'*:: :_files'
compdef _homestead php homestead # Local Variables:
compdef _homestead homestead # mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

197
src/_avdmanager Normal file
View File

@ -0,0 +1,197 @@
#compdef avdmanager
# ------------------------------------------------------------------------------
# Copyright (c) 2023 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 avdmanager(https://developer.android.com/studio/command-line/avdmanager)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_avdmanager() {
typeset -A opt_args
local context state line
local curcontext="$curcontext"
local ret=1
_arguments -C -A "-*" \
'(- *)'{-h,--help}'[Print help message]' \
'(-s --silent)'{-s,--silent}'[Silent mode, shows error only]' \
'(-v --verbose)'{-v,--verbose}'[Verbose mode, shows errors, warnings and all messages]' \
'--clear-cache[Clear the SDK Manager repository manifest cache]' \
'1: :_avdmanager_subcommands' \
'*::arg:->args' \
&& ret=0
case "$state" in
(args)
if (( $+functions[_avdmanager_${words[1]}] )); then
_avdmanager_${words[1]} && ret=0
else
ret=0
fi
;;
esac
return ret
}
(( $+functions[_avdmanager_list] )) ||
_avdmanager_list() {
local ret=1
_arguments -C \
'1: :(avd target device)' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
case $words[1] in
(avd|target|device)
_arguments \
'(-0 --null)'{-0,--null}'[Terminate lines with \0 instead of \n]' \
'(-c --compact)'{-c,--compact}'[Compact output]' \
&& ret=0
;;
esac
;;
esac
return $ret
}
(( $+functions[_avdmanager_create] )) ||
_avdmanager_create() {
local ret=1
_arguments -C \
'1: :(avd)' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
case $words[1] in
(avd)
_arguments \
'(-c --sdcard)'{-c,--sdcard}'[Path to a shared SD card image]: :_files' \
'(-g --tag)'{-g,--tag}'[The sys-img tag to use for the AVD]:tag' \
'(-p --path)'{-p,--path}'[Directory where the new AVD will be created]' \
'(-k --package)'{-k,--package}'[Package path of the system image for this AVD]:package' \
'(-n --name)'{-n,--name}'[Name of the new AVD]:name' \
'--skin[The optional name of a skin to use with this device]' \
'(-f --force)'{-f,--force}'[Forces creation]' \
'(-b --abi)'{-b,--abi}'[The ABI to use for the AVD]:abi' \
'(-d --device)'{-d,--device}'[The optional device definition to use]' \
&& ret=0
;;
esac
;;
esac
return $ret
}
(( $+functions[_avdmanager_move] )) ||
_avdmanager_move() {
local ret=1
_arguments -C \
'1: :(avd)' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
case $words[1] in
(avd)
_arguments \
'(-p --path)'{-p,--path}"[Path to the AVD's new directory]: :_files -/" \
'(-n --name)'{-n,--name}'[Name of the AVD to delete]: :_avdmanager_avds' \
'(-r --rename)'{-r,--rename}'[New name of the AVD]' \
&& ret=0
;;
esac
;;
esac
return $ret
}
(( $+functions[_avdmanager_delete] )) ||
_avdmanager_delete() {
local ret=1
_arguments -C \
'1: :(avd)' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
case $words[1] in
(avd)
_arguments \
'(-n --name)'{-n,--name}'[Name of the AVD to delete]: :_avdmanager_avds' \
&& ret=0
;;
esac
;;
esac
return $ret
}
(( $+functions[_avdmanager_subcommands] )) ||
_avdmanager_subcommands() {
local -a commands=(
"list:Lists existing targets or virtual devices"
"create:Creates a new Android Virtual Device"
"move:Moves or renames an Android Virtual Device"
"delete:Deletes an Android Virtual Device"
)
_describe -t commands 'subcommand' commands
}
(( $+functions[_avdmanager_avds] )) ||
_avdmanager_avds() {
local -a avds=(${(@f)"$(avdmanager list avd -c)"})
_values 'android virtual devices' $avds
}
_avdmanager "$@"
# 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

318
src/_bento4 Normal file
View File

@ -0,0 +1,318 @@
#compdef aac2mp4 mp42aac mp42avc mp42hevc mp42hls mp42ts mp4compact mp4dash mp4dashclone mp4dcfpackager mp4decrypt mp4dump mp4edit mp4encrypt mp4extract mp4fragment mp4hls mp4iframeindex mp4info mp4mux mp4rtphintinfo mp4split mp4tag
# ------------------------------------------------------------------------------
# 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 bento4 tools 1.6.0-641 (https://github.com/axiomatic-systems/Bento4)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
local -a encrypt_methods=(
OMA-PDCF-CBC OMA-PDCF-CTR MARLIN-IPMP-ACBC MARLIN-IPMP-ACGK ISMA-IAEC PIFF-CBC
PIFF-CTR MPEG-CENC MPEG-CBC1 MPEG-CENS MPEG-CBCS
)
local -a options=()
case $service in
(mp42aac|mp42avc|mp42hevc)
options+=('--key[128-bit decryption key (in hex: 32 chars)]:key')
;;
(mp42hls)
options+=(
'--verbose[enable verbose mode]'
'--show-info[show information]'
'--hls-version[HLS version(default: 3)]:version'
'--pmt-pid[PID to use for the PMT(default: 0x100)]:pid'
'--audio-pid[PID to use for audio packets(default: 0x101)]:pid'
'--video-pid[PID to use for video packets(default: 0x102)]:pid'
'--audio-track-id[Read audio from the given track ID(0 means no audio)]:track_id'
'--video-track-id[Read video from the given track ID(0 means no video)]:track_id'
'--audio-format[Format to use for audio-only segments(default: ts)]:format:(ts packed)'
'--segment-duration[Target segment duration in seconds(default: 6)]:seconds'
'--segment-duration-threshold[Segment duration threshold in milliseconds(default: 15)]:seconds'
'--pcr-offset[offset in units of 90kHz(default: 1000)]:offset'
'--index-filename[File name to use for the playlist/index(default: stream.m3u8)]:name:_files'
'--allow-cache[set #EXT-X-ALLOW_CACHE to YES or NO]: :(YES NO)'
'--segment-filename-template[File name pattern to use for the segment(default: segment-%d.<ext> or stream.<ext>)]:pattern'
'--segment-url-template[URL pattern to use for segments(default: segment-%d.<ext> or stream.<ext>)]:pattern'
'--iframe-index-filename[File name to use for the I-Frame playlist(default: iframes.m3u8)]:file:_files'
'--output-single-file[Output all the media in a single file instead of separate segment files]'
'--encryption-mode[Encryption mode(default: AES-128)]:mode:(AES-128 SAMPLE-AES)'
'--encryption-key[Encryption key in hexadecimal(default: no encryption)]:key'
'--encryption-iv-mode[Encryption IV mode(default: separate)]:mode:(sequence random fps)'
'--encryption-key-uri[Encryption key URI, relative or absolute URI(default: key.bin)]:uri'
'--encryption-key-format[Encryption key format(default: identity)]:format'
'--encryption-key-format-versions[Encryption key format versions]:versions'
'--encryption-key-line[Preformatted encryption key line]:ext_x_key_line'
)
;;
(mp42ts)
options+=(
'--pmt-pid[PID to use for the PMT(default: 0x100)]:pid'
'--audio-pid[PID to use for audio packets(default: 0x101)]:pid'
'--video-pid[PID to use for video packets(default: 0x102)]:pid'
'--segment[Segment duration in seconds]:seconds'
'--segment-duration-threshold[Segment duration threshold in milliseconds(default: 50)]:seconds'
'--pcr-offset[offset in units of 90kHz(default: 1000)]:offset'
'--verbose[enable verbose mode]'
'--playlist[Playlist file name]:file:_files'
'--playlist-hls-version[HLS version(default: 3)]:version'
)
;;
(mp4compact)
options+=('--verbose[Enable verbose mode]')
;;
(mp4dash)
options+=(
'(- *)'{-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 -/'
'(-f --force)'{-f,--force}'[Allow output to an existing directory]'
'--mpd-name=[MPD file name]:file:_files'
'--profiles=[Comma-separated list of one or more profile(s)]:profiles'
'--no-media[Do not output media files (MPD/Manifests only)]'
'--rename-media[Use a file name pattern instead of the base name of input files]'
'--media-prefix=[Use this prefix for prefixed media file names(default: media)]:prefix'
'--init-segment=[Initialization segment name]:file:_files'
'--no-split[Do not split the file into individual segment files]'
'--use-segment-list[Use segment lists instead of segment templates]'
'--use-segment-template-number-padding[Use padded numbers in segment URL/filename templates]'
'--use-segment-timeline[Use segment timelines]'
'--min-buffer-time=[Minimum buffer time in seconds]:seconds'
'--max-playout-rate=[Max Playout Rate setting strategy for trick-play support]:strategy:(lowest:X)'
'--language-map=[Remap language code <lang_from> to <lang_to>]:from_to_list'
'--always-output-lang[Always output an @lang attribute for audio tracks]'
'--subtitles[Enable Subtitles]'
*'--attributes=[Specify the attributes of a set of tracks]:attribute'
'--smooth[Produce an output compatible with Smooth Streaming]'
'--smooth-client-manifest-name=[Smooth Streaming Client Manifest file name]:file:_files'
'--smooth-server-manifest-name=[Smooth Streaming Server Manifest file name]:file:_files'
'--smooth-h264-fourcc=[Smooth Streaming FourCC value for H.264 video(default H264)]:fourcc'
'--hls[Output HLS playlists in addition to MPEG DASH]'
'--hls-key-url=[HLS key URL (default: key.bin)]:url'
'--hls-master-playlist-name=[HLS master playlist name (default: master.m3u8)]:file:_files'
'--hls-media-playlist-name=[HLS media playlist name (default: media.m3u8)]:file:_files'
'--hls-iframes-playlist-name=[HLS I-Frames playlist name (default: iframes.m3u8)]'
'--hippo[Produce an output compatible with the Hippo Media Server]'
'--hippo-server-manifest-name=[Hippo Media Server Manifest file name]:file:_files'
'--use-compat-namespace[Use the original DASH MPD namespace]'
'--use-legacy-audio-channel-config-uri[Use the legacy DASH namespace URI]'
'--encryption-key=[Encryption key specifications]:key_spec'
'--encryption-cenc-scheme=[MPEG Common Encryption scheme(default: cenc)]:scheme:(cenc cbc1 cens cbcs)'
'--encryption-args=[Pass additional command line arguments to mp4encrypt]:args'
'--eme-signaling=[Add EME-compliant signaling in the MPD and PSSH boxes]:type:(pssh-v0 pssh-v1)'
'--merge-keys[Merge all keys in a single set used for all ContentProtection elements]'
'--marlin[Add Marlin signaling to the MPD]'
'--marlin-add-pssh[Add an (optional) Marlin "pssh" box in the init segment(s)]'
'--playready[Add PlayReady signaling to the MPD]'
'--playready-version=[PlayReady version to use]:version:(4.0 4.1 4.2 4.3)'
'--playready-header=[Add a PlayReady PRO element in the MPD and a PlayReady PSSH box in the init segments]:header'
'--playready-no-pssh[Do not store the PlayReady header in a "pssh" box in the init segment(s)]'
'--widevine[Add Widevine signaling to the MPD]'
'--widevine-header=[Add a Widevine entry in the MPD, and a Widevine PSSH box in the init segments]:header'
'--primetime[Add Primetime signaling to the MPD]'
'--primetime-metadata=[Add Primetime metadata in a PSSH box in the init segments]:metadata'
'--fairplay-key-uri=[Specify the key URI to use for FairPlay Streaming key delivery]:uri'
'--clearkey[Add Clear Key signaling to the MPD]'
'--clearkey-license-uri=[Specify the license/key URI to use for Clear Key]'
'--exec-dir=[Directory where the Bento4 executables are located]:dir:_files -/'
)
;;
(mp4dashclone)
options+=(
'(- *)'{-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 -/'
)
;;
(mp4dcfpackager)
options+=(
'--method[method name]:method:(NULL CBC CTR)'
'--content-type[Content MIME type]:mime_type'
'--content-id[Content ID]:id'
'--rights-issuer[rights issuer URL]:url'
'--key[Specify the key to use for encryption]:key'
*'--textual-header[Specify a textual header]:header'
)
;;
(mp4decrypt)
options+=(
'--show-progress[Show progress details]'
'--key[Specify the key to use for decryption]:key'
'--fragments-info[File to decrypt the fragments read from]:file:_files'
)
;;
(mp4dump)
options+=(
'--verbosity[Set the verbosity level]:level:(0 1 2 3)'
'--track[Write the track data into a file]:file:_files'
'--format[Format to use for the output(default: text)]:format:(text json)'
)
;;
(mp4edit)
options+=(
'--insert[insert atom data]:atom_path_and_source_and_position'
'--remove[remove atom data]:atom_path'
'--replace[replace atom data]:atom_path_and_source'
)
;;
(mp4encrypt)
options+=(
'--method=[Encryption method]:method:($encrypt_methods)'
'--show-progress[Show progress details]'
'--fragments-info[Encrypt the fragments read from <input> with track info read from the given file]:file:_files'
'--multi[Encrypt multiple individual fragment files]'
'--key[Specify the key to use for a track (or group key)]:key_spec'
'--strict[Fail if there is a warning]'
*'--property[Specify a named string property for a track]:property'
'--global-option[Set the global option]:option'
'--pssh[Add a "pssh" atom for this system ID with the payload]:pssh'
'--pssh-v1[Same as --pssh but generates a version=1 "pssh" atom]:pssh'
'--kms-uri[Specify the KMS URI for the ISMA-IAEC method]:uri'
)
;;
(mp4extract)
options+=(
'--payload-only[Omit the atom header]'
)
;;
(mp4fragment)
options+=(
'--verbosity[Set the verbosity level]:level:(0 1 2 3)'
'--debug[Enable debugging information output]'
'--quiet[Do not print out notice messages]'
'--fragment-duration[Fragment duration in milliseconds(default: automatic)]:msecs'
'--timescale[Time scale]:time_scale'
'--track[Specify track ID or type only include media from one track]:id_or_type:(audio video subtitles)'
'--index[(Re)create the segment index]'
'--trim[Trim excess media in longer tracks]'
'--no-tfdt[Do not add "tfdt boxes in the fragments"]'
'--tfdt-start[Set start value of the first tfdt timestamp]:start'
'--sequence-number-start[Set start value of the first segment sequence number(default: 1)]:number'
'--force-i-frame-sync[Treat all I-frames as sync samples]:type:(auto all)'
'--copy-udta[Copy the moov/udta atom from input to output]'
'--no-zero-elst[Do not set the last edit list entry to 0 duration]'
'--trun-version-zero[Set the "trun" box version to zero(default version: 1)]'
)
;;
(mp4hls)
options+=(
'(- *)'{-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 -/'
'(-f --force)'{-f,--force}'[Allow output to an existing directory]'
'--hls-version=[HLS version]:version'
'--master-playlist-name=[Master Playlist name]:file:_files'
'--media-playlist-name=[Media Playlist name]:file:_files'
'--iframe-playlist-name=[I-frame Playlist name]:name'
'--output-single-file[Store segment data in a single output file per input file]'
'--audio-format=[Format for audio segments]:format:(packed ts)'
'--segment-duration=[Segment duration(default: 6)]:duration'
'--encryption-mode=[Encryption mode(default: AES-128)]:mode:(AES-128 SAMPLE-AES)'
'--encryption-key=[Encryption key in hexadecimal]:key'
'--encryption-iv-mode=[Encryption IV mode]:mode:(sequence random fps)'
'--encryption-key-uri=[Encryption key URI(default: key.bin)]:uri'
'--encryption-key-format=[Encryption key format (default: identity)]:mode:(identity)'
'--encryption-key-format-versions=[Encryption key format versions]:versions'
'--signal-session-key[Signal an #EXT-X-SESSION-KEY tag in the master playlist]'
'--fairplay=[Enable FairPlay Key Delivery and set parameters]:parameters'
'--widevine=[Enable Widevine Key Delivery and set parameters]:parameters'
'--output-encryption-key[Output the encryption key to a file]'
'--exec-dir=[Directory where the Bento4 executables are located]:dir:_files -/'
'--base-url=[The base URL for the Media Playlists and TS files listed in the playlists]:uri'
)
;;
(mp4iframeindex)
options+=(
'--track[ID of the video track]:id'
)
;;
(mp4info)
options+=(
'--verbose[Show extended information when available]'
'--format[Display the information in this format(default: text)]:format:(text json)'
'--show-layout[Show sample layout]'
'--show-samples[Show sample details]'
'--show-sample-data[Show sample data]'
'--fast[Skip some details that are slow to compute]'
)
;;
(mp4mux)
options+=(
*'--track=[Track type, input, parameters]:track'
'--verbose[Show more details]'
)
;;
(mp4rtphintinfo)
options+=(
'--trackid[Hint track ID]:id'
)
;;
(mp4split)
options+=(
'--verbose[Print verbose information when running]'
'--init-segment[Name of init segment(default: init.mp4)]:file:_files'
'--init-only[Only output the init segment(no media segments)]'
'--media-segment[Segment file name pattern(default: segment-%llu.%04llu.m4s)]:pattern'
'--start-number[Start numbering segments at n(default=1)]:number'
'--pattern-parameters[One or more selector letter(default: IN)]:params'
'--track-id[Only output segments with this track ID]:id'
'--audio[Only output audio segments]'
'--video[Only output video segments]'
)
;;
(mp4tag)
options+=(
'--help[Print this usage information]'
'--show-tags[Show tags found in the input file]'
'--list-symbols[List all the builtin symbols]'
'--list-keys[List all the builtin symbolic key names]'
'--set[Set a tag]:tag'
'--add[Set/Add a tag]:tag'
'--remove[Remove a tag]:key'
'--extract[extract the value of a tag and save it to a file]:key_file'
)
;;
esac
_arguments \
"${options[@]}" \
"*::file:_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

@ -1,6 +1,6 @@
#compdef bitcoin-cli #compdef bitcoin-cli
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2017 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,171 +28,196 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for bitcoin-cli (https://bitcoin.org). # Completion script for bitcoin-cli v29.0.0 (https://bitcoin.org).
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
# ------- # -------
# #
# * Ian Ker-Seymer (https://github.com/ianks) # * Ian Ker-Seymer (https://github.com/ianks)
# # * notmike (https://github.com/notmike-5)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_bitcoin-cli() { _bitcoin-cli() {
local context state line curcontext="$curcontext" local context state line curcontext="$curcontext"
local ret=1
_arguments -C \ _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)' \
-conf='[Specify configuration file. Relative paths will be prefixed by datadir location. (default: bitcoin.conf)]:PATH:_files' \ -conf='[Specify configuration file. Relative paths will be prefixed by datadir location. (default: bitcoin.conf)]:PATH:_files' \
-datadir='[Specify data directory]:PATH:_directories' \ -datadir='[Specify data directory]:PATH:_directories' \
-getinfo='[Get general information from the remote server.]' \ -getinfo'[Get general information from the remote server]' \
-testnet'[Use the test chain]' \ -testnet'[Use the test chain]' \
-regtest'[Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.]' \ -regtest'[Enter regression test mode]' \
-named'[Pass named instead of positional arguments (default: false)]' \ -named'[Pass named instead of positional arguments (default: false)]' \
-stdin'[Read extra arguments from standard input, one per line until EOF/Ctrl-D (recommended for sensitive information such as passphrases)]' \ -netinfo=-'[Get network peer connection information from the remote server.]::level_or_help:(0 1 2 3 4 help)' \
-stdin'[Read extra arguments from standard input, one per line until EOF/Ctrl-D]' \
-rpcport='[Connect to JSON-RPC on <port> (default: 8332, testnet: 18332, regtest: 18443)]: :_guard "[[\:digit\:]]#" "PORT"' \ -rpcport='[Connect to JSON-RPC on <port> (default: 8332, testnet: 18332, regtest: 18443)]: :_guard "[[\:digit\:]]#" "PORT"' \
-rpcwait'[Wait for RPC server to start]' \ -rpcwait'[Wait for RPC server to start]' \
-rpcwaittimeout='[Timeout in seconds to wait for the RPC server to start, or 0 for no timeout. (default: 0)]:timeout' \
-rpcuser='[Username for JSON-RPC connections]:RPCUSER:()' \ -rpcuser='[Username for JSON-RPC connections]:RPCUSER:()' \
-rpcpassword='[Password for JSON-RPC connections]:RPCPASSWORD:()' \ -rpcpassword='[Password for JSON-RPC connections]:RPCPASSWORD:()' \
-rpccookiefile='[Location of the auth cookie(default: data dir)]:dir:_files' \
-rpcwallet='[Send RPC for non-default wallet on RPC server]:server' \
-rpcconnect='[Send commands to node running on <ip> (default: 127.0.0.1)]:RPCCONNECT:_hosts' \ -rpcconnect='[Send commands to node running on <ip> (default: 127.0.0.1)]:RPCCONNECT:_hosts' \
-rpcclienttimeout='[Timeout during HTTP requests, or 0 for no timeout. (default: 900)]: :_guard "[[\:digit\:]]#" "RPCCLIENTTIMEOUT"' \ -rpcclienttimeout='[Timeout during HTTP requests, or 0 for no timeout. (default: 900)]: :_guard "[[\:digit\:]]#" "RPCCLIENTTIMEOUT"' \
-version'[Print version and exit]' \
':subcommand:->subcommand' && ret=0 ':subcommand:->subcommand' && ret=0
case $state in case $state in
subcommand) subcommand)
subcommands=( subcommands=(
'getbestblockhash' 'dumptxoutset'
'getblock' 'getbestblockhash'
'getblockchaininfo' 'getblock'
'getblockcount' 'getblockchaininfo'
'getblockfilter' 'getblockcount'
'getblockhash' 'getblockfilter'
'getblockheader' 'getblockfrompeer'
'getblockstats' 'getblockhash'
'getchaintips' 'getblockheader'
'getchaintxstats' 'getblockstats'
'getdifficulty' 'getchainstates'
'getmempoolancestors' 'getchaintips'
'getmempooldescendants' 'getchaintxstats'
'getmempoolentry' 'getdeploymentinfo'
'getmempoolinfo' 'getdifficulty'
'getrawmempool' 'getmempoolancestors'
'gettxout' 'getmempooldescendants'
'gettxoutproof' 'getmempoolentry'
'gettxoutsetinfo' 'getmempoolinfo'
'preciousblock' 'getrawmempool'
'pruneblockchain' 'gettxout'
'savemempool' 'gettxoutproof'
'scantxoutset' 'gettxoutsetinfo'
'verifychain' 'gettxspendingprevout'
'verifytxoutproof' 'importmempool'
'getmemoryinfo' 'loadtxoutset'
'getrpcinfo' 'preciousblock'
'help' 'pruneblockchain'
'logging' 'savemempool'
'stop' 'scanblocks'
'uptime' 'scantxoutset'
'generatetoaddress' 'verifychain'
'getblocktemplate' 'verifytxoutproof'
'getmininginfo' 'getmemoryinfo'
'getnetworkhashps' 'getrpcinfo'
'prioritisetransaction' 'help'
'submitblock' 'logging'
'submitheader' 'stop'
'addnode' 'uptime'
'clearbanned' 'getblocktemplate'
'disconnectnode' 'getmininginfo'
'getaddednodeinfo' 'getnetworkhashps'
'getconnectioncount' 'getprioritisedtransactions'
'getnettotals' 'prioritisetransaction'
'getnetworkinfo' 'submitblock'
'getnodeaddresses' 'submitheader'
'getpeerinfo' 'addnode'
'listbanned' 'clearbanned'
'ping' 'disconnectnode'
'setban' 'getaddednodeinfo'
'setnetworkactive' 'getaddrmaninfo'
'analyzepsbt' 'getconnectioncount'
'combinepsbt' 'getnettotals'
'combinerawtransaction' 'getnetworkinfo'
'converttopsbt' 'getnodeaddresses'
'createpsbt' 'getpeerinfo'
'createrawtransaction' 'listbanned'
'decodepsbt' 'ping'
'decoderawtransaction' 'setban'
'decodescript' 'setnetworkactive'
'finalizepsbt' 'analyzepsbt'
'fundrawtransaction' 'combinepsbt'
'getrawtransaction' 'combinerawtransaction'
'joinpsbts' 'converttopsbt'
'sendrawtransaction' 'createpsbt'
'signrawtransactionwithkey' 'createrawtransaction'
'testmempoolaccept' 'decodepsbt'
'utxoupdatepsbt' 'decoderawtransaction'
'createmultisig' 'decodescript'
'deriveaddresses' 'descriptorprocesspsbt'
'estimatesmartfee' 'finalizepsbt'
'getdescriptorinfo' 'fundrawtransaction'
'signmessagewithprivkey' 'getrawtransaction'
'validateaddress' 'joinpsbts'
'verifymessage' 'sendrawtransaction'
'abandontransaction' 'signrawtransactionwithkey'
'abortrescan' 'submitpackage'
'addmultisigaddress' 'testmempoolaccept'
'backupwallet' 'utxoupdatepsbt'
'bumpfee' 'enumeratesigners'
'createwallet' 'createmultisig'
'dumpprivkey' 'deriveaddresses'
'dumpwallet' 'estimatesmartfee'
'encryptwallet' 'getdescriptorinfo'
'getaddressesbylabel' 'getindexinfo'
'getaddressinfo' 'signmessagewithprivkey'
'getbalance' 'validateaddress'
'getbalances' 'verifymessage'
'getnewaddress' 'abandontransaction'
'getrawchangeaddress' 'abortrescan'
'getreceivedbyaddress' 'backupwallet'
'getreceivedbylabel' 'bumpfee'
'gettransaction' 'createwallet'
'getunconfirmedbalance' 'createwalletdescriptor'
'getwalletinfo' 'encryptwallet'
'importaddress' 'getaddressesbylabel'
'importmulti' 'getaddressinfo'
'importprivkey' 'getbalance'
'importprunedfunds' 'getbalances'
'importpubkey' 'gethdkeys'
'importwallet' 'getnewaddress'
'keypoolrefill' 'getrawchangeaddress'
'listaddressgroupings' 'getreceivedbyaddress'
'listlabels' 'getreceivedbylabel'
'listlockunspent' 'gettransaction'
'listreceivedbyaddress' 'getunconfirmedbalance'
'listreceivedbylabel' 'getwalletinfo'
'listsinceblock' 'importdescriptors'
'listtransactions' 'importprunedfunds'
'listunspent' 'keypoolrefill'
'listwalletdir' 'listaddressgroupings'
'listwallets' 'listdescriptors'
'loadwallet' 'listlabels'
'lockunspent' 'listlockunspent'
'removeprunedfunds' 'listreceivedbyaddress'
'rescanblockchain' 'listreceivedbylabel'
'sendmany' 'listsinceblock'
'sendtoaddress' 'listtransactions'
'sethdseed' 'listunspent'
'setlabel' 'listwalletdir'
'settxfee' 'listwallets'
'setwalletflag' 'loadwallet'
'signmessage' 'lockunspent'
'signrawtransactionwithwallet' 'migratewallet'
'unloadwallet' 'psbtbumpfee'
'walletcreatefundedpsbt' 'removeprunedfunds'
'walletlock' 'rescanblockchain'
'walletpassphrase' 'restorewallet'
'walletpassphrasechange' 'send'
'walletprocesspsbt' 'sendall'
'getzmqnotifications' 'sendmany'
) 'sendtoaddress'
'setlabel'
'settxfee'
'setwalletflag'
'signmessage'
'signrawtransactionwithwallet'
'simulaterawtransaction'
'unloadwallet'
'upgradewallet'
'walletcreatefundedpsbt'
'walletdisplayaddress'
'walletlock'
'walletpassphrase'
'walletpassphrasechange'
'walletprocesspsbt'
'getzmqnotifications'
)
_describe -t subcommands 'bitcoin-cli subcommands' subcommands && ret=0 _describe -t subcommands 'bitcoin-cli subcommands' subcommands && ret=0
esac esac

68
src/_blkid Normal file
View File

@ -0,0 +1,68 @@
#compdef blkid
# ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Description
# -----------
#
# Completion for blkid, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# - locate/print block device attributes
# https://man7.org/linux/man-pages/man8/blkid.8.html
# ------------------------------------------------------------------------------
# Authors
# -------
# * Aditi Sharma (https://github.com/Aditi76117)
# ------------------------------------------------------------------------------
_arguments \
'(-c --cache-file)'{-c+,--cache-file}'[Read from cachefile instead of reading from the default cache file]:cache file:_files' \
'(-d --no-encoding)'{-d,--no-encoding}"[Don't encode non-printing characters]" \
'(-D --no-part-details)'{-D,--no-part-details}"[Don't print information from partition table in low-level probing mode]" \
'(-g --garbage-collect)'{-g,--garbage-collect}'[Perform a garbage collection on the blkid cache]' \
'(-H --hint)'{-H,--hint}'[Set probing hint]:setting' \
'(-i --info)'{-i,--info}'[Display information about I/O limits]' \
'(-k --list-filesystems)'{-k,--list-filesystems}'[List all known filesystems and RAIDS and exits]' \
'(-l --list-one)'{-l,--list-one}'[Look up only one device that matches with the --match-token option]' \
'(-L --label)'{-L+,--label}'[Look up the device that uses this filesystem label]:label' \
'(-n --match-types)'{-n+,--match-types}'[Restrict the probing functions to the specified comma-separated list of superblock types]:list' \
'(-o --output)'{-o+,--output}'[Use the specified output format]:format:(full value list device udev export)' \
'(-O --offset)'{-O+,--offset}'[Probe at the given offset]:offset' \
'(-p --probe)'{-p,--probe}'[Switch to low-level superblock probing mode]' \
'(-s --match-tag)'{-s+,--match-tag}'[Show only the tags that match tag]:tag' \
'(-S --size)'{-S,--size}'[Override the size of device/file]' \
'(-t --match-token)'{-t+,--match-token}'[Search for block devices with tokens named NAME that have the VALUE]:name' \
'(-u --usages)'{-u,--usages}'[Restrict the probing functions to the specified comma-separated list of usage types]:list' \
'(-U --uuid)'{-U,--uuid}'[Look up the device that uses this filesystem uuid]:uuid' \
'(- *)'{-h,--help}'[Display help text and exit]' \
'(- *)'{-V,--version}'[Print version and exit]' \
'*:device:_files -W /dev'
# 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

@ -1,6 +1,6 @@
#compdef bower #compdef bower
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for Bower (http://bower.io). # Completion script for Bower (https://bower.io).
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -43,6 +43,15 @@ local curcontext="$curcontext" state line _opts ret=1
_arguments -C \ _arguments -C \
'(- 1 *)'{-v,--version}'[display version information]' \ '(- 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' \ '1: :->cmds' \
'*:: :->args' && ret=0 '*:: :->args' && ret=0
@ -66,17 +75,6 @@ case $state in
"uninstall[remove a local package]" \ "uninstall[remove a local package]" \
"unregister[remove a package from the registry]" \ "unregister[remove a package from the registry]" \
"version[bump a package version]" && ret=0 "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) args)
case $line[1] in case $line[1] in
@ -101,42 +99,42 @@ case $state in
;; ;;
(home|info|init|link|lookup|prune|register|search|unregister) (home|info|init|link|lookup|prune|register|search|unregister)
_arguments \ _arguments \
'(--help)--help[show help message]' && ret=0 '--help[show help message]' && ret=0
;; ;;
install) install)
_arguments \ _arguments \
'(--force-latest)--force-latest[force latest version on conflict]' \ '--force-latest[force latest version on conflict]' \
'(--help)--help[show help message]' \ '--help[show help message]' \
"(--production)--production[don't install project devDependencies]" \ "--production[don't install project devDependencies]" \
"(--save)--save[save installed packages into the project's bower.json dependencies]" \ "--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 "--save-dev[save installed packages into the project's bower.json devDependencies]" && ret=0
;; ;;
list) list)
_arguments \ _arguments \
'(--help)--help[show help message]' \ '--help[show help message]' \
'(--paths)--paths[generate a simple JSON source mapping]' \ '--paths[generate a simple JSON source mapping]' \
'(--relative)--relative[make paths relative to the directory config property, which defaults to bower_components]' && ret=0 '--relative[make paths relative to the directory config property, which defaults to bower_components]' && ret=0
;; ;;
login) login)
_arguments \ _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 '(-t --token)'{-t,--token}'[Pass GitHub auth token (will not prompt for username/password)]' && ret=0
;; ;;
uninstall) uninstall)
_arguments \ _arguments \
'(--help)--help[show help message]' \ '--help[show help message]' \
"(--save)--save[save installed packages into the project's bower.json dependencies]" \ "--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 "--save-dev[save installed packages into the project's bower.json devDependencies]" && ret=0
;; ;;
update) update)
_arguments \ _arguments \
'(--force-latest)--force-latest[force latest version on conflict]' \ '--force-latest[force latest version on conflict]' \
'(--help)--help[show help message]' \ '--help[show help message]' \
"(--production)--production[don't install project devDependencies]" && ret=0 "--production[don't install project devDependencies]" && ret=0
;; ;;
version) version)
_arguments \ _arguments \
'(--message)--message[custom git commit and tag message]' && ret=0 '--message[custom git commit and tag message]' && ret=0
;; ;;
exec) exec)
_normal && ret=0 _normal && ret=0

View File

@ -1,6 +1,6 @@
#compdef bundle #compdef bundle
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,97 +28,451 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for Bundler (http://gembundler.com). # Completion script for Bundler 4.0.0 (https://bundler.io/).
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
# ------- # -------
# #
# * Bruno Michel (https://github.com/nono) # * Bruno Michel (https://github.com/nono)
# * Shohei Yoshida (https://github.com/syohex)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_bundle() {
typeset -A opt_args
local context state line
local curcontext="$curcontext"
local curcontext="$curcontext" state line _gems _opts ret=1 local ret=1
_arguments -C -A "-v" -A "--version" \ _arguments -C \
'(- 1 *)'{-v,--version}'[display version information]' \ '(- 1 *)'{-v,--version}'[display version information]' \
'1: :->cmds' \ '(-r --retry)'{-r,--retry}'[specify the number of times you with to attempt network commands]:number:' \
'*:: :->args' && ret=0 '(-V --verbose)'{-V,--verbose}'[print out additional logging information]' \
'--no-color[print all output without color]' \
'1: :_bundle_commands' \
'*:: :->args' && ret=0
case $state in case $state in
cmds) (args)
_values "bundle command" \ case $words[1] in
"install[Install the gems specified by the Gemfile or Gemfile.lock]" \ (help)
"update[Update dependencies to their latest versions]" \ _arguments \
"package[Package the .gem files required by your application]" \ '1: :_bundle_commands' \
"exec[Execute a script in the context of the current bundle]" \ && ret=0
"config[Specify and read configuration options for bundler]" \ ;;
"check[Determine whether the requirements for your application are installed]" \ (install)
"list[Show all of the gems in the current bundle]" \ local -a policies=('HighSecurity' 'MediumSecurity' 'LowSecurity' 'AlmostNoSecurity' 'NoSecurity')
"show[Show the source location of a particular gem in the bundle]" \ _arguments \
"console[Start an IRB session in the context of the current bundle]" \ '(- *)'{-h,--help}'[show help message]' \
"open[Open an installed gem in the editor]" \ '(--force --redownload)'{--force,--redownload}'[force reinstalling every gem]' \
"viz[Generate a visual representation of your dependencies]" \ '--full-index[download and cache the index file of all gems]' \
"init[Generate a simple Gemfile, placed in the current directory]" \ '--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \
"gem[Create a simple gem, suitable for development with bundler]" \ '(-j --jobs)'{-j,--jobs}'[the maximum number of parallel download and install jobs]:number' \
"help[Describe available tasks or one specific task]" \ '--local[do not attempt to connect to rubygems.org]' \
"platform[Displays platform compatibility information]" \ '--lockfile=[location of the lockfile which Bundler should use]:path:_files' \
"outdated[Show all of the outdated gems in the current bundle]" '--prefer-local[force using locally installed gems]' \
ret=0 '--no-cache[do not update the cache in vendor/cache with newly installed gems]' \
;; '--no-lock[do not create a lockfile]' \
args) '--quiet[only output warnings and errors]' \
case $line[1] in '--retry=[retry number when network or git requests failed]:number' \
help) '--standalone=-[create standalone bundles]:groups:_bundle_groups' \
_values 'commands' 'install' 'update' 'package' 'exec' 'config' 'check' 'list' 'show' 'console' 'open' 'viz' 'init' 'gem' 'help' 'platform' 'outdated' && ret=0 "--trust-policy=-[apply the Rubygems security policy]:arg:($policies)" \
;; && ret=0
install) ;;
_policies=('HighSecurity' 'MediumSecurity' 'LowSecurity' 'AlmostNoSecurity' 'NoSecurity') (update)
_arguments \ _arguments \
'(--no-color)--no-color[disable colorization in output]' \ '(- *)'{-h,--help}'[show help message]' \
'(--local)--local[do not attempt to connect to rubygems.org]' \ '--all[update all gems specified in Gemfile]' \
'(--quiet)--quiet[only output warnings and errors]' \ \*{--group,-g}=-'[only update the gems in the specified group]' \
'(--gemfile)--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile' \ '--source=-[the name of a source used in the Gemfile]:url' \
'(--system)--system[install to the system location]' \ '--local[do not attempt to fetch gems remotely and use the gem cached instead]' \
'(--deployment)--deployment[install using defaults tuned for deployment environments]' \ '--ruby[update the locked version of Ruby to the current version of Ruby]' \
'(--frozen)--frozen[do not allow the Gemfile.lock to be updated after this install]' \ '--bundler[update the locked version of bundler to invoked bundler version]' \
'(--path)--path=-[specify a different path than the system default]:path:_files' \ '(--force --redownload)'{--force,--redownload}'[force reinstalling every gem]' \
'(--binstubs)--binstubs=-[generate bin stubs for bundled gems to ./bin]:directory:_files' \ '--full-index[fall back to using the single-file index of all gems]' \
'(--without)--without=-[exclude gems that are part of the specified named group]:groups' \ '(-j --jobs)'{-j,--jobs}'[specify the number of jobs to run in parallel]:number' \
'(--with)--with=-[include gems that are part of the specified named group]:groups' \ '--retry=-[retry failed network or git requests for number times]:number' \
'(--clean)--clean[remove any gems not present in the current Gemfile]' \ '--quiet[only output warnings and errors]' \
'(--full-index)--full-index[download and cache the index file of all gems]' \ '--patch[prefer updating only to next patch version]' \
'(--jobs)--jobs=-[install gems parallelly]:number' \ '--minor[prefer updating only to next minor version]' \
'(--force)--force[force download every gem]' \ '--major[prefer updating only to next major version (default)]' \
'(--no-cache)--no-cache[do not update the cache in vendor/cache with newly installed gems]' \ '--pre[always choose the highest allowed version]' \
'(--no-prune)--no-prune[do not remove stale gem from cache after installation]' \ '--strict[do not allow any gem to be updated past latest --patch | --minor | --major]' \
'(--retry)--retry=-[number of times to retry failed network or git requests]:number' \ '--conservative[use bundle install conservative update behavior]' \
'(--sheband)--shebang=-[specify ruby executable to execute scripts]:ruby' \ '*:: :_bundle_gems' \
'(--standalone)--standalone=-[create standalone bundles]:groups' \ && ret=0
"(--trust-policy)--trust-policy=-[apply the Rubygems security policy]:arg:($_policies)" ;;
ret=0 (cache)
;; _arguments \
exec) '(- *)'{-h,--help}'[show help message]' \
_normal && ret=0 '--all-platforms[include gems for all platforms present in the lockfile, not only the current one]' \
;; '--cache-path=-[specify a different cache path than the default(vendor/cache)]: :_files -/' \
(open|show) '--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \
_gems=( $(bundle show 2> /dev/null | sed -e '/^ \*/!d; s/^ \* \([^ ]*\) .*/\1/') ) "--no-install[don't install the gems, only update the cache]" \
if [[ $_gems != "" ]]; then '--quiet[only output warnings and errors]' \
_values 'gems' $_gems && ret=0 && ret=0
fi ;;
;; (exec)
*) _arguments \
_opts=( $(bundle help $line[1] | sed -e '/^ \[-/!d; s/^ \[\(-[^=]*\)=.*/\1/') ) '(- *)'{-h,--help}'[show help message]' \
_opts+=( $(bundle help $line[1] | sed -e '/^ -/!d; s/^ \(-.\), \[\(-[^=]*\)=.*/\1 \2/') ) '--gemfile=[use the specified gemfile instead of Gemfile]' \
if [[ $_opts != "" ]]; then '*:: :_normal' \
_values 'options' $_opts && ret=0 && ret=0
fi ;;
;; (config)
esac _arguments \
;; '(- *)'{-h,--help}'[show help message]' \
esac '1: :_bundle_config_subcommands' \
'--local[use local configuration]' \
'--global[use global configuration]' \
&& ret=0
;;
(add)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'(-v --version)'{-v,--version}=-'[specify version requirements for the added gem]:version' \
'(-g --group)'{-g,--group}=-'[specify the group for the added gem]:group:_bundle_groups' \
'(-s --source)'{-s,--source}=-'[specify the source for the added gem]: :_files' \
'(-r --require)'{-r,--require}=-'[adds require path to gem]: :_files' \
'--path=[specify the file path for the added gem]: :_files -/' \
'--git=[specify the git source for the added gem]:git' \
'--github=[specify the github source for the added gem]:github' \
'--branch=[specify the git branch for the added gem]:branch' \
'--ref=[specify the git ref for the added gem]' \
"--glob=[specify the location of a dependency's .gemspec, expanded within Ruby]:glob" \
'--quiet[do not print progress information to the standard output]' \
'--skip-install[adds the gem to the Gemfile but does not install it]' \
'--optimistic[adds optimistic declaration of version]' \
'--strict[adds strict declaration of version]' \
'1::gem' \
&& ret=0
;;
(binstubs)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'--force[overwrite existing binstubs if they exist]' \
'--standalone[makes binstubs that can work without depending on Rubygems or Bundler at runtime]' \
'--shebang=-[specify a different shebang executable name than the default(default: ruby)]: :_files' \
'--all[create binstubs for all gems in the bundle]' \
'--all-platforms[install binstubs for all platforms]' \
'1::gem:' \
&& ret=0
;;
(check)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'--dry-run[locks the Gemfile before running the command]' \
'--gemfile=-[use the specified gemfile instead of the Gemfile]: :_files' \
&& ret=0
;;
(show)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'--paths[list the paths of all gems that are required by your Gemfile]' \
'1:: :_bundle_gems' \
&& ret=0
;;
(outdated)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'--local[do not attempt to fetch gems remotely and use the gem cache instead]' \
'--pre[check for newer pre-release gems]' \
'--source=[check against a specific source]:source:_files' \
'(--filter-strict --strict)'{--filter-strict,--strict}'[only list newer versions allowed by your Gemfile requirements]' \
'(--parseable --porcelain)'{--parseable,--porcelain}'[use minimal formatting for more parsable output]' \
'--group=[list gems from a specific group]:group:_bundle_groups' \
'--groups[list gems organized by groups]' \
'--major[prefer updating to next major version(default)]' \
'--minor[prefer updating only to next minor version]' \
'--patch[prefer updating only to next patch version]' \
'--filter-major[only list major new versions]' \
'--filter-minor[only list minor new versions]' \
'--filter-patch[only list patch new versions]' \
'--only-explicit[only list gems specified in your Gemfile, not their dependencies]' \
'*:: :_bundle_gems' \
&& ret=0
;;
(console)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'--no-color[disable colorization in output]' \
'(-r --retry)'{-r,--retry}='[specify the number of times you with to attempt network commands]:num' \
'1:: :_bundle_groups' \
&& ret=0
;;
(open)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'--path=[specify GEM source relative path to open]:path:_files' \
'1:: :_bundle_gems' \
&& ret=0
;;
(list)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'--name-only[print only the name of each gem]' \
'--paths[print the path to each gem in the bundle]' \
'--without-group=-[a space-separated list of groups of gems to skip during printing]: :_bundle_groups' \
'--only-group=-[a space-separated list of groups of gems to print]: :_bundle_groups' \
'--format[output format]:format:(json)' \
&& ret=0
;;
(lock)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'--update=-[ignores the existing lockfile]' \
'--bundler=-[update the locked version of bundler to the given version or the latest version]:version' \
'--local[do not attempt to connect to rubygems.org]' \
'--print[prints the lockfile to STDOUT instead of writing to the file system]' \
'--lockfile=[the path where the lick file should be written to]: :_files' \
'--full-index[fall back to using the single file index of all gems]' \
'--gemfile=[use the specified gemfile instead of Gemfile]:file:_files' \
'--add-checksums[add checksums to the lockfile]' \
'--add-platform=[add a new platform to the lockfile]:platforms' \
'--remove-platform=[remove a platform from the lockfile]:platforms' \
'--normalize-platforms[normalize lockfile platforms]' \
'--patch[if updating, prefer updating only to next patch version]' \
'--minor[if updating, prefer updating only to next minor version]' \
'--major[if updating, prefer updating to next major version(default)]' \
'--pre[if updating, always choose the highest allowed version]' \
'--strict[if updating, do not allow any gem to be updated past latest --patch | --minor | --major]' \
'--conservative[if updating, use bundle install conservative update behavior]' \
&& ret=0
;;
(init)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'--gemspec=-[use the specified .gemspec to create the Gemfile]: :_files' \
'--gemfile=[use the specified name for the gemfile instead of Gemfile]:name' \
&& ret=0
;;
(gem)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'(--exe -b --bin --no-exe)'{--exe,-b,--bin}'[specify that bundler should create a binary executable in the generated rubygem project]' \
'(--exe -b --bin --no-exe)--no-exe[do not create a binary]' \
'(--no-coc)--coc[add a CODE_OF_CONDUCT.md to the root of the generated project]' \
'(--coc)--no-coc[do not create a CODE_OF_CONDUCT.md]' \
'(--changelog --no-changelog)--changelog[add a CHANGELOG.md file to the root of the project]' \
'(--changelog --no-changelog)--no-changelog[do not add a CHANGELOG.md file to the root of the project]' \
'(--no-ext --ext)--ext=[add boilerplate for C, GO or Rust extension code to the generated project]: :(c go rust )' \
'(--ext --no-ext)--no-ext[do not add extension code]' \
'--git[initialize a git repo inside your library]' \
'--github-username=[Github username on README]:username' \
'(--no-mit --mit)--mit[add an MIT license to a LICENSE.txt file in the root of the generated project]' \
'(--mit --no-mit)--no-mit[do not create a LICENSE.txt]' \
'(-t --test --no-test)'{-t,--test}='[specify the test framework]: :(minitest rspec test-unit)' \
'(-t --test --no-test)--no-test[do not use a test framework]' \
'(--ci --no-ci)--ci=-[specify the continuous integration service]: :(circle github gitlab)' \
'(--ci --no-ci)--no-ci[do not use a continuous integration service]' \
'(--linter --no-linter)--linter=-[specify the linter and code formatter]: :(rubocop standard)' \
'(--linter --no-linter)--no-linter[do not add a linter]' \
'(-e --edit)'{-e,--edit}='[open the resulting GEM_NAME.gemspec in EDITOR]:editor' \
'(--bundle --no-bundle)--bundle[run bundle install after creating the gem]' \
'(--bundle --no-bundle)--no-bundle[do not run bundle install after creating the gem]' \
'1::gem_name:' \
&& ret=0
;;
(platform)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'--ruby[it will display the ruby directive information]' \
&& ret=0
;;
(clean)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'--dry-run[print the changes, but do not clean the unused gems]' \
'--force[forces cleaning up unused gems even if Bundler is configured to use globally installed gems]' \
&& ret=0
;;
(doctor)
_bundle_doctor && ret=0
;;
(remove)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'*:: :_bundle_gems' \
&& ret=0
;;
(plugin)
_bundle_plugin && ret=0
;;
esac
;;
esac
return ret return ret
}
_bundle_commands() {
local -a commands=(
"install:Install the gems specified by the Gemfile or Gemfile.lock"
"update:Update dependencies to their latest versions"
"cache:Package the .gem files required by your application"
"exec:Execute a script in the context of the current bundle"
"config:Specify and read configuration options for bundler"
"help:Describe available tasks or one specific task"
"add:Add the named gem to the Gemfile and run bundle install"
"binstubs:Generate binstubs for executables in a gem"
"check:Determine whether the requirements for your application are installed"
"show:Show the source location of a particular gem in the bundle"
"outdated:Show all of the outdated gems in the current bundle"
"console:Start an IRB session in the context of the current bundle"
"open:Open an installed gem in the editor"
"list:Show all of the gems in the current bundle"
"lock:Generate a lockfile for your dependencies"
"init:Generate a simple Gemfile, placed in the current directory"
"gem:Create a simple gem, suitable for development with bundler"
"platform:Displays platform compatibility information"
"clean:Clean up unused gems in your Bundler directory"
"doctor:Display warnings about common problems"
"remove:Removes gems from the Gemfile"
"plugin:Manage Bundler plugins"
"version:Prints Bundler version information"
)
_describe -t commands 'command' commands "$@"
}
_bundle_gems() {
local -a gems=($(bundle show | awk '/^ / { print $2 }'))
if [[ $? == 0 ]]; then
_values 'gems' $gems
fi
}
_bundle_groups() {
if [[ -e Gemfile ]]; then
local -a groups=(${(@f)"$(awk '/^ *group *:/{sub(/^ *group *:/, ""); print $1}' Gemfile)"})
_values 'groups' $groups
fi
}
_bundle_config_subcommands() {
local -a subcommands=(
"list:print a list of all bundler configuration"
"get:print the value of that configuration setting"
"set:set <name> <value> defaults to setting configuration"
"unset:delete the configuration"
)
_describe -t subcommands 'subcommand' subcommands "$@"
}
_bundle_plugin() {
local ret=1
_arguments -C \
'(- *)'{-h,--help}'[show help message]' \
'1:subcommand:_bundle_plugin_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
case $words[1] in
(install)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'--source=[install the plugin gem from a specific source]:url:_urls' \
'--version=[specify a version of the plugin gem]:version' \
'--git=[install the plugin gem from a Git repository]:url:_urls' \
'--branch=[branch name when using --git]:branch' \
'--ref=[tag or commit hash when using --git]:ref' \
'--path=[local file path to install the plugin gem]:path:_files -/' \
'*::plugins' \
&& ret=0
;;
(uninstall)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'--all[uninstall all the installed plugins]' \
'*::plugins' \
&& ret=0
;;
(list)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
&& ret=0
;;
(help)
_arguments \
'(- *)'{-h,--help}'[show help message]' \
'1:subcommand:(install uninstall list help)' \
&& ret=0
;;
esac
;;
esac
return ret
}
_bundle_plugin_subcommands() {
local -a subcommands=(
'install:install the given plugins'
'uninstall:uninstall the plugins'
'list:list the installed plugins and available commands'
'help:describe subcommands or one specific subcommand'
)
_describe -t subcommands 'subcommand' subcommands "$@"
}
_bundle_doctor() {
local ret=1
_arguments -C \
'(- *)'{-h,--help}'[show help message]' \
'--quiet[only output warnings and errors]' \
'--gemfile=[the location of the Gemfile which Bundler should use]: :_files' \
'--ssl[diagnose common SSL problems when connecting to https://rubygems.org]' \
'1:subcommand:_bundle_doctor_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
case $words[1] in
(diagnose)
_arguments \
'--quiet[only output warnings and errors]' \
'--gemfile=[the location of the Gemfile which Bundler should use]: :_files' \
'--ssl[diagnose common SSL problems when connecting to https://rubygems.org]' \
&& ret=0
;;
(ssl)
_arguments \
'--host=[perform the diagnostic on HOST(default: rubygems.org)]:host' \
'--tls-version=[TLS version to connect to HOST]:version:(1.1 1.2)' \
'--verify-mode=[specify the TLS verify mode]:mode:(CLIENT_ONCE FAIL_IF_NO_PEER_CERT NONE PEER)' \
&& ret=0
;;
(help)
_arguments \
'1:subcommand:_bundle_doctor_subcommands' \
&& ret=0
;;
esac
;;
esac
return ret
}
_bundle_doctor_subcommands() {
local -a subcommands=(
'diagnose:check your Gemfile and gem environment for common problems'
'ssl:check issues related to SSL certificates or/and TLS versions'
'help:describe subcommands or one specific subcommand'
)
_describe -t subcommands 'subcommand' subcommands "$@"
}
_bundle "$@"
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -1,50 +0,0 @@
#compdef caffeinate
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for the macOS 'caffeinate' tool (man 8 caffeinate).
#
# -------------------------------------------------------------------------
# Authors
# -------
#
# * Nicolas Despres <nicolas.despres@gmail.com> (initial version)
#
# -------------------------------------------------------------------------
_arguments -s \
'-d[prevent the display from sleeping]' \
'-i[prevent the system from idle sleeping]' \
'-m[prevent the disk from idle sleeping]' \
'-s[prevent the system from sleeping but only when running on AC power]' \
'-u[declare that user is active]' \
'-t+[assertion timeout value]:delay in seconds' \
'-w+[waits for process to exit]:pid:_pids' \
'(-):command: _command_names -e' \
'*::args: _normal'

View File

@ -1,6 +1,6 @@
#compdef cap #compdef cap
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,13 +28,14 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for Capistrano (http://capify.org). # Completion script for Capistrano 3.19.2 (https://capistranorb.com/)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
# ------- # -------
# #
# * Bruno Michel (https://github.com/nono) # * Bruno Michel (https://github.com/nono)
# * Shohei Yoshida (https://github.com/syohex)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -42,32 +43,45 @@
local curcontext="$curcontext" state line cmds ret=1 local curcontext="$curcontext" state line cmds ret=1
_arguments -C \ _arguments -C \
{-d,--debug}'[Prompts before each remote command execution]' \ '--backtrace=[Enable full backtrace]: :(stderr stdout)' \
{-e,--explain}'[Displays help (if available) for the task]:task' \ '--comments[Show commented tasks only]' \
{-F,--default-config}'[Always use default config, even with -f]' \ '--job-stats[Display job statistics]:level' \
{-f,--file}'[A recipe file to load. May be given more than once]:file:_files' \ '--rules[Trace the rules resolution]' \
{-H,--long-help}'[Explain these options and environment variables]' \ '--suppress-backtrace[Suppress backtrace lines matching regexp PATTERN]:pattern' \
{-h,--help}'[Display this help message]' \ '(-A --all)'{-A,--all}'[Show all tasks, even uncommented ones]' \
{-l,--logger}'[Choose logger method. STDERR used by default]:file:_files' \ '(-B --build-all)'{-B,--build-all}'[Build all prerequisites, including those which are up-to-date]' \
{-n,--dry-run}'[Prints out commands without running them]' \ '(-C --directory)'{-C,--directory}'[Change to DIRECTORY before doing anything]: :_files -/' \
{-p,--password}'[Immediately prompt for the password]' \ '(-D --describe)'{-D,--describe}'[Describe the tasks, then exit]:pattern' \
{-q,--quiet}'[Make the output as quiet as possible]' \ '(-e --execute)'{-e,--execute}'[Execute some Ruby code and exit]:code' \
{-r,--preserve-roles}'[Preserve task roles]' \ '(-E --execute-continue)'{-E,--execute-continue}'[Execute Ruby code and continue with task processing]:code' \
{-S,--set-before}'[Set a variable before the recipes are loaded]:variable' \ '(-f --rakefile)'{-f,--rakefile}'[Use FILENAME as the rakefile to search for]: :_files' \
{-s,--set}'[Set a variable after the recipes are loaded]:variable' \ '(-G --no-system --nosystem)'{-G,--no-system,--nosystem}'[Use standard project Rakefile search paths, ignore system wide rakefiles]' \
{-T,--tasks}'[List all tasks (matching optional PATTERN) in the loaded recipe files]:pattern' \ '(-g --system)'{-g,--system}'[Using system wide rakefiles]' \
{-t,--tool}'[Abbreviates the output of -T for tool integration]' \ '(-I --libdir)'\*{-I,--libdir}'[Include LIBDIR in the search path for required modules]: :_files -/' \
{-V,--version}'[Display the Capistrano version, and exit]' \ '(-j --jobs)'{-j-,--jobs-}'[Specifies the maximum number of tasks to execute in parallel]:num' \
{-v,--verbose}'[Be more verbose. May be given more than once]' \ '(-m --multitask)'{-m,--multitask}'[Treat all tasks as multitasks]' \
{-X,--skip-system-config}'[Do not load the system config file (capistrano.conf)]' \ '(-N --no-search --nosearch)'{-N,--no-search,--nosearch}'[Do not search parent directories for the Rakefile]' \
{-x,--skip-user-config}'[Do not load the user config file (.caprc)]' \ '(-P --prereqs)'{-P,--prereqs}'[Display the tasks and dependencies, then exit]' \
'*: :->cmds' && ret=0 '--execute-print[Execute some Ruby code, print the result, then exit]:code' \
'*--require[Require MODULE before executing rakefile]:module' \
'(-R --rakelibdir --rakelib)'{-R,--rakelibdir,--rakelib}'[Auto-import any .rake files in RAKELIBDIR]: :_files -/' \
'(-t --trace)'{-t,--trace}'[Turn on invoke/execute tracing, enable full backtrace]: :(stderr stdout)' \
'(-T --tasks)'{-T,--tasks}'[Display the tasks with descriptions]::pattern' \
'(-W --where)'{-W,--where}'[Describe the tasks then exit]::pattern' \
'(-X --no-deprecation-warnings)'{-X,--no-deprecation-warnings}'[Disable the deprecation warnings]' \
'(- *)'{-V,--version}'[Display the program version]' \
'(-n --dry-run)'{-n,--dry-run}'[Do a dry run without executing actions]' \
'(-r --roles)'{-r,--roles}'[Run SSH commands only on hosts matching these roles]:roles' \
'(-z --hosts)'{-z,--hosts}'[Run SSH commands only on matching hosts]:hosts' \
'(-p --print-config-variables)'{-p,--print-config-variables}'[Display the defined config variables before starting the deployment tasks]' \
'(- *)'{-h,-H,--help}'[Display help message]' \
'*: :->cmds' && ret=0
case $state in case $state in
cmds) cmds)
cmds=( ${(f)"$(_call_program commands cap -T 2> /dev/null | sed -e '/ # /!d; s/:/\\:/g; s/cap \([A-Za-z0-9\\:_-]*\) .*# /\1:/')"} ) cmds=( ${(f)"$(_call_program commands cap -T 2>/dev/null | sed -e '/ # /!d; s/:/\\:/g; s/cap \([A-Za-z0-9\\:_-]*\) .*# /\1:/')"} )
_describe -t commands 'cap command' cmds && ret=0 _describe -t commands 'cap command' cmds && ret=0
;; ;;
esac esac
return ret return ret

View File

@ -1,6 +1,6 @@
#compdef cask #compdef cask
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2014 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2014 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for cask (http://cask.readthedocs.org) # Completion script for cask (https://cask.readthedocs.io)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -41,16 +41,32 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
function _cask() { function _cask() {
local ret=1 state typeset -A opt_args
_arguments \ 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' \ ':subcommand:->subcommand' \
'*:: :->subcmds' && ret=0 '*:: :->subcmds' \
&& ret=0
case $state in case $state in
subcommand) (subcommand)
subcommands=( local -a subcommands=(
"build:build all Elisp files in the files directive" "build:build all Elisp files in the files directive"
"clean-elc:remove all byte compiled 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:execute command with correct 'exec-path' and 'load-path'"
"exec-path:print 'exec-path' for all packages and dependencies" "exec-path:print 'exec-path' for all packages and dependencies"
"files:print list of files specified in the files directive" "files:print list of files specified in the files directive"
@ -71,15 +87,33 @@ function _cask() {
"upgrade:upgrade Cask itself and its dependencies" "upgrade:upgrade Cask itself and its dependencies"
"version:print program version" "version:print program version"
) )
_describe -t subcommands 'cask subcommands' subcommands && ret=0
esac
case "$words[1]" in _describe -t subcommands 'cask subcommands' subcommands && ret=0
init) ;;
_arguments \ (subcmds)
'(--dev)--dev[Run in dev mode]' && ret=0 ;; case "$words[1]" in
exec) (init)
_generic _arguments \
'(--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 esac
@ -87,3 +121,11 @@ function _cask() {
} }
_cask "$@" _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

View File

@ -1,23 +1,23 @@
#compdef ccache -P -value-,CCACHE_*,-default- #compdef ccache -P -value-,CCACHE_*,-default-
# zsh completion script for ccache # zsh completion script for ccache 4.10.2
# Copyright 2018 CERN for the benefit of the LHCb Collaboration. # Copyright 2018 CERN for the benefit of the LHCb Collaboration.
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice, this # * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer. # list of conditions and the following disclaimer.
# #
# * Redistributions in binary form must reproduce the above copyright notice, # * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation # this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution. # and/or other materials provided with the distribution.
# #
# * Neither the name of the copyright holder nor the names of its # * Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from # contributors may be used to endorse or promote products derived from
# this software without specific prior written permission. # this software without specific prior written permission.
# #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -49,51 +49,55 @@ _ccache_compilers() {
_ccache_booleans() { _ccache_booleans() {
_message 'There are no "false" values, unset variable to disable' _message 'There are no "false" values, unset variable to disable'
local description; description=${1:-boolean} local description=${1:-boolean}
local booleans; booleans=( local -a booleans=('true' 'yes')
'true'
'yes'
)
_describe -t booeans "$description" booleans _describe -t booeans "$description" booleans
} }
(( $+functions[_ccache_compressionlevels] )) ||
_ccache_compressionlevels() {
local -a one_nine
one_nine=(1 2 3 4 5 6 7 8 9)
_describe -t onetonine "compression level (if using compression)" one_nine
}
(( $+functions[_ccache_sloppiness] )) || (( $+functions[_ccache_sloppiness] )) ||
_ccache_sloppiness() { _ccache_sloppiness() {
_values -s ',' \ _values -s ',' \
"file_macro[ignore __FILE__]" \ 'clang_index_store[ignore the clang compiler option -index-store-path and its argument]' \
"file_stat_matches[rely on mtimes and ctimes]" \ 'file_stat_matches[rely on mtimes and ctimes]' \
"include_file_ctime[ignore headers' ctime too new]" \ 'file_stat_matches_ctime[ignore ctime when file_stat_matches is enabled]' \
"include_file_mtime[ignore headers' mtime too new]" \ 'gcno_cwd[not hash the current working directory]' \
"no_system_headers[exclude system headers from cache]" \ 'incbin[pretend the .incbin directive]' \
"pch_defines[be sloppy about #defines in pch]" \ 'include_file_ctime[ignore headers ctime too new]' \
"time_macros[ignore __date__ and __time__]" 'include_file_mtime[ignore headers mtime too new]' \
'ivfsoverlay[ignore the clang option -ivfsoverlay and its argument]' \
'locale[include locale environment variables in the hash]' \
'module[enable cache even if -fmodules is used]' \
'pch_defines[be sloppy about #defines in pch]' \
'random_seed[ignore the -frandom-seed option and its argument]' \
'system_headers[only check non-system headers in direct mode]' \
'time_macros[ignore __DATE__ and __TIME__]'
} }
(( $+functions[_ccache_compilerchecks] )) || (( $+functions[_ccache_compilerchecks] )) ||
_ccache_compilerchecks() { _ccache_compilerchecks() {
local -a compiler_check_values local -a compiler_check_values=(
compiler_check_values=( 'content:the actual compiler binary'
'content: the actual compiler binary' 'mtime:mtime and size of the compiler'
'mtime: mtime and size of the compiler' 'none:ignore compiler for hashing'
'none: ignore compiler for hashing' 'string\::any hard coded string (pre-computed version)'
'string\:: any hard coded string (pre-computed version)' '%compiler%\ -v:any compiler invocation output'
'%compiler%\ -v:any compiler invocation output'
) )
_describe -t compilerchecks "compiler information included in the hash" compiler_check_values _describe -t compilerchecks "compiler information included in the hash" compiler_check_values
} }
(( $+functions[_ccache_dirlevels] )) || (( $+functions[_ccache_compiler_type] )) ||
_ccache_dirlevels() { _ccache_compiler_type() {
local -a one_eight local -a compiler_types=(
one_eight=(1 2 3 4 5 6 7 8) 'auto:guess compiler name'
_describe -t onetoeight "directory levels in the cache directory" one_eight 'clang:clang-based compiler'
'clang-cl:clang-cl'
'gcc:gcc-based compiler'
'icl:Intel compiler on Windows'
'msvc:Microsoft Visual C++'
'nvcc:NVCC CUDA compiler'
'other:any compiler other than the known types'
)
_describe -t compiler_types "compiler types" compiler_types
} }
if [[ "$service" = -value-* ]]; then if [[ "$service" = -value-* ]]; then
@ -105,9 +109,6 @@ if [[ "$service" = -value-* ]]; then
# all: a single path # all: a single path
_path_files -/ _path_files -/
;; ;;
*CCACHE_NLEVELS*)
_ccache_dirlevels
;;
*CCACHE_CC*) *CCACHE_CC*)
_ccache_compilers _ccache_compilers
;; ;;
@ -117,9 +118,6 @@ if [[ "$service" = -value-* ]]; then
*CCACHE_*COMPRESS*) *CCACHE_*COMPRESS*)
_ccache_booleans "write compressed cache" _ccache_booleans "write compressed cache"
;; ;;
*CCACHE_COMPRESSLEVEL*)
_ccache_compressionlevels
;;
*CCACHE_EXTENSION*) *CCACHE_EXTENSION*)
_alternative ':set extension for intermediate files: ' _alternative ':set extension for intermediate files: '
;; ;;
@ -191,7 +189,7 @@ if [[ "$service" = -value-* ]]; then
_alternative ":umask value (octal): " _alternative ":umask value (octal): "
;; ;;
*CCACHE_*UNIFY*) *CCACHE_*UNIFY*)
_ccache_booleans "normalise sources prior to processing" _ccache_booleans "normalize sources prior to processing"
;; ;;
esac esac
@ -199,102 +197,87 @@ if [[ "$service" = -value-* ]]; then
fi fi
__ccache_config_keys() { __ccache_config_keys() {
local -a keys local -a keys=(
keys=( 'absolute_paths_in_stderr:rewrite relative paths in error output to absolute paths'
'compression:write compressed cache' 'base_dir:specify relative to which top level paths are hashed'
'direct_mode:use direct mode' 'cache_dir:specify where the cache is kept'
'disable:disable cache usage' 'compiler:specify compiler'
'hard_link:create hard links rather than copies' 'compiler_check:compiler information included in the hash'
'hash_dir:include the cwd in the hash' 'compiler_type:force a compiler type'
'keep_comments_cpp:consider comments in hashing' 'compression:write compressed cache'
'read_only:treat cache as read-only' 'compression_level:cache compression level'
'read_only_direct:retrieve from read-only cache in direct mode' 'cpp_extension:set extensions for intermediate files'
'recache:use cache in write-only mode' 'debug:enable debug mode'
'run_second_cpp:pass originial rather than preprocessed source code to compiler' 'debug_dir:specify directory to write debug files'
'stats:update statistics counters' 'debug_level:specify the amount of debug information'
'unify:normalise sources prior to processing' 'depend_mode:enable depend mode'
'base_dir:specify relative to which top level paths are hashed' 'direct_mode:use direct mode'
'temporary_dir:specify where temporary files are kept' 'disable:disable cache usage'
'cache_dir:specify where the cache is kept' 'extra_files_to_hash:additional files to consider in hashing'
'compiler:specify compiler' 'file_clone:use file cloning to store and fetch cached compiler results'
'cache_dir_levels:directory levels in the cache directory' 'hard_link:create hard links rather than copies'
'compiler_check:compiler information included in the hash' 'hash_dir:include the cwd in the hash'
'compression_level:cache compression level' 'ignore_headers_in_manifest:set paths to headers to ignore in hashing'
'cpp_extension:set extensions for intermediate files' 'ignore_options:list of options that ccache will ignore'
'extra_files_to_hash:additional files to consider in hashing' 'inode_cache:cache source file hashes based on device, inode and timestamps'
'ignore_headers_in_manifest:set paths to headers to ignore in hashing' 'keep_comments_cpp:consider comments in hashing'
'limit_multiple:cleanup level' 'log_file:specify a log file'
'log_file:specify a log file' 'max_files:maximum number of files in the cache'
'max_files:maximum number of files in the cache' 'max_size:maximum size of the cache'
'max_size:maximum size of the cache' 'msvc_dep_prefix:specify the prefix of included files output for MSVC compiler'
'path:PATH for compiler lookup (instead of $PATH)' 'namespace:namespace will be added to the hashed data for each compilation'
'prefix_command:prefixes for compiler invocation' 'path:PATH for compiler lookup (instead of $PATH)'
'prefix_command_cpp:prefixes for preprocessor invocation' 'pch_external_checksum:use .sum file for hash'
'sloppiness:hash files sloppy' 'prefix_command:prefixes for compiler invocation'
'umask:set umask for ccache and child processes (e.g. for sharing cache)' 'prefix_command_cpp:prefixes for preprocessor invocation'
'read_only:treat cache as read-only'
'read_only_direct:retrieve from read-only cache in direct mode'
'recache:use cache in write-only mode'
'remote_only:use remote storage'
'remote_storage:specify one or several storage backends'
'reshare:write results to remote storage even for local storage cache hits'
'run_second_cpp:pass original rather than preprocessed source code to compiler'
'sloppiness:hash files sloppy'
'stats:update statistics counters'
'stats_log:write statistics counter updates to the specified file'
'temporary_dir:specify where temporary files are kept'
'umask:set umask for ccache and child processes (e.g. for sharing cache)'
) )
_describe -t configkeys "configuration keys" keys -S '=' _describe -t configkeys "configuration keys" keys -S '='
} }
if compset -P '--set-config=*='; then if compset -P '--set-config=*='; then
case $IPREFIX in case $IPREFIX in
*=compression= | *=direct_mode= | *=disable= | *=hard_link= | *=hash_dir= | *=keep_comments_cpp= | *=read_only= | *=read_only_direct= | *=recache= | *=run_second_cpp= | *=stats= | *=unify= ) ( *=absolute_paths_in_stderr= | *=compression= | *=debug= | *=depend_mode= | *=direct_mode= | *=disable= | *=file_clone= | *=hard_link= | *=hash_dir= | *=inode_cache= | *=keep_comments_cpp= | *=read_only= | *=read_only_direct= | *=recache= | *=run_second_cpp= | *=stats= | *=unify= )
local booleans; booleans=( local -a booleans=('true' 'false')
'true'
'false'
)
_describe -t booleans 'boolean' booleans _describe -t booleans 'boolean' booleans
;; ;;
*=base_dir= | *=temporary_dir= | *=cache_dir=) (*=base_dir= | *=cache_dir= | *=debug_dir= | *=temporary_dir=)
_path_files -/ _path_files -/
;; ;;
*=compiler=) (*=compiler=)
_ccache_compilers _ccache_compilers
;; ;;
*=cache_dir_levels=) (*=compiler_check=)
_ccache_dirlevels
;;
*=compiler_check=)
_ccache_compilerchecks _ccache_compilerchecks
;; ;;
*=compression_level=) (*=compiler_type=)
_ccache_compressionlevels _ccache_compiler_type
;; ;;
*=cpp_extension=) (*=extra_files_to_hash=)
_alternative ':set extension for intermediate files: '
;;
*=extra_files_to_hash=)
local sep=: local sep=:
compset -P "*${sep}" compset -P "*${sep}"
compset -S "${sep}*" || suf="$sep" compset -S "${sep}*" || suf="$sep"
_files "" -r "${sep}"' /\t\t\-' "$@" _files "" -r "${sep}"' /\t\t\-' "$@"
;; ;;
*=ignore_headers_in_manifest=) ( *=ignore_headers_in_manifest= | *=path= )
_dir_list _dir_list
;; ;;
*=limit_multiple=) (*=log_file= | *=stats_log= )
_alternative ":clean up down to level (e.g. 0.8): "
;;
*=log_file=)
_path_files -g "*(/) *.log" _path_files -g "*(/) *.log"
;; ;;
*=max_files=) (*=sloppiness=)
_alternative ":maximum number of files in the cache (0= no limit): "
;;
*=max_size=)
_alternative ':maximum cache size (0= no limit) with suffix k,M,G,T or Ki,Mi,Gi,Ti: '
;;
*=path=)
_alternative ':PATH for compiler lookup (instead of $PATH):_dir_list'
;;
*=prefix_command=)
_alternative ':prefixes for compiler invocation: '
;;
*=prefix_command_cpp=)
_alternative ':prefixes for preprocessor invocation: '
;;
*=sloppiness=)
_ccache_sloppiness _ccache_sloppiness
;; ;;
*=umask=) *=umask=)
@ -307,13 +290,36 @@ elif [[ $words[2] == -* ]]; then
'*'{-o,--set-config=}"[set configuration key]:keys:__ccache_config_keys" \ '*'{-o,--set-config=}"[set configuration key]:keys:__ccache_config_keys" \
'(: -)'{-h,--help}'[show help message]' \ '(: -)'{-h,--help}'[show help message]' \
'(: -)'{-V,--version}'[print version and copyright information]' \ '(: -)'{-V,--version}'[print version and copyright information]' \
'(-z --zero-stats)'{-z,--zero-stats}'[zero statistics counters]' \
'(-c --cleanup)'{-c,--cleanup}'[delete old files and recalculate size counters]' \ '(-c --cleanup)'{-c,--cleanup}'[delete old files and recalculate size counters]' \
'(-C --clear)'{-C,--clear}'[clear the cache completely (except configuration)]' \ '(-C --clear)'{-C,--clear}'[clear the cache completely (except configuration)]' \
'(-p --print-config)'{-p,--print-config}'[print current configuration options]' \ '--config-path[operate on configuration file PATH instead of the default]: :_files' \
'(-s --show-stats)'{-s,--show-stats}'[show statistics summary]' \ '(-d --dir)'{-d,--dir}'[operate on cache directory PATH instead of the default]: :_files -/' \
'--evict-namespace[remove file created in namespace NAMESPACE]:namespace' \
'--evict-older-than[remove files older than AGE]:age' \
'(-F --max-files=)'{-F,--max-files=}'[set maximum number of files in cache]:number of files in cache: ' \ '(-F --max-files=)'{-F,--max-files=}'[set maximum number of files in cache]:number of files in cache: ' \
'(-M --max-size=)'{-M,--max-size=}'[set maximum size of cache]:cache size: ' '(-M --max-size=)'{-M,--max-size=}'[set maximum size of cache]:cache size: ' \
'(-X --recompress)'{-X,--recompress}'[recompress the cache to level LEVEL]:level' \
'--recompress-threads[use up to THREADS threads when recompressing the cache]:threads' \
'(-x --show-compression)'{-x,--show-compression}'[show compression statistics]' \
'(-p --show-config)'{-p,--show-config}'[show current configuration options]' \
'--show-log-stats[print statistics counters from the stats log in human-readable format]' \
'(-s --show-stats)'{-s,--show-stats}'[show statistics summary]' \
'(-v --verbose)'{-v,--verbose}'[increase verbosity]' \
'(-z --zero-stats)'{-z,--zero-stats}'[zero statistics counters]' \
'--trim-dir[remove old files from directory _PATH_]: :_files -/' \
'--trim-max-size[specify the maximum size for --trim-dir]:size' \
'--trim-method[specify the method for --trim-dir]: :(atime mtime)' \
'--trim-recompress[recompress to level LEVEL]:level' \
'--trim-recompress-threads[use up to THREADS threads when recompressing]:threads' \
'--checksum-file[print the checksum of the file at PATH]: :_files' \
'--extract-result[extract file data stored in result file at PATH to the current working directory]' \
'--format[specify format for --print-log-stats and --print-stats]:format:(tab json)' \
'(-k --get-config)'{-k,--get-config}'[print the value of configuration key]:key' \
'--hash-file[print the hash of the file at PATH]: :_files' \
'--inspect[print result/manifest file at PATH in human-readable format]' \
'--print-log-stats[print statistics counter IDs and corresponding values from the stats log]' \
'--print-stats[print statistics counter IDs and corresponding values in machine-parsable format]' \
'--print-version[print version only]'
elif [[ $CURRENT -eq 2 ]]; then elif [[ $CURRENT -eq 2 ]]; then
_ccache_compilers _ccache_compilers
else else
@ -323,3 +329,11 @@ else
shift words shift words
_normal _normal
fi 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

262
src/_certbot Normal file
View File

@ -0,0 +1,262 @@
#compdef certbot
# ------------------------------------------------------------------------------
# Copyright (c) 2025 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 certbot 5.1.0 (https://github.com/certbot/certbot)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_certbot() {
typeset -A opt_args
local context state line
local curcontext="$curcontext"
local ret=1
_arguments -C -A "-*" \
'(- *)'{-h,--help}'[Print help message]:topic:_certbot_help_topics' \
'(- *)--version[Print version and exit]' \
'1: :_certbot_subcommands' \
'*::arg:->args' \
&& ret=0
case "$state" in
(args)
local -a opts=(
'(- *)'{-h,--help}'[Show help message and exit]'
'(-c --config)'{-c,--config}'[Path to config file]:config_file:_files'
)
case $words[1] in
(run|certonly|renew|enhance|certificates|delete|reconfigure)
opts+=(
'--cert-name[Certificate name to apply]:name'
)
;|
(run|certonly|renew|reconfigure)
opts+=(
'--deploy-hook[Command to be run once for each successfully issued certificate]:hook'
)
;|
(run|certonly|renew)
opts+=(
'(-q --quiet)'{-q,--quiet}'[Silence all output except errors]'
'--required-profile[Request the given profile name from the ACME server]:profile'
'--preferred-profile[Request the given profile name from the ACME server]:profile'
'--preferred-chain[Set the preferred certificate chain]:chain'
)
;|
(run|certonly|enhance|certificates)
opts+=(
'(-d --domains --domain)'{-d,--domains,--domain}'[Domain names to include]'
)
;|
(run|certonly|enhance|register)
opts+=(
'--force-interactive[Force Certbot to be interactive even not in a terminal]'
)
;|
(run|certonly|enhance)
opts+=(
'(-n --non-interactive --noninteractive)'{-n,--non-interactive,--noninteractive}'[Run without ever asking for user input]'
)
;|
(run|certonly|register)
opts+=(
'--eab-kid[Key identifier for External Account Binding]:eab_kid'
'--eab-hmac-key[HMAC key for External Account Binding]:eab_hmac_key'
'--eab-hmac-alg[HMAC algorithm for External Account Binding(default: HS256)]:algorithm:(HS256 HS384 HS512)'
)
;|
(run|certonly)
opts+=(
'(--keep-until-expiring --keep --reinstall)'{--keep-until-expiring,--keep,--reinstall}'[Always keep the existing one until it is due for renewal]'
'--debug-challenges[After setting up challenges, wait for user input before submitting to CA]'
'--issuance-timeout[How many seconds Certbot will wait for the server to issue a certificate]:seconds'
'--apache[Obtain and install certificates using Apache]'
'--nginx[Obtain and install certificates using Nginx]'
)
;|
(certonly|renew|reconfigure)
opts+=(
'--run-deploy-hooks[run any applicable deploy hooks]'
)
;|
(certonly|renew)
opts+=(
"--dry-run[Perform a test run against the Let's Encrypt staging server]"
'--allow-subset-of-names[When performing domain validation, do not consider it a failure]'
'--preferred-challenges[A sorted, comma delimited list of the preferred challenge]:challenges'
)
;|
(run|revoke)
opts+=(
'(--test-cert --staging)'{--test-cert,--staging}"[Use the Let's Encrypt staging server to obtain or revoke test]"
)
;|
(certonly|revoke)
opts+=(
'--cert-path[Path to where certificate is saved]:cert:_files'
)
;|
(certonly|reconfigure)
opts+=(
'--webroot[Obtain certificates by placing files in a webroot directory]'
)
;|
(certonly)
opts+=(
'--csr[Path to a Certificate Signing Request (CSR) in DER or PEM format]:csr:_files'
'--standalone[Obtain certificates using a "standalone" webserver]'
'--manual[Provide laborious manual instructions for obtaining a certificate]'
'--dns-cloudflare[Obtain certificates using a Cloudflare DNS TXT record]'
'--dns-digitalocean[Obtain certificates using a DigitalOcean DNS TXT record]'
'--dns-dnsimple[Obtain certificates using a DNSimple DNS TXT record]'
'--dns-dnsmadeeasy[Obtain certificates using a DNS Made Easy DNS TXT record]'
'--dns-gehirn[Obtain certificates using a Gehirn DNS TXT record]'
'--dns-google[Obtain certificates using a Google Cloud DNS TXT record]'
'--dns-linode[Obtain certificates using a Linode DNS TXT record]'
'--dns-luadns[Obtain certificates using a LuaDNS DNS TXT record]'
'--dns-nsone[Obtain certificates using a NS1 DNS TXT record]'
'--dns-ovh[Obtain certificates using a OVH DNS TXT record]'
'--dns-rfc2136[Obtain certificates using a BIND DNS TXT record]'
'--dns-route53[Obtain certificates using a Route53 DNS TXT record]'
'--dns-sakuracloud[Obtain certificates using a Sakura Cloud DNS TXT record]'
)
;|
(renew|reconfigure)
opts+=(
'--pre-hook[Command to be run before obtaining any certificates]:pre_hook'
'--post-hook[Command to be run after attempting to obtain/renew certificates]:post_hook'
)
;|
(renew)
opts+=(
'(--force-renewal --renew-by-default)'{--force-renewal,--renew-by-default}'[renew now regardless of whether it is near expiry]'
'--disable-hook-validation[Disable command validation for hook commands]'
"--no-directory-hooks[Disable running executables found in Certbot's hook directories]"
'--disable-renew-updates[Disable automatic updates to your server configuration]'
'--no-autorenew[Disable auto renewal of certificates]'
)
;|
(enhance)
opts+=(
'--redirect[Automatically redirect all HTTP traffic to HTTPS]'
'--hsts[Add Strict-Transport-Security header to every HTTP response]'
'--uir[Add "Content-Security-Policy: upgrade-insecure-requests" header to every HTTP response]'
'--auto-hsts[Gradually increasing max-age value for HTTP Strict Transport Security security header]'
)
;|
(revoke)
opts+=(
'--reason[Specify reason for revoking certificates]:reason:(unspecified keycompromise affiliationchanged superseded cessationofoperation)'
'(--delete-after-revoke --no-delete-after-revoke)--delete-after-revoke[Delete certificates after revoking them]'
'(--delete-after-revoke --no-delete-after-revoke)--no-delete-after-revoke[Do not delete certificates after revoking them]'
'--key-path[Path to private key for certificates instructions or revocation]:key_path:_files'
)
;|
(reconfigure)
opts+=(
'(-a --authenticator)'{-a,--authenticator}'[Authenticator plugin name]:plugin'
'(-i --installer)'{-i,--installer}'[Installer plugin name]:plugin'
)
;|
(register|unregister|update_account)
opts+=(
'(-m --email)'{-m,--email}'[Email used for registration and recovery contact]:email')
;|
(register|update_account)
opts+=(
'(--eff-email --no-eff-email)--eff-email[Share your e-mail address with EFF]'
'(--eff-email --no-eff-email)--no-eff-email[Do not share your email address with EFF]'
)
;|
(unregister)
opts+=(
'--account[Account ID to use]:account_id'
)
;|
(show_account)
opts+=(
'--server[ACME Directory Resource URI]:server'
)
;|
esac
_arguments "$opts[@]" && ret=0
;;
esac
return ret
}
(( $+functions[_certbot_subcommands] )) ||
_certbot_subcommands() {
local -a commands=(
"run:Obtain & install a certificate in your current webserver"
"certonly:Obtain or renew a certificate, but do not install it"
"renew:Renew all previously obtained certificates that are near"
"enhance:Add security enhancements to your existing configuration"
"certificates:Display information about certificates you have from Certbot"
"revoke:Revoke a certificate (supply --cert-name or --cert-path)"
"delete:Delete a certificate (supply --cert-name)"
"reconfigure:Update a certificate's configuration (supply --cert-name)"
"register:Create an ACME account"
"unregister:Deactivate an ACME account"
"update_account:Update an ACME account"
"show_account:Display account details"
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_certbot_help_topics] )) ||
_certbot_help_topics() {
local -a topics=(
# topics
all automation commands paths security testing
# subcommands
run certonly renew enhance certificates revoke delete reconfigure register unregister
update_account show_account
# plugins
nginx apache standalone webroot
)
_values topics $topics
}
_certbot "$@"
# 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

742
src/_cf

File diff suppressed because it is too large Load Diff

65
src/_chatblade Normal file
View File

@ -0,0 +1,65 @@
#compdef chatblade
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for chatblade 0.7.0 (https://github.com/npiv/chatblade)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Johannes Bittner (https://github.com/johannes87)
#
# ------------------------------------------------------------------------------
_chatblade() {
local -a args
local context state state_descr line
typeset -A opt_args
args+=(
'(- *)'{-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'
'--temperature[temperature (openai setting)]:temperature'
'(-c --chat-gpt)'{-c,--chat-gpt}'[chat GPT model 3.5/4 shorthand or full qualified model name, can also be set via env variable OPENAI_API_MODEL]:chat GPT model:(3.5 4 4o mini o1 o1mini)'
'(-i --interactive)'{-i,--interactive}'[start an interactive chat session. This will implicitly continue the conversation]'
'(-s --stream)'{-s,--stream}'[Stream the incoming text to the terminal]'
'(-t --tokens)'{-t,--tokens}'[display what *would* be sent, how many tokens, and estimated costs]'
'(-p --prompt-file)'{-p,--prompt-file}'[prompt name - will load the prompt with that name at ~/.config/chatblade/name or a path to a file]:prompt file:_files'
'(-e --extract)'{-e,--extract}'[extract content from response if possible (either json or code block)]'
'(-r --raw)'{-r,--raw}'[print session as pure text, dont pretty print or format]'
'(-n --no-format)'{-n,--no-format}'[do not add pretty print formatting to output]'
'(-o --only)'{-o,--only}'[Only display the response, omit query]'
'--theme[Set the theme for syntax highlighting see https://pygments.org/styles/, can also be set with CHATBLADE_THEME]:theme:_values "theme" default emacs friendly manni monokai'
'(-l --last)'{-l,--last}'[alias for -S last, the default session if none is specified]'
'(-S --session)'{-S,--session}'[initiate or continue named session]:session:->sessions'
'--session-list[list sessions]'
'--session-path[show path to session file]'
'--session-dump[dump session to stdout]'
'--session-delete[delete session]'
'--session-rename[rename session]:new session:->sessions'
)
_arguments -s $args
case $state in
(sessions)
local -a sessions
sessions=("${(@f)$(chatblade --session-list)}")
_describe 'session' sessions
;;
esac
}
_chatblade
# 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

53
src/_chcpu Normal file
View File

@ -0,0 +1,53 @@
#compdef chcpu
# ------------------------------------------------------------------------------
# Copyright (c) 2025 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 chcpu v2.41 (https://github.com/util-linux/util-linux)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_arguments \
'(- *)'{-h,--help}'[display help]' \
'(- *)'{-V,--version}'[display version]' \
'(-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]'
# 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

@ -1,73 +0,0 @@
#compdef cheat
# ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for Cheat an interactive cheatsheets on the command-line. (https://github.com/chrisallenlane/cheat/).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Jindřich Pilař (https://github.com/JindrichPilar)
#
# ------------------------------------------------------------------------------
local cheats
_cheat_load_cheats() {
cheats=("${(f)$(cheat -l | cut -d' ' -f1)}")
}
_cheat() {
_arguments -C -s -S -n \
'(- 1 *)'{-d,--directories}'[List directories on CHEATPATH]: :->full' \
'(- 1 *)'{-e,--edit}'[Edit cheatsheet]:cheat:->cheats' \
'(- 1 *)'{-l,--list}'[List cheatsheets]: :->full' \
'(- 1 *)'{-s,--search}'[Search cheatsheets for <keyword>]: :->full' \
'(- 1 *)'{-v,--version}'[display version and copyright information]: :->full' \
case "$state" in
(full)
;;
(cheats)
_cheat_load_cheats
_describe -t cheats 'cheats' cheats
;;
(*)
_cheat_load_cheats
_describe -t cheats 'cheats' cheats
;;
esac
}
_cheat

68
src/_chmem Normal file
View File

@ -0,0 +1,68 @@
#compdef chmem
# ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for chmem, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# - configure memory
#
# Author:
# *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]' \
'(-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]' \
${arg}
# 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

@ -1,6 +1,6 @@
#compdef choc #compdef choc
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2012 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2012 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for choc (http://chocolatapp.com) # Completion script for choc (https://chocolatapp.com/)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors

52
src/_chpasswd Normal file
View File

@ -0,0 +1,52 @@
#compdef chpasswd
# ------------------------------------------------------------------------------
# Copyright (c) 2025 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 chpasswd v4.17 (https://github.com/shadow-maint/shadow)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_arguments \
'(- *)'{-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]' \
'(-R --root)'{-R,--root}'[apply changes in the specified CHROOT_DIR directory]:dir:_files -/' \
'(-P --prefix)'{-P,--prefix}'[apply changes to configuration files under the specified directory PREFIX_DIR]:dir:_files -/' \
'(-s --sha-rounds)'{-s,--sha-rounds}'[use the specified number of rounds to encrypt the passwords]:rounds'
# 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

@ -33,17 +33,17 @@
# or submit itself to any jurisdiction. # or submit itself to any jurisdiction.
_arguments \ _arguments \
"--user-data-dir=[Specify the directory that user data is kept in]:directory:_path_files -/" \ "--user-data-dir=[Specify the directory that user data is kept in]:directory:_path_files -/" \
"--app=[Runs URL in app mode]:url:_urls" \ "--app=[Runs URL in app mode]:url:_urls" \
"--incognito[Open in incognito mode]" \ "--incognito[Open in incognito mode]" \
"--new-window[open in new window]" \ "--new-window[open in new window]" \
"(--no-proxy-server --proxy-auto-detect --proxy-pac-url --password-store)--proxy-server=[specify proxy server]:[<proxy-scheme>\://]<proxy-host>[\:<proxy-port>]:_chromium_proxyurls" \ "(--no-proxy-server --proxy-auto-detect --proxy-pac-url)--proxy-server=[specify proxy server]:[<proxy-scheme>\://]<proxy-host>[\:<proxy-port>]:_chromium_proxyurls" \
"--no-proxy-server[Disables the proxy server]" \ "--no-proxy-server[Disables the proxy server]" \
"--proxy-auto-detect[Autodetect proxy configuration]" \ "--proxy-auto-detect[Autodetect proxy configuration]" \
"--proxy-pac-url=[Specify proxy autoconfiguration URL]:proxy autoconfiguration url:_urls" \ "--proxy-pac-url=[Specify proxy autoconfiguration URL]:proxy autoconfiguration url:_urls" \
"--password-store=[Set the password store to use]:password store: _wanted arguments expl 'wallet store' compadd -- basic gnome kwallet" \ "--password-store=[Set the password store to use]:password store: _wanted arguments expl 'wallet store' compadd -- basic gnome kwallet" \
"--version[print version]" \ "--version[print version]" \
"*:: :{ _alternative _urls _files }" '*:: :{ _alternative "urls\:url\:_urls" "file\:file\:_files" }'
# excerpt from the chromium help message: # excerpt from the chromium help message:
# #
@ -84,128 +84,136 @@ _arguments \
_chromium_proxyurls () { _chromium_proxyurls () {
#TODO: semicolon separated urls not yet implemented #TODO: semicolon separated urls not yet implemented
# mostly copied from _urls # mostly copied from _urls
local ipre scheme host user uhosts ret=1 expl match glob suf local ipre scheme host user uhosts ret=1 expl match glob suf
local localhttp local localhttp
zstyle -a ":completion:${curcontext}:urls" local localhttp zstyle -a ":completion:${curcontext}:urls" local localhttp
local localhttp_servername="$localhttp[1]" local localhttp_servername="$localhttp[1]"
local localhttp_documentroot="$localhttp[2]" local localhttp_documentroot="$localhttp[2]"
local localhttp_userdir="$localhttp[3]" local localhttp_userdir="$localhttp[3]"
zstyle -a ":completion:${curcontext}:urls" urls urls zstyle -a ":completion:${curcontext}:urls" urls urls
if [[ $#urls -gt 1 || ( $#urls -eq 1 && ! -d $urls[1] ) ]] if [[ $#urls -gt 1 || ( $#urls -eq 1 && ! -d $urls[1] ) ]]
then then
[[ $#urls -eq 1 && -f $urls[1] ]] && urls=($(< $urls[1])) [[ $#urls -eq 1 && -f $urls[1] ]] && urls=($(< $urls[1]))
_wanted urls expl 'URL' compadd "$@" -a urls && return 0 _wanted urls expl 'URL' compadd "$@" -a urls && return 0
urls=() urls=()
fi fi
urls="$urls[1]" urls="$urls[1]"
glob=(-g '*(^/)') glob=(-g '*(^/)')
zparseopts -D -K -E 'g:=glob' zparseopts -D -K -E 'g:=glob'
ipre="$IPREFIX" ipre="$IPREFIX"
if ! compset -P '(#b)([-+.a-z0-9]#):' if ! compset -P '(#b)([-+.a-z0-9]#):'
then then
_tags -C argument prefixes _tags -C argument prefixes
while _tags while _tags
do do
while _next_label prefixes expl 'URL prefix' -S '' "$@" while _next_label prefixes expl 'URL prefix' -S '' "$@"
do do
compset -S '[^:/]*' && compstate[to_end]='' compset -S '[^:/]*' && compstate[to_end]=''
compadd "$expl[@]" http:// socks:// socks4:// socks5:// && ret=0 compadd "$expl[@]" http:// socks:// socks4:// socks5:// && ret=0
done done
(( ret )) || return 0 (( ret )) || return 0
done done
return 1 return 1
fi fi
scheme="$match[1]" scheme="$match[1]"
case "$scheme" in case "$scheme" in
(http(|s)|socks(|4|5)) if ! compset -P // (http(|s)|socks(|4|5)) if ! compset -P //
then then
_wanted -C "$scheme" prefixes expl 'end of prefix' compadd -S '' "$@" // _wanted -C "$scheme" prefixes expl 'end of prefix' compadd -S '' "$@" //
return return
fi ;; fi ;;
(file) [[ -prefix //(127.0.0.1|localhost)/ ]] && compset -P '//(127.0.0.1|localhost)' (file) [[ -prefix //(127.0.0.1|localhost)/ ]] && compset -P '//(127.0.0.1|localhost)'
[[ -prefix /// ]] && compset -P // [[ -prefix /// ]] && compset -P //
if ! compset -P // if ! compset -P //
then then
_tags -C file files _tags -C file files
while _tags while _tags
do do
while _next_label files expl 'local file' while _next_label files expl 'local file'
do do
if [[ -prefix / ]] if [[ -prefix / ]]
then then
_path_files "$expl[@]" -S '' "${glob[@]}" && ret=0 _path_files "$expl[@]" -S '' "${glob[@]}" && ret=0
_path_files "$expl[@]" -S/ -r '/' -/ && ret=0 _path_files "$expl[@]" -S/ -r '/' -/ && ret=0
elif [[ -z "$PREFIX" ]] elif [[ -z "$PREFIX" ]]
then then
compadd -S '/' -r '/' "$expl[@]" "$@" - "${PWD%/}" && ret=0 compadd -S '/' -r '/' "$expl[@]" "$@" - "${PWD%/}" && ret=0
fi fi
done done
(( ret )) || return 0 (( ret )) || return 0
done done
return 1 return 1
fi ;; fi ;;
esac esac
if ! compset -P '(#b)([^:/]#)([:/])' if ! compset -P '(#b)([^:/]#)([:/])'
then then
uhosts=($urls/$scheme/$PREFIX*$SUFFIX(/:t)) uhosts=($urls/$scheme/$PREFIX*$SUFFIX(/:t))
_tags hosts _tags hosts
while _tags while _tags
do do
while _next_label hosts expl host while _next_label hosts expl host
do do
compset -S '[:/]*' || suf="/" compset -S '[:/]*' || suf="/"
(( $#uhosts )) || _hosts -S "$suf" -r '/:' "$expl[@]" && ret=0 (( $#uhosts )) || _hosts -S "$suf" -r '/:' "$expl[@]" && ret=0
[[ "$scheme" = http ]] && uhosts=($uhosts $localhttp_servername) [[ "$scheme" = http ]] && uhosts=($uhosts $localhttp_servername)
compadd -S "$suf" -r '/:' "$expl[@]" -a uhosts && ret=0 compadd -S "$suf" -r '/:' "$expl[@]" -a uhosts && ret=0
done done
(( ret )) || return 0 (( ret )) || return 0
done done
return 1 return 1
fi fi
host="$match[1]" host="$match[1]"
[[ $match[2] = ':' ]] && ! compset -P '<->/' && _message -e ports 'port number' && return 0 [[ $match[2] = ':' ]] && ! compset -P '<->/' && _message -e ports 'port number' && return 0
_tags remote-files files || return 1 _tags remote-files files || return 1
if [[ "$localhttp_servername" = "$host" ]] if [[ "$localhttp_servername" = "$host" ]]
then then
if compset -P \~ if compset -P \~
then then
if ! compset -P '(#b)([^/]#)/' if ! compset -P '(#b)([^/]#)/'
then then
_users -S/ "$@" _users -S/ "$@"
return return
fi fi
user="$match[1]" user="$match[1]"
while _tags while _tags
do do
while _next_label files expl 'local file' while _next_label files expl 'local file'
do do
_path_files "$expl[@]" "$@" -W ~$user/$localhttp_userdir "${glob[@]}" && ret=0 _path_files "$expl[@]" "$@" -W ~$user/$localhttp_userdir "${glob[@]}" && ret=0
_path_files -S/ -r '/' "$expl[@]" -W ~$user/$localhttp_userdir-/ && ret=0 _path_files -S/ -r '/' "$expl[@]" -W ~$user/$localhttp_userdir-/ && ret=0
done done
(( ret )) || return 0 (( ret )) || return 0
done done
else else
while _tags while _tags
do do
while _next_label files expl 'local file' while _next_label files expl 'local file'
do do
_path_files "$expl[@]" "$@" -W $localhttp_documentroot "${glob[@]}" && ret=0 _path_files "$expl[@]" "$@" -W $localhttp_documentroot "${glob[@]}" && ret=0
_path_files -S/ -r '/' "$expl[@]" -W $localhttp_documentroot -/ && ret=0 _path_files -S/ -r '/' "$expl[@]" -W $localhttp_documentroot -/ && ret=0
done done
(( ret )) || return 0 (( ret )) || return 0
done done
fi fi
else else
while _tags while _tags
do do
(( $#urls )) && while _next_label files expl 'local file' (( $#urls )) && while _next_label files expl 'local file'
do do
_path_files "$expl[@]" "$@" -W $urls/$scheme/$host "${glob[@]}" && ret=0 _path_files "$expl[@]" "$@" -W $urls/$scheme/$host "${glob[@]}" && ret=0
_path_files -S/ -r '/' "$expl[@]" -W $urls/$scheme/$host -/ && ret=0 _path_files -S/ -r '/' "$expl[@]" -W $urls/$scheme/$host -/ && ret=0
done done
[[ $scheme = (scp|sftp) ]] && _requested remote-files && _remote_files -h $host -- ssh && ret=0 [[ $scheme = (scp|sftp) ]] && _requested remote-files && _remote_files -h $host -- ssh && ret=0
(( ret )) || return 0 (( ret )) || return 0
done done
fi fi
return $ret 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

66
src/_clang-check Normal file
View File

@ -0,0 +1,66 @@
#compdef clang-check
# ------------------------------------------------------------------------------
# Copyright (c) 2022 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 clang-check v20.1.2 (https://clang.llvm.org/docs/ClangCheck.html)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_arguments \
'(- *)--help[Display available options]' \
'(- *)--help-hidden[Display available more options]' \
'(- *)--help-list[Display list of available options]' \
'(- *)--help-list-hidden[Display list of more available options]' \
'(- *)--version[Display the version of this program]' \
'--analyze[Run static analysis engine]' \
'--analyzer-output-path=[Write output to file]: :_files' \
'--ast-dump[Build ASTs and then debug dump them]' \
'--ast-dump-filter=[Use with -ast-dump or -ast-print to dump/print only AST declaration nodes having a certain substring]:string' \
'--ast-list[Build ASTs and print the list of declaration node qualified names]' \
'--ast-print[Build ASTs and then pretty-print them]' \
'*--extra-arg=[Additional argument to append to the compiler command line]:arg' \
'*--extra-arg-before=[Additional argument to prepend to the compiler command line]:arg' \
'--fix-what-you-can[Apply fix-it advice even in the presence of unfixable errors]' \
'--fixit[Apply fix-it advice to the input source]' \
'-p[Build directory where compile_commands.json is]: :_files -/' \
'--print-all-options[Print all option values after command line parsing]' \
'--print-options[Print non-default options after command line parsing]' \
'--syntax-tree-dump[dump the syntax tree]' \
'--tokens-dump[dump the preprocessed tokens]' \
'*: :_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

77
src/_clang-format Normal file
View File

@ -0,0 +1,77 @@
#compdef clang-format
# ------------------------------------------------------------------------------
# Copyright (c) 2022 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 clang-format v20.1.2 (https://clang.llvm.org/docs/ClangFormat.html)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
local -a styles=(LLVM GNU Google Chromium Microsoft)
_arguments \
'(- *)--help[Display available options]' \
'(- *)--help-hidden[Display available more options]' \
'(- *)--help-list[Display list of available options]' \
'(- *)--help-list-hidden[Display list of more available options]' \
'--Wclang-format-violations[Warnings about individual formatting changes needed]' \
'--Werror=[If set, changes formatting warnings to errors]' \
'*--Wno-error=[If set, do not error out on the specified warning type]:warn' \
'--assume-filename=[Set filename used to determine the language and to find .clang-format file]: :_files' \
'--cursor=[The position of the cursor when invoking clang-format from an editor integration]:pos' \
'(-n --dry-run)'{-n,--dry-run}'[If set, do not actually make the formatting changes]' \
'--dump-config[Dump configuration options to stdout and exit]' \
'--fail-on-incomplete-format[If set, fail with exit code 1 on incomplete format]' \
'--fallback-style=[The name of the predefined style used as a fallback]: :($styles)' \
'--ferror-limit=[Set the maximum number of clang-format errors to emit before stopping]:limit' \
'*--files=[Provide a list of files to run clang-format]: :_files' \
'--fno-color-diagnostics[If set, not to print diagnostics in color]' \
'-i[Inplace edit files, if specified]' \
'--length=[Format a range of this length(in bytes)]:bytes' \
'--lines=[format a range of lines]:format' \
'--list-ignored[List ignored files]' \
'--offset=[Format a range starting at this byte offset]' \
'--output-replacements-xml[Output replacements as XML]' \
'--print-all-options[Print all option values after command line parsing]' \
'--print-options[Print non default options after command line parsing]' \
'--qualifier-alignment=[If set, overrides the qualifier alignment style determined by the QualifierAlignment style flag]' \
'--sort-includes[If set, overrides the include sorting behavior determined by the SortIncludes style flag]' \
'--style=[Set coding style]: :($styles)' \
'--verbose[If set, show the list of processed files]' \
'(- *)--version[Display the version of this program]' \
'*: :_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

83
src/_clang-tidy Normal file
View File

@ -0,0 +1,83 @@
#compdef clang-tidy
# ------------------------------------------------------------------------------
# Copyright (c) 2022 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 clang-tidy v15.0.2 (https://clang.llvm.org/extra/clang-tidy/)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
local -a styles=(LLVM GNU Google Chromium Microsoft)
_arguments \
'(- *)--help[Display available options]' \
'(- *)--help-hidden[Display available more options]' \
'(- *)--help-list[Display list of available options]' \
'(- *)--help-list-hidden[Display list of more available options]' \
'--allow-no-checks[Allow empty enabled checks]' \
'--checks=[Comma-separated list of globs with optional "-" prefix]:checks' \
'--config=[Specifies a configuration in YAML/JSON format]:conf' \
'--config-file=[Specify the path of .clang-tidy or custom config-file]: :_files' \
'--dump-config[Dumps configuration in the YAML format to stdout]' \
'--enable-check-profile[Enable per-check timing profiles, and print a report to stderr]' \
'--enable-module-headers-parsing[Enable preprocessor-level module header parsing for C++20 and above]' \
'--exclude-header-filter=[Regular expression of headers to exclude diagnostics from]:filter' \
'--explain-config[For each enabled check explains, where it is enabled]' \
'--export-fixes=[YAML file to store suggested fixes in]: :_files' \
'*--extra-arg[Additional argument to append to the compiler command line]:arg' \
'*--extra-arg-before[Additional argument to prepend to the compiler command line]:arg' \
'--fix[Apply suggested fixes]' \
'--fix-errors[Apply suggested fixes even if compilation errors were found]' \
'--fix-notes[If a warning has no fix, but a single fix can be found through an associated diagnostic node, apply the fix]' \
'--format-style=[Style for formatting code around applied fixes]: :(none file llvm google webkit mozilla)' \
'--header-filter=[Regular expression matching the names of the headers to output diagnostics from]:regexp' \
'--line-filter=[List of files with line ranges to filter the warnings]' \
'(- *)--list-checks[List all enabled checks and exit]' \
'--load=[Load the specified plugin]: :_files' \
'-p[Build directory where compile_commands.json is]: :_files -/' \
'--print-all-options[Print all option values after command line parsing]' \
'--print-options[Print non default options after command line parsing]' \
'--quiet[Run clang-tidy in quiet mode]' \
'--store-check-profile=[These per-TU profiles are instead stored as JSON]:prefix' \
'--system-headers[Display the errors from system headers]' \
'--use-color[Use colors in diagnostics]' \
'(- *)--version[Display the version of this program]' \
'--verify-config[Check the config files to ensure each check and option is recognized]' \
'--vfsoverlay=[Overlay the virtual filesystem described by file over the real file system]: :_files' \
'--warnings-as-errors=[Upgrades warning to errors]:check' \
'*: :_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

@ -1,6 +1,6 @@
#compdef cmake -value-,CMAKE_GENERATOR,-default- #compdef cmake -value-,CMAKE_GENERATOR,-default-
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2017 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for CMake (http://www.cmake.org). # Completion script for CMake 4.3.0 (https://cmake.org).
# #
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# Authors # Authors
@ -36,6 +36,7 @@
# #
# * Scott M. Kroll <skroll@gmail.com> (initial version) # * Scott M. Kroll <skroll@gmail.com> (initial version)
# * Paul Seyfert <pseyfert.mathphys@gmail.com> (handling of --build and updates) # * Paul Seyfert <pseyfert.mathphys@gmail.com> (handling of --build and updates)
# * Norbert Lange <nolange79@gmail.com> (presets, command mode, updates)
# #
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# Notes # Notes
@ -50,32 +51,77 @@
# #
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
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 -/'
'-C[Pre-load a script to populate the cache]:initial cache:_files'
'*-D-[Create a cmake cache entry]:property:_cmake_define_property'
'*-U[Remove matching entries from CMake cache]:globbing expression'
'-G[Specify a makefile generator]:generator:_cmake_generators'
'-T[Specify toolset name if supported by generator]:toolset name'
'-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'
local cmake_build_options;cmake_build_options=( # Warnings
'-C[Pre-load a script to populate the cache]:script:_files' '(-Wdev)-Wno-dev[Suppress/Enable developer warnings]'
'*-D-[Create a CMake cache entry]:property:_cmake_define_property' '(-Wno-dev)-Wdev[Suppress/Enable developer warnings]'
'-U[Remove matching entries from CMake cache]:globbing expression' '(-Wdeprecated)-Wno-deprecated[Suppress/Enable deprecation warnings]'
'-G[Specify a Makefile generator]:generator:_cmake_generators' '(-Wno-deprecated)-Wdeprecated[Suppress/Enable deprecation warnings]'
'-T[Specify toolset name if supported by generator]:toolset name' '(-Werror=dev)-Wno-error=dev[Make developer warnings (not) errors]'
'(-Wno-dev -Wdev)-Wno-dev[Suppress/Enable developer warnings]' '(-Wno-error=dev)-Werror=dev[Make developer warnings (not) errors]'
'(-Wno-dev -Wdev)-Wdev[Suppress/Enable developer warnings]' '(-Wno-error=deprecated)-Werror=deprecated[Make deprecated macro and function warnings (not) errors]'
'(-Wno-deprecated -Wdeprecated)-Wno-deprecated[Suppress/Enable deprecation warnings]' '(-Werror=deprecated)-Wno-error=deprecated[Make deprecated macro and function warnings (not) errors]'
'(-Wno-deprecated -Wdeprecated)-Wdeprecated[Suppress/Enable deprecation warnings]'
'(-Wno-error=dev -Werror=dev)-Wno-error=dev[Make developer warnings (not) errors]' '--preset=[Specify a configure preset]:preset:_cmake_presets'
'(-Wno-error=dev -Werror=dev)-Werror=dev[Make developer warnings (not) errors]' '--list-presets[List available presets]'
'(-Wno-error=deprecated -Werror=deprecated)-Werror=deprecated[Make deprecated macro and function warnings (not) errors]' '--workflow[Run a workflow preset]'
'(-Wno-error=deprecated -Werror=deprecated)-Wno-error=deprecated[Make deprecated macro and function warnings (not) errors]'
'--warn-uninitialized[Warn about uninitialized values.]' '-E[CMake command mode]:command:_cmake_commands'
'--warn-unused-vars[Warn about unused variables.]'
'--no-warn-unused-cli[Don'\''t warn about command line options.]' '-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]"'
'-i[Run in wizard mode]' '--fresh[Configure a fresh build tree, removing any existing cache file]'
'-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]"'
'--trace[Put cmake in trace mode]' '--build[Build a CMake-generated project binary tree]::project directory:_path_files -/'
'--trace-redirect=[redirect trace output to file]:trace file:_files' '--install[Install a CMake-generated project binary tree]:project directory:_path_files -/'
'--log-level=[only print messages at or above the specified log level]:loglevel:(ERROR WARNING NOTICE STATUS VERBOSE DEBUG TRACE)' '--open[Open generated project in the associated application]:project directory:_path_files -/'
'--find-package[Run in pkg-config like mode.]'
':cmake project:_files -/' '-N[View mode only]'
'-P[Process script mode]:script:_files'
'--find-package[Legacy pkg-config like mode. Do not use]'
'--graphviz=[Generate graphviz of dependencies, see CMakeGraphVizOptions.cmake for more]:graphviz output:_files'
'--system-information[Dump information about this system]::system information output:_files'
'--print-config-dir[Print CMake config directory for user-wide FileAPI queries]'
'--log-level=[Set the verbosity of messages from CMake files]:log level:(ERROR WARNING NOTICE STATUS VERBOSE DEBUG TRACE)'
'--log-context[Prepend log messages with context, if given]'
'--debug-trycompile[Do not delete the try_compile build tree. Only useful on one try_compile at a time]'
'--debug-output[Put cmake in a debug mode]'
'--debug-find[Put cmake find in a debug mode]'
'--debug-find-pkg=[Limit cmake debug-find to the comma-separated list of packages]:packages'
'--debug-find-var=[Limit cmake debug-find to the comma-separated list of result variables]:variables'
'(--trace-expand)--trace[Put cmake in trace mode]'
'(--trace)--trace-expand[Put cmake in trace mode with variable expansion]'
'--trace-format=[Set the output format of the trace]:trace format:(human json-v1)'
'*--trace-source[Trace only this CMake file/module. Multiple options allowed]:filename:_files'
'--trace-redirect[Redirect trace output to a file instead of stderr]:trace output:_files'
'--warn-uninitialized[Warn about uninitialized values]'
'--no-warn-unused-cli[Do not warn about command line 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'
':cmake project:_path_files -/'
) )
# ------------------------ # ------------------------
@ -98,29 +144,37 @@ _cmake_generator_options() {
fi fi
} }
# --------------
# _cmake_presets
# --------------
(( $+functions[_cmake_presets] )) ||
_cmake_presets() {
local invoke=(${(Q)words})
invoke[$CURRENT]=()
# TODO: remove all arguments -* except -S
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')"})
_describe 'presets' list_presets
}
# -------------- # --------------
# _cmake_targets # _cmake_targets
# -------------- # --------------
(( $+functions[_cmake_targets] )) || (( $+functions[_cmake_targets] )) ||
_cmake_targets() { _cmake_targets() {
local -a targets local dir="$1"
if [ -f $1/Makefile ] local -a targets=()
then if [[ -f "${dir}/Makefile" && $+commands[make] ]]; then
# `make help` doesn't work for Makefiles in general, but for CMake generated Makefiles it does. # `make help` doesn't work for Makefiles in general, but for CMake generated Makefiles it does.
i=1 targets=(${(f)"$(make -f $dir/Makefile help 2>/dev/null | awk '/^\.\.\./ { print $2 }')"})
for target in $(make help | \grep -e "\.\.\." | sed "s/\.\.\. //" | sed "s/ (the default.*//") ; do elif [[ -f "${dir}/build.ninja" && $+commands[ninja] ]]; then
targets[$i]=$target
(( i = $i + 1 ))
done
elif [ -f $1/build.ninja ]
then
# `ninja help` doesn't seem to be the list of targets we're interested in # `ninja help` doesn't seem to be the list of targets we're interested in
i=1 targets=(${(f)"$(ninja -C $dir -t targets all 2>/dev/null | awk -F: '{print $1}' )"})
for target in $(ninja -C $1 -t targets all 2&>/dev/null | awk -F: '{print $1}') ; do
targets[$i]="$target"
(( i++ ))
done
fi fi
_describe 'build targets' targets _describe 'build targets' targets
} }
@ -133,60 +187,69 @@ _cmake_suggest_installdirs() {
} }
_cmake_on_build() { _cmake_on_build() {
local build_extras;build_extras=( local build_extras=(
'--[Native build tool options]' '--[Native build tool options]'
'--target[specify build target]' '--target[specify build target]'
'--clean-first[build target clean first]' '--clean-first[build target clean first]'
'--config[For multi-configuration tools]' '--config[For multi-configuration tools]'
'--parallel[maximum number of build processes]' '--parallel[maximum number of build processes]'
'--use-stderr') '--use-stderr'
)
local -a undescribed_build_extras local -a undescribed_build_extras
i=1 local i=1
for be in $build_extras ; do for be in $build_extras ; do
undescribed_build_extras[$i]=$(echo $be | sed "s/\[.*//") undescribed_build_extras[$i]=$(echo $be | sed "s/\[.*//")
(( i++ )) (( i++ ))
done 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 for ((i = (($CURRENT - 1)); i > 1 ; i--)); do
if [[ $words[$i] == --build ]] ; then if [[ $words[$i] == --build ]]; then
inbuild=true in_build=true
buildat=$i build_at=$i
(( difference = $CURRENT - $i )) (( difference = $CURRENT - $i ))
elif [[ $words[$i] == -- ]] ; then elif [[ $words[$i] == -- ]]; then
dashdashposition=$i dash_dash_position=$i
fi fi
done done
# check if build mode has been left # check if build mode has been left
outofbuild=false local out_of_build=false
for ((i = (($CURRENT - 1)); i > (($buildat + 1)); i--)); do for ((i = (($CURRENT - 1)); i > (($build_at + 1)); i--)); do
# don't check the word after --build (should be a directory) # don't check the word after --build (should be a directory)
if [[ ${undescribed_build_extras[(r)$words[$i]]} == $words[$i] ]] ; then continue ; fi if [[ ${undescribed_build_extras[(r)$words[$i]]} == $words[$i] ]]; then
if [[ $words[(($i - 1))] == --target ]] ; then continue ; fi continue
if [[ $words[(($i - 1))] == --config ]] ; then continue ; fi 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 if [[ $words[(($i - 1))] == --parallel ]] ; then continue ; fi
outofbuild=true out_of_build=true
done 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 fi
if [[ "$inbuild" == false || "$difference" -eq 1 ]] ; then
if [[ "$in_build" == false || "$difference" -eq 1 ]] ; then
# either there is no --build or completing the directory after --build # either there is no --build or completing the directory after --build
_arguments -C -s \ _arguments -s \
- build_opts \ - build_opts \
"$cmake_build_options[@]" \ "$cmake_build_options[@]" \
- build_cmds \ - build_cmds \
"$cmake_suggest_build[@]" && return 0 "$cmake_suggest_build[@]" && return 0
elif [[ $words[(($CURRENT - 1))] == --target ]] ; then elif [[ $words[(($CURRENT - 1))] == --target ]] ; then
# after --build <dir> --target, suggest targets # 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 elif [[ $words[(($CURRENT - 1))] == --config ]] ; then
# after --build <dir> --config, no idea # after --build <dir> --config, no idea
return 0 return 0
elif [[ $words[(($CURRENT - 1))] == --parallel ]] ; then elif [[ $words[(($CURRENT - 1))] == --parallel ]] ; then
# after --build <dir> --parallel # after --build <dir> --parallel
return 0 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) # after --build <dir> --<not a --build option>, suggest other cmake_build_options (like -Wno-dev)
_arguments "$cmake_build_options[@]" && return 0 _arguments "$cmake_build_options[@]" && return 0
else else
@ -196,45 +259,51 @@ _cmake_on_build() {
} }
_cmake_on_install() { _cmake_on_install() {
local build_extras;build_extras=( local build_extras=(
'--[Native build tool options]' '--[Native build tool options]'
'--prefix[Override the installation prefix, CMAKE_INSTALL_PREFIX]' '--prefix[Override the installation prefix, CMAKE_INSTALL_PREFIX]'
'--config[For multi-configuration generators(e.g. Visual Studio)]' '--config[For multi-configuration generators(e.g. Visual Studio)]'
'--component[Component-based install]' '--component[Component-based install]'
'--strip[Strip before installing.]' '--strip[Strip before installing.]'
) )
local -a undescribed_build_extras local -a undescribed_build_extras
i=1 local i=1
for be in $build_extras ; do for be in $build_extras ; do
undescribed_build_extras[$i]=$(echo $be | sed "s/\[.*//") undescribed_build_extras[$i]=$(echo $be | sed "s/\[.*//")
(( i++ )) (( i++ ))
done 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 for ((i = (($CURRENT - 1)); i > 1 ; i--)); do
if [[ $words[$i] == --install ]] ; then if [[ $words[$i] == --install ]]; then
inbuild=true in_build=true
buildat=$i build_at=$i
(( difference = $CURRENT - $i )) (( difference = $CURRENT - $i ))
elif [[ $words[$i] == -- ]] ; then elif [[ $words[$i] == -- ]]; then
dashdashposition=$i dash_dash_position=$i
fi fi
done 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) # don't check the word after --install (should be a directory)
if [[ ${undescribed_build_extras[(r)$words[$i]]} == $words[$i] ]] ; then continue ; fi if [[ ${undescribed_build_extras[(r)$words[$i]]} == $words[$i] ]] ; then continue ; fi
if [[ $words[(($i - 1))] == --prefix ]] ; then continue ; fi if [[ $words[(($i - 1))] == --prefix ]]; then continue ; fi
if [[ $words[(($i - 1))] == --config ]] ; then continue ; fi if [[ $words[(($i - 1))] == --config ]]; then continue ; fi
if [[ $words[(($i - 1))] == --component ]] ; then continue ; fi if [[ $words[(($i - 1))] == --component ]]; then continue ; fi
outofbuild=true out_of_build=true
done 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 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 # either there is no --install or completing the directory after --install
_arguments -C -s \ _arguments -s \
- build_opts \ - build_opts \
"$cmake_build_options[@]" \ "$cmake_build_options[@]" \
- build_cmds \ - build_cmds \
@ -248,7 +317,7 @@ _cmake_on_install() {
elif [[ $words[(($CURRENT - 1))] == --component ]] ; then elif [[ $words[(($CURRENT - 1))] == --component ]] ; then
# after --build <dir> --component, no idea # after --build <dir> --component, no idea
return 0 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) # after --build <dir> --<not a --build option>, suggest other cmake_build_options (like -Wno-dev)
_arguments "$cmake_build_options[@]" && return 0 _arguments "$cmake_build_options[@]" && return 0
else else
@ -257,74 +326,47 @@ _cmake_on_install() {
fi fi
} }
local cmake_help_actions;cmake_help_actions=( local -a cmake_help_actions=(
'(- 1)--help-command[Print help for a single command and exit]:command-name:_cmake_command_names' '(- 1)'{--help,-help,-usage,-h,-H}'[Print usage information and exit]'
'(- 1)--help-command-list[List available listfile commands and exit]' '(- 1)'{--version,-version}'[Print version number and exit]'
'(- 1)--help-commands[Print help for all commands and exit]' '(- 1)--help-full[Print all help manuals and exit]'
'(- 1)--help-compatcommands[Print help for compatibility commands]' '(- 1)--help-manual[Print one help manual and exit]:module-name: _cmake_list_names --help-manual-list "manual name"'
'(- 1)--help-module[Print help for compatibility commands]:module-name:_cmake_module_names' '(- 1)--help-manual-list[List help manuals available and exit]'
'(- 1)--help-module-list[Print help for a single module and exit]' '(- 1)--help-command[Print help for one command and exit]:command-name: _cmake_list_names --help-command-list "command name"'
'(- 1)--help-modules[Print help for all modules and exit]' '(- 1)--help-command-list[List commands with help available and exit]'
'(- 1)--help-property[List available properties and exit]:property-name:_cmake_property_names' '(- 1)--help-commands[Print cmake-commands manual and exit]'
'(- 1)--help-property-list[List available properties and exit]' '(- 1)--help-module[Print help for one module and exit]:module-name: _cmake_list_names --help-module-list "module name"'
'(- 1)--help-properties[Print help for all properties and exit]' '(- 1)--help-module-list[List modules with help available and exit]'
'(- 1)--help-variable[Print help for a single variable and exit]:variable-name:_cmake_variable_names' '(- 1)--help-modules[Print cmake-modules manual and exit]'
'(- 1)--help-variable-list[List documented variables and exit]' '(- 1)--help-policy[Print help for one policy and exit]:policy-name: _cmake_list_names --help-policy-list "policy name"'
'(- 1)--help-variables[Print help for all variables and exit]' '(- 1)--help-policy-list[List policies with help available and exit]'
'(- 1)--copyright[Print the CMake copyright and exit]' '(- 1)--help-policies[Print cmake-policies manual and exit]'
'(- 1)'{--help,-help,-usage,-h,-H}'[Print usage information and exit]' '(- 1)--help-property[Print help for one property and exit]:property-name: _cmake_list_names --help-property-list "property name" brakremove'
'(- 1)--help-full[Print full help and exit]' '(- 1)--help-property-list[List properties with help available and exit]'
'(- 1)--help-html[Print full help in HTML format]' '(- 1)--help-properties[Print cmake-properties manual and exit]'
'(- 1)--help-man[Print full help as a UNIX man page and exit]' '(- 1)--help-variable[Print help for one variable and exit]:variable-name: _cmake_list_names --help-variable-list "variable name" brakremove'
'(- 1)'{--version,-version}'[Print full help as a UNIX man page and exit]' '(- 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_command_names
# -------------------
(( $+functions[_cmake_command_names] )) ||
_cmake_command_names() {
local command_names; command_names=(${(f)"$($service --help-command-list 2> /dev/null)"})
_values 'command name' ${command_names[@]:1} && return 0
}
# ----------------- # -----------------
# _cmake_list_names # _cmake_list_names
# ----------------- # -----------------
(( $+functions[_cmake_list_names] )) || (( $+functions[_cmake_list_names] )) ||
_cmake_list_names() { _cmake_list_names() {
local command; command="$@[1]" local command="$@[1]"
local desc; desc="$@[2]" local desc="$@[2]"
local list_names; list_names=(${(f)"$($service $command 2> /dev/null | sed -e 's/\[/\\\[/' -e 's/\]/\\\]/')"}) 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*})
_values ${desc} ${list_names[@]:1} && return 0 if [[ ${opts[(i)brakremove]} -le ${#opts} ]]; then
} list_names=(${^list_names//\[/\\\[})
list_names=(${^list_names//\]/\\\]})
fi
# ------------------ _values ${desc} ${list_names[@]:-1} && return 0
# _cmake_module_names
# ------------------
(( $+functions[_cmake_module_names] )) ||
_cmake_module_names() {
_cmake_list_names '--help-module-list' 'module name' && return 0
}
# --------------------
# _cmake_property_names
# --------------------
(( $+functions[_cmake_property_names] )) ||
_cmake_property_names() {
_cmake_list_names '--help-property-list' 'property name' && return 0
}
# ---------------------
# _cmake_variable_names
# ---------------------
(( $+functions[_cmake_variable_names] )) ||
_cmake_variable_names() {
_cmake_list_names '--help-variable-list' 'variable name' && return 0
} }
# ---------------------- # ----------------------
@ -344,7 +386,7 @@ _cmake_define_property() {
# ---------------------------- # ----------------------------
(( $+functions[_cmake_define_property_names] )) || (( $+functions[_cmake_define_property_names] )) ||
_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=' 'common-property-names:common property name:_cmake_define_common_property_names -qS='
) )
local -A cmake_langs local -A cmake_langs
@ -364,8 +406,9 @@ _cmake_define_property_names() {
# --------------------------------- # ---------------------------------
(( $+functions[_cmake_define_lang_property_names] )) || (( $+functions[_cmake_define_lang_property_names] )) ||
_cmake_define_lang_property_names() { _cmake_define_lang_property_names() {
local cmake_lang="$@[-2]" cmake_lang_desc="$@[-1]" local cmake_lang="$@[-2]"
local properties; properties=( local cmake_lang_desc="$@[-1]"
local -a properties=(
"CMAKE_${cmake_lang}_COMPILER:${cmake_lang_desc} compiler" "CMAKE_${cmake_lang}_COMPILER:${cmake_lang_desc} compiler"
"CMAKE_${cmake_lang}_COMPILER_LAUNCHER:${cmake_lang_desc} compiler launcher (e.g. ccache)" "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" "CMAKE_${cmake_lang}_FLAGS:${cmake_lang_desc} compiler flags for all builds"
@ -386,10 +429,11 @@ _cmake_define_lang_property_names() {
# ----------------------------------- # -----------------------------------
(( $+functions[_cmake_define_common_property_names] )) || (( $+functions[_cmake_define_common_property_names] )) ||
_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_MODULE_PATH:Search path for CMake modules (FindPROJECT.cmake)'
'CMAKE_PREFIX_PATH:Search path for installations (PROJECTConfig.cmake)' 'CMAKE_PREFIX_PATH:Search path for installations (PROJECTConfig.cmake)'
'CMAKE_BUILD_TYPE:Specifies the build type for make based generators' 'CMAKE_BUILD_TYPE:Specifies the build type for make based generators'
'BUILD_SHARED_LIBS:Global flag to cause add_library() to create shared libraries if on'
'CMAKE_TOOLCHAIN_FILE:Absolute or relative path to a CMake script which sets up toolchain related variables' 'CMAKE_TOOLCHAIN_FILE:Absolute or relative path to a CMake script which sets up toolchain related variables'
'CMAKE_COLOR_MAKEFILE:Enables/disables color output when using the Makefile generator' 'CMAKE_COLOR_MAKEFILE:Enables/disables color output when using the Makefile generator'
'CMAKE_INSTALL_PREFIX:Install directory used by install' 'CMAKE_INSTALL_PREFIX:Install directory used by install'
@ -399,7 +443,7 @@ _cmake_define_common_property_names() {
'CMAKE_UNITY_BUILD:Batch include source files' '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 "$@"
} }
# ---------------------------- # ----------------------------
@ -408,86 +452,75 @@ _cmake_define_common_property_names() {
(( $+functions[_cmake_define_property_values] )) || (( $+functions[_cmake_define_property_values] )) ||
_cmake_define_property_values() { _cmake_define_property_values() {
local ret=1 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 setopt localoptions extendedglob
case $@[-1] in case $@[-1] in
(CMAKE_BUILD_TYPE) _wanted build-types expl 'build type' _cmake_build_types && ret=0;; (CMAKE_BUILD_TYPE)
(CMAKE_CXX_STANDARD) _wanted cxx-standards expl 'cxx standard' _cmake_cxx_standars && ret=0;; _wanted build-types expl 'build type' _values 'build type' ${build_types[@]} && ret=0
(CMAKE_C_STANDARD) _wanted c-standards expl 'c standard' _cmake_c_standars && ret=0;; ;;
(CMAKE_TOOLCHAIN_FILE) _wanted toolchain-files expl 'file' _cmake_toolchain_files && ret=0;; (BUILD_SHARED_LIBS)
(CMAKE_COLOR_MAKEFILE) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;; _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_CXX_STANDARD)
(CMAKE_UNITY_BUILD) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;; _wanted cxx-standards expl 'cxx standard' _values 'cxx standard' ${cxx_standards[@]} && ret=0
(CMAKE_INSTALL_PREFIX) _files -/ && ret=0;; ;;
(CMAKE_EXPORT_COMPILE_COMMANDS) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;; (CMAKE_C_STANDARD)
(CMAKE_*_COMPILER) _wanted compilers expl 'compiler' _cmake_compilers && ret=0;; _wanted c-standards expl 'c standard' _values 'c standard' ${c_standards[@]} && 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_TOOLCHAIN_FILE)
(CMAKE_*_STANDARD_REQUIRED) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;; _wanted toolchain-files expl 'file' _cmake_toolchain_files && ret=0
(CMAKE_*_EXTENSIONS) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;; ;;
(*) _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 esac
return ret return ret
} }
# ------------------
# _cmake_build_types
# ------------------
(( $+functions[_cmake_build_types] )) ||
_cmake_build_types() {
local build_types; build_types=(
'Debug'
'Release'
'RelWithDebInfo'
'MinSizeRel'
)
_values 'build type' ${build_types[@]}
}
# -------------------
# _cmake_c_standars
# -------------------
(( $+functions[_cmake_c_standars] )) ||
_cmake_c_standars() {
local c_standards; c_standards=(
'90'
'99'
'11'
)
_values 'c standard' ${c_standards[@]}
}
# -------------------
# _cmake_cxx_standars
# -------------------
(( $+functions[_cmake_cxx_standars] )) ||
_cmake_cxx_standars() {
local cxx_standards; cxx_standards=(
'98'
'11'
'14'
'17'
)
_values 'cxx standard' ${cxx_standards[@]}
}
# ----------------- # -----------------
# _cmake_generators # _cmake_generators
# ----------------- # -----------------
(( $+functions[_cmake_generators] )) || (( $+functions[_cmake_generators] )) ||
_cmake_generators() { _cmake_generators() {
local generators; generators=( local -a generators=(
'Unix Makefiles' ${(f)"$(cmake --help | awk '/^Generators/{flag=1} flag && /^[* ] [^ ]/ {sub(/^[* ] /, ""); sub(/=.*$/, ""); sub(/\[arch\]/, ""); sub(/ *$/, ""); print}')"}
'Ninja'
'CodeBlocks - Ninja'
'CodeBlocks - Unix Makefiles'
'Eclipse CDT4 - Ninja'
'Eclipse CDT4 - Unix Makefiles'
'KDevelop3'
'KDevelop3 - Unix Makefiles'
'Sublime Text 2 - Ninja'
'Sublime Text 2 - Unix Makefiles'
) )
_describe -t generators 'generator' generators _describe -t generators 'generator' generators
@ -501,16 +534,9 @@ _cmake_toolchain_files() {
_files -g '*\.cmake*' _files -g '*\.cmake*'
} }
# ---------------
# _cmake_booleans
# ---------------
(( $+functions[_cmake_booleans] )) || (( $+functions[_cmake_booleans] )) ||
_cmake_booleans() { _cmake_booleans() {
local booleans; booleans=( _values booleans 'YES' 'NO'
'YES'
'NO'
)
_describe -t booleans 'boolean' booleans
} }
# --------------- # ---------------
@ -534,42 +560,82 @@ _cmake_launchers() {
_command_names -e _command_names -e
} }
local cmake_command_actions;cmake_command_actions=( (( $+functions[_cmake_commands] )) ||
'-E[CMake command mode]:*:command' _cmake_commands() {
) local -a commands=(
_cmake_command() { 'capabilities:Report capabilities built into cmake in JSON format'
_arguments -C -s - command "$cmake_command_actions[@]" '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'
)
_describe -t commands 'command' commands
} }
local cmake_suggest_build;cmake_suggest_build=( local -a cmake_suggest_build=(
'--build[build]:build dir:_cmake_suggest_builddirs' '--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' '--install[install]:install dir:_cmake_suggest_installdirs'
) )
if [[ "$service" = -value-*CMAKE_GENERATOR* ]]; then if [[ "$service" = -value-*CMAKE_GENERATOR* ]]; then
_cmake_generators _cmake_generators
elif [ $CURRENT -eq 2 ] ; then elif [ $CURRENT -eq 2 ] ; then
_arguments -C -s \ _arguments -s \
- help \ - help \
"$cmake_help_actions[@]" \ "$cmake_help_actions[@]" \
- command \ - command \
"$cmake_command_actions[@]" \ '-E[CMake command mode]:command:_cmake_commands' \
- build_opts \ - build_opts \
"$cmake_build_options[@]" \ "$cmake_build_options[@]" \
- build_cmds \ - build_cmds \
"$cmake_suggest_build[@]" \ "$cmake_suggest_build[@]" \
- install_cmds \ - install_cmds \
"$cmake_suggest_install[@]" && return 0 "$cmake_suggest_install[@]" && return 0
elif [[ $words[2] = --help* ]] ; then
_cmake_help
#elif [[ $words[2] != -E ]] ; then
elif [[ $words[2] == --build ]] ; then elif [[ $words[2] == --build ]] ; then
_cmake_on_build _cmake_on_build
elif [[ $words[2] == --install ]] ; then elif [[ $words[2] == --install ]] ; then
_cmake_on_install _cmake_on_install
elif [[ $words[2] == --help-* ]] ; then
_arguments "$cmake_help_actions[@]"
else else
_cmake_command _arguments "$cmake_build_options[@]"
fi 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

@ -1,6 +1,6 @@
#compdef coffee #compdef coffee
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2011 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for Coffee.js v0.6.11 (http://coffeejs.org) # Completion script for Coffee.js v2.7.0 (https://coffeescript.org/)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -39,34 +39,29 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
local curcontext="$curcontext" state line ret=1 version opts first second third local curcontext="$curcontext" state line ret=1
typeset -A opt_args typeset -A opt_args
version=(${(f)"$(_call_program version $words[1] --version)"})
version=${${(z)${version[1]}}[3]}
first=$(echo $version|cut -d '.' -f 1)
second=$(echo $version|cut -d '.' -f 2)
third=$(echo $version|cut -d '.' -f 3)
if (( $first < 2 )) && (( $second < 7 )) && (( $third < 3 ));then
opts+=('(-l --lint)'{-l,--lint}'[pipe the compiled JavaScript through JavaScript Lint]'
'(-r --require)'{-r,--require}'[require a library before executing your script]:library')
fi
_arguments -s -S \
_arguments -C \ '--ast[generate an abstract syntax tree of nodes]' \
'(- *)'{-h,--help}'[display this help message]' \
'(- *)'{-v,--version}'[display the version number]' \
$opts \
'(-b --bare)'{-b,--bare}'[compile without a top-level function wrapper]' \ '(-b --bare)'{-b,--bare}'[compile without a top-level function wrapper]' \
'(-e --eval)'{-e,--eval}'[pass a string from the command line as input]:Inline Script' \
'(-i --interactive)'{-i,--interactive}'[run an interactive CoffeeScript REPL]' \
'(-j --join)'{-j,--join}'[concatenate the source CoffeeScript before compiling]:Destination JS file:_files -g "*.js"' \
'(--nodejs)--nodejs[pass options directly to the "node" binary]' \
'(-c --compile)'{-c,--compile}'[compile to JavaScript and save as .js files]' \ '(-c --compile)'{-c,--compile}'[compile to JavaScript and save as .js files]' \
'(-o --output)'{-o,--output}'[set the output directory for compiled JavaScript]:Output Directory:_files -/' \ '(-e --eval)'{-e,--eval}'[pass a string from the command line as input]:Inline Script' \
'(-n -t -p)'{-n,--nodes}'[print out the parse tree that the parser produces]' \ '(- *)'{-h,--help}'[display help message]' \
'(-n -t -p)'{-p,--print}'[print out the compiled JavaScript]' \ '(-i --interactive)'{-i,--interactive}'[run an interactive CoffeeScript REPL]' \
'(-n -t -p)'{-t,--tokens}'[print out the tokens that the lexer/rewriter produce]' \ '(-j --join)'{-j,--join}'[concatenate the source CoffeeScript before compiling]: :_files -g "*.coffee"' \
'(-l --literate)'{-l,--literate}'[treat stdio as literate style coffeescript]' \
'(-m --map)'{-m,--map}'[generate source map and save as .js.map files]' \
'(-M --inline-map)'{-M,--inline-map}'[generate source map and include it directly in output]' \
'(-n --nodes)'{-n,--nodes}'[print out the parse tree that the parser produces]' \
'--nodejs[pass options directly to the "node" binary]' \
'(-o --output)'{-o,--output}'[set the output directory for compiled JavaScript]: :_files' \
'(-p --print --tokens)'{-p,--print}'[print out the compiled JavaScript]' \
'(-r --require)'\*{-r,--require}'[require the given module before eval or REPL]:module' \
'(-s --stdio)'{-s,--stdio}'[listen for and compile scripts over stdio]' \ '(-s --stdio)'{-s,--stdio}'[listen for and compile scripts over stdio]' \
'(-t --transpile)'{-t,--transpile}'[pipe generated JavaScript through Babel]' \
'(-p --print --tokens)--tokens[print out the tokens that the lexer/rewriter produce]' \
'(- *)'{-v,--version}'[display the version number]' \
'(-w --watch)'{-w,--watch}'[watch scripts for changes and rerun commands]' \ '(-w --watch)'{-w,--watch}'[watch scripts for changes and rerun commands]' \
'*:script or directory:_files' && ret=0 '*:script or directory:_files' && ret=0

1100
src/_conan

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,64 +0,0 @@
#compdef console
# ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for symfony console (https://github.com/symfony/Console).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * loranger (https://github.com/loranger)
# * Yohan Tambè (https://github.com/Cronos87)
#
# ------------------------------------------------------------------------------
_find_console () {
echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)"
}
_console_get_command_list () {
IFS=" "
`_find_console` --no-ansi | \
sed "1,/Available commands/d" | \
awk '/ [a-z]+/ { print $0 }' | \
sed -E 's/^[ ]+//g' | \
sed -E 's/[:]+/\\:/g' | \
sed -E 's/[ ]{2,}/\:/g'
}
_console () {
local -a commands
IFS=$'\n'
commands=(`_console_get_command_list`)
_describe 'commands' commands
}
compdef _console php console
compdef _console console

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

@ -1,6 +1,6 @@
#compdef cppcheck #compdef cppcheck
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2019 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2019 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for cppcheck -- a tool for static C/C++ code analysis (http://cppcheck.sourceforge.net) # Completion script for cppcheck -- a tool for static C/C++ code analysis (https://cppcheck.sourceforge.io/)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -40,7 +40,7 @@
# Notes # Notes
# ----- # -----
# #
# Created for Cppcheck version 1.90. # Created for Cppcheck version 2.17.1 (https://github.com/danmar/cppcheck)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -49,58 +49,72 @@ _cppcheck_files() {
} }
_cppcheck() { _cppcheck() {
local curcontext="$curcontext" state line local check_ids='(all warning style performance portability information unusedFunction missingInclude)'
typeset -A opt_args local platforms='(unix32 unix64 win32A win32W win64 avr8 elbrus-e1cp pic8 pic8-enhanced pic16 mips32 native unspecified)'
local coding_standards='(normal autosar cert-c-2016 cert-cpp-2016 misra-c-2012 misra-c-2023 misra-cpp-2008 misra-cpp-2023)'
_arguments -C \ _arguments \
"--addon=[Execute addon]" \ "--addon=[Execute addon]" \
"--addon-python=[Specify the python interpreter]: :_files" \
"--cppcheck-build-dir=[Analysis output directory]:directory:_files -/" \ "--cppcheck-build-dir=[Analysis output directory]:directory:_files -/" \
"--check-config[Check cppcheck configuration]" \ "--check-config[Check cppcheck configuration]" \
"--check-level=[Configure how much valueflow analysis you want]:level:(reduced normal exhaustive)" \
"--check-library[Show information when library files have incomplete info]" \ "--check-library[Show information when library files have incomplete info]" \
"--checkers-report=[Write a report of all the active checkers to the given file]:file:_files" \
"--clang=[Use clang parser instead of the builtin Cppcheck parser]: :_files" \
"--config-exclude=[Path to be excluded from configuration checking]:directory:_files -/" \ "--config-exclude=[Path to be excluded from configuration checking]:directory:_files -/" \
"--config-exclude-files=[A file that contains a list of config-excludes]:file:_files" \ "--config-exclude-files=[A file that contains a list of config-excludes]:file:_files" \
"--doc[Print a list of all available checks]" \ "--doc[Print a list of all available checks]" \
"*--disable=[Disable individual checks]:id:$check_ids" \
"--dump[Dump xml data for each translation unit]" \ "--dump[Dump xml data for each translation unit]" \
"-D[Define preprocessor symbol]" \ "-D[Define preprocessor symbol]" \
"-U[Undefine preprocessor symbol]" \
"-E[Print preprocessor output on stdout and don't do any further processing]" \ "-E[Print preprocessor output on stdout and don't do any further processing]" \
"--enable[Enable additional checks]:id:(all warning style performance portability information unusedFunction missingInclude)" \ "--enable=[Enable additional checks]:id:$check_ids" \
"--error-exitcode=[Integer to return if errors are found]" \ "--error-exitcode=[Integer to return if errors are found]" \
"--errorlist[Print a list of all the error messages in XML format]" \ "--errorlist[Print a list of all the error messages in XML format]" \
"--exitcode-suppressions=[Used when certain messages should be displayed but should not cause a non-zero exitcode]:_files" \ "--exitcode-suppressions=[Used when certain messages should be displayed but should not cause a non-zero exitcode]:_files" \
"--file-list=[Specify the files to check in a text file]:_files" \ "*--file-filter=[Analyze only those files matching the given filter str]:filter" \
{-f,--force}"[Force checking of all configurations in files]" \ "--file-list=[Specify the files to check in a text file]:file:_files" \
{-h,--help}"[Print this help]" \ "(-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 help]" \
"-I[A file that contains a list of config-excludes]:directory:_files -/" \ "-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-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" \ "--include=[Force inclusion of a file before the checked file]:file:_files" \
"-i[Give a source file or source file directory to exclude from the check]:directory or file:_files" \ "-i[Give a source file or source file directory to exclude from the check]:directory or file:_files" \
"--inconclusive[Report even though the analysis is inconclusive]" \ "--inconclusive[Report even though the analysis is inconclusive]" \
"--inline-suppr[Enable inline suppressions]" \ "--inline-suppr[Enable inline suppressions]" \
"-j[Number of threads to do the checking simultaneously]" \ "-j[Number of threads to do the checking simultaneously]::num" \
"-l[No new threads should be started if the load average is exceeds this value]" \ "-l[No new threads should be started if the load average is exceeds this value]::load_avg" \
{-x,--language=}"[Forces cppcheck to check all files as the given language]:language:(c c++)" \ {-x,--language=}"[Forces cppcheck to check all files as the given language]:language:(c c++)" \
"--cfg=[Load file that contains information about types and functions]" \ "--library=[Load config file that contains information about types and functions]:config:_files" \
"--max-ctu-depth=[Maximum depth in whole program analysis]" \
"--output-file=[File to save results]:file:_files" \
"--project=[Run Cppcheck on project]:file:_files" \
"--max-configs=[Maximum number of configurations to check in a file]" \ "--max-configs=[Maximum number of configurations to check in a file]" \
"--platform=[Set platform specific types and sizes]:platforms:(unix32 unix64 win32A win32W win64 native unspecified)" \ "--max-ctu-depth=[Maximum depth in whole program analysis]:num" \
"--plist-output=[Generate Clang-plist output files in folder]:_files" \ "--output-file=[File to save results]:file:_files" \
{-q,--quiet}"[Do not show progress reports]" \ "--output-format=[Specify the output format]:format:(text sarif xml)" \
{-rp,--relative-paths}"[Use relative paths in output]" \ "--platform=[Specified platform specific types and sizes]:platform:$platforms" \
{-rp,--relative-paths}"=[Use relative paths in output (separated with ;)]:_files" \ "--plist-output=[Generate Clang-plist output files in folder]:file:_files" \
"--project=[Run Cppcheck on project]:file:_files" \
"--project-configuration=[Limit the configuration cppcheck should check]:configuration" \
"(-q --quiet)"{-q,--quiet}"[Do not show progress reports]" \
{-rp,--relative-paths}"=[Use relative paths in output (separated with ;)]:file:_files" \
"--report-progress[Report progress messages while checking a file]" \ "--report-progress[Report progress messages while checking a file]" \
"--report-type=[Add guideline and classification fields for specified coding standard]:standard:$coding_standards" \
"--rule=[Match regular expression]:rule" \
"--rule-file=[Use given rule file]:file:_files" \
"--showtime=[show timing information]:type:(none file file-total summary top5_file top5_summary top5)" \
"--std=[Set standard]:std:(c89 c99 c11 c++03 c++11 c++14 c++17 c++20)" \ "--std=[Set standard]:std:(c89 c99 c11 c++03 c++11 c++14 c++17 c++20)" \
"--suppress=[Suppress warnings (format: \[error id\]:\[filename\]:\[line\])]" \ "--suppress=[Suppress warnings (format: \[error id\]:\[filename\]:\[line\])]" \
"--suppressions-list=[Suppress warnings listed in the file]:_files" \ "--suppressions-list=[Suppress warnings listed in the file]:file:_files" \
"--suppress-xml=[Suppress warnings listed in a xml file]:file:_files" \
"--template=[Format the error messages]" \ "--template=[Format the error messages]" \
"--template=[Format the error message location]" \ "--template-location=[Format the error message location]" \
{-v,--verbose}"[Output more detailed error information]" \ "*-U[Undefine preprocessor symbol]:symbol" \
"(-v --verbose)"{-v,--verbose}"[Output more detailed error information]" \
"--version[Print out version number]" \ "--version[Print out version number]" \
"--xml[Write results in xml format to stderr]" \ "--xml[Write results in xml format to stderr]" \
"--xml-version=[Select the XML file version]" \ "*: :_cppcheck_files"
'*: :_cppcheck_files'
} }
_cppcheck "$@" _cppcheck "$@"
@ -112,4 +126,3 @@ _cppcheck "$@"
# sh-basic-offset: 2 # sh-basic-offset: 2
# End: # End:
# vim: ft=zsh sw=2 ts=2 et # vim: ft=zsh sw=2 ts=2 et

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

@ -1,6 +1,6 @@
#compdef dad #compdef dad
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -39,30 +39,37 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_dad() { _dad() {
local -a commands typeset -A opt_args
local context state line
local curcontext="$curcontext"
commands=( local -a commands=(
"start:Start aria2c daemon" "start:Start aria2c daemon"
"stop:Stop aria2c daemon" "stop:Stop aria2c daemon"
) )
_arguments -C \ _arguments -C \
'(- 1 *)'-h"[Show help and exit]" \ '(- 1 *)'-h"[Show help and exit]" \
"-d[Set download dir]:download_dir:->val" \ "-d[Set download dir]:download_dir:->val" \
"-s[Set secret token]:secret_token:->val" \ "-s[Set secret token]:secret_token:->val" \
"-u[Set aria2c username]:username:->val" \ "-u[Set aria2c username]:username:->val" \
"-p[Set aria2c password]:password:->val" \ "-p[Set aria2c password]:password:->val" \
'1:cmd:->cmds' \ '1:cmd:->cmds' \
'*: : :->args' \ '*: :->args'
case "$state" in case "$state" in
(cmds) (cmds)
_describe -t commands 'commands' commands _describe -t commands 'commands' commands
;; ;;
(*) esac
;;
esac
} }
_dad _dad
# 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

739
src/_dart Normal file
View File

@ -0,0 +1,739 @@
#compdef dart
# ------------------------------------------------------------------------------
# Copyright (c) 2023 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 dart 3.11.0 (https://dart.dev/)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_dart() {
typeset -A opt_args
local context state line
local curcontext="$curcontext"
local ret=1
_arguments -C -A "-*" \
'(-v --verbose)'{-v,--verbose}'[Show additional command output]' \
'(- *)--version[Print the Dart SDK version]' \
'(--enable-analytics --disable-analytics --suppress-analytics)--enable-analytics[Enable analytics]' \
'(--enable-analytics --disable-analytics --suppress-analytics)--disable-analytics[Disable analytics]' \
'(--enable-analytics --disable-analytics --suppress-analytics)--suppress-analytics[Disallow analytics for this "dart *" run without changing the analytics configuration]' \
'(- *)'{-h,--help}'[Print this usage information]' \
'1: :_dart_subcommands' \
'*::arg:->args' \
&& ret=0
case "$state" in
(args)
case $words[1] in
(help)
_arguments \
'(- *)'{-h,--help}'[Print this usage information]' \
'1: :_dart_subcommands' \
&& ret=0
;;
(analyze)
_arguments \
'(- *)'{-h,--help}'[Print this usage information]' \
'--fatal-infos[Treat info level issues as fatal]' \
'(--no-fatal-warnings --fatal-warnings)--fatal-warnings[Treat warnings level issue as fatal]' \
'(--no-fatal-warnings --fatal-warnings)--no-fatal-warnings[Do not treat warnings level issue as fatal]' \
'*: :_files -/' \
&& ret=0
;;
(compile)
_dart_compile && ret=0
;;
(create)
_arguments \
'(- *)'{-h,--help}'[Print this usage information]' \
'(-t --template)'{-t,--template}'[The project template to use]:template:(cli console package server-shelf web)' \
'(--no-pub --pub)--pub[Run "pub get" after the project has been created]' \
'(--no-pub --pub)--no-pub[Do not run "pub get" after the project has been created]' \
'--force[Force project generation even if the target directory already exists]' \
'*: :_files -/' \
&& ret=0
;;
(devtools)
_arguments \
'(- *)'{-h,--help}'[Print this usage information]' \
'(- *)--version[Prints the DevTools version]' \
'--host=[Hostname to serve DevTools on(defaults to localhost)]:host' \
'--port=[Port to serve DevTools on, specify 0 to automatically use any available port(defaults to 9100)]:port' \
'--dtd-uri=[A URI pointing to a Dart Tooling Daemon]:uri' \
'(--no-launch-browser --launch-browser)--launch-browser[Launches DevTools in a browser immediately at start]' \
'(--no-launch-browser --launch-browser)--no-launch-browser[Do not launches DevTools in a browser immediately at start]' \
'--machine[Sets output format to JSON for consumption in tools]' \
'--record-memory-profile=[Start devtools headlessly and write memory profiling samples to the indicated file]:file:_files' \
'--app-size-base=[Path to the base app size file used for app size]' \
'(--no-disable-cors --disable-cors)--disable-cors[Disable CORS]' \
'(--no-disable-cors --disable-cors)--no-disable-cors[Do not disable CORS]' \
'*:server_uri :' \
&& ret=0
;;
(doc)
_arguments \
'(- *)'{-h,--help}'[Print this usage information]' \
'(-o --output)'{-o,--output=}'[Configuration the output directory(defaults to "doc/api")]:dir:_files -/' \
'(--dry-run)--validate-links[Display warnings for broken links]' \
'(--validate-links)--dry-run[Try to generate the docs without saving them]' \
'*:dir:_files -/' \
&& ret=0
;;
(fix)
_arguments \
'(- *)'{-h,--help}'[Print this usage information]' \
'(-n --dry-run)'{-n,--dry-run}'[Preview the proposed changes but make no changes]' \
'--apply[Apply the proposed changes]' \
'--code=[Apply fixes for one or more diagnostics codes]:codes' \
'*: :_files' \
&& ret=0
;;
(format)
_arguments \
'(- *)'{-h,--help}'[Print this usage information]' \
'(-v --verbose)'{-v,--verbose}'[Show all options and flags with --help]' \
'(-o --output)'{-o,--output}'[Set where to write formatted output]:format:_dart_format_output' \
'--show[Set which filenames to print]:show type:(all changed none)' \
'--summary[Show the specified summary after formatting]:summary type:(line none profile)' \
'--set-exit-if-changed[Return exit code 1 if there are any formatting changes]' \
'--page-width[Try to keep lines no longer than this(defaults to 80)]:width' \
'--trailing-commas[How trailing commas in input affect formatting]:style:(automate preserve)' \
'(-i --indent)'{-i,--indent}'[Add this many spaces of leading indentation]' \
'--follow-links[Follow links to files and directories]' \
'(- *)--version[Show dart_style version]' \
'--enable-experiment[Enable one or more experimental features]:features' \
'--selection[Track selection through formatting]:selection' \
'--stdin-name[Use this path in error messages when input is read from stdin]:name' \
'*:file_or_directory:_files' \
&& ret=0
;;
(info)
_arguments \
'(- *)'{-h,--help}'[Print this usage information]' \
'(--no-remove-file-paths --remove-file-paths)--remove-file-paths[Remove file paths in displayed information]' \
'(--no-remove-file-paths --remove-file-paths)--no-remove-file-paths[Do not remove file paths in displayed information]' \
'*: :_files' \
&& ret=0
;;
(pub)
_dart_pub && ret=0
;;
(run)
_arguments \
'(- *)'{-h,--help}'[Print this usage information]' \
'(-r --resident)'{-r,--resident}'[Enable faster startup times with the resident frontend compiler]' \
'--resident-compiler-info-file[The path to an info file to use to communicate with a resident frontend compiler]:file:_files' \
'--observe=[Specify debug port and bind address]:port_address' \
'--enable-vm-service=[Enable the VM service and listens on the specified port for connections(default port 8181)]:port_address' \
'(--serve-devtools --no-serve-devtools)--serve-devtools[Serves an instance of the Dart DevTools debugger and profiler]' \
'(--serve-devtools --no-serve-devtools)--no-serve-devtools[Do not serve an instance of the Dart DevTools debugger and profiler]' \
'--pause-isolates-on-exit[Pause isolates on exit when running with --enable-vm-service]' \
'--pause-isolates-on-unhandled-exceptions[Pause isolates when an unhandled exception is encountered when running with --enable-vm-service]' \
'--warn-on-pause-with-no-debugger[Print a warning when an isolate pauses with no attached debugger when running with --enable-vm-service]' \
'--timeline-streams=[Enables recording for specific timeline streams]:stream:_dart_run_timeline_streams' \
'--pause-isolates-on-start[Pause isolates on start when running with --enable-vm-service]' \
'--profile-microtasks[Record information about each microtask]' \
'(--enable-asserts --no-enable-asserts)--enable-asserts[Enable assert statements]' \
'(--enable-asserts --no-enable-asserts)--no-enable-asserts[Do not enable assert statements]' \
'--timeline-recorder=[Selects the timeline recorder to use]:recorder:(none ring endless startup systrace file callback)' \
'--verbosity[Sets the verbosity level of the compilation]:level:(all error info warning)' \
'*'{-d,--define=}'[Define an environment declaration]:key_value:' \
'--disable-service-auth-codes[Disables the requirement for an authentication code]' \
'--enable-service-port-fallback[Use 0 if binding port is failed]' \
'--root-certs-file=[The path to a file containing the trusted root certificates]:file:_files' \
'--root-certs-cache=[The path to a cache directory containing the trusted root certificates]:file:_files -/' \
'--trace-loading[Enable tracing of library and script loading]' \
'--packages=[The path to the package resolution configuration file]:file:_files'\
'--write-service-info=[Outputs information necessary to connect to the VM service]:service_info:_files' \
'(--no-dds --dds)--dds[Use the Dart Development Service for enhanced debugging functionality]' \
'(--no-dds --dds)--no-dds[Not use the Dart Development Service for enhanced debugging functionality]' \
'(--no-serve-observatory --serve-observatory)--serve-observatory[Enable hosting Observatory throught the VM service]' \
'(--no-serve-observatory --serve-observatory)--no-serve-observatory[Disable hosting Observatory throught the VM service]' \
'(--no-print-dtd --print-dtd)--print-dtd[Prints connection details for the Dart Tooling Daemon]' \
'(--no-print-dtd --print-dtd)--no-print-dtd[Not print connection details for the Dart Tooling Daemon]' \
'--enable-experiment=[Enable one or more experimental features]:features:_dart_run_enable_experiment' \
'*: :_files' \
&& ret=0
;;
(test)
_arguments \
'(- *)'{-h,--help}'[Print this usage information]' \
'(- *)--version[Show the package:test version]' \
'*'{-n,--name}'[A substring of the name of the test to run]:name' \
'*'{-N,--plain-name}'[A plain-text substring of the name of the test to run]:plain_name' \
'*'{-t,--tags}'[Run only tests with all of the specified tags]:tag' \
'*'{-x,--exclude-tags}'[Do not run tests with any of the specified tags]:tag' \
'--run-skipped[Run skipped tests instead of skipping them]' \
'(-p --platform)'{-p,--platform}'[The platform on which to run the tests]:platform:(vm chrome firefox edge node experimental-chrome-wasm)' \
'(-c --compiler)'{-c,--compiler}'[The compiler to use to run tests]:compiler:(dart2js dart2wasm exe kernel source)' \
'(-P --preset)'{-P,--preset}'[The configuration preset to use]:preset' \
'(-j --concurrency)'{-j,--concurrency}'[The number of concurrent test suites run(defaults to 1)]:concurrency' \
'--total-shards[The total number of invocations of the test runner being run]:number' \
'--shard-index[The index of this test runner invocation]:index' \
'(--ignore-timeouts --timeout)--timeout[The default test timeout]:timeout' \
'(--ignore-timeouts --timeout)--ignore-timeouts[Ignore all timeouts]' \
'--pause-after-load[Pause for debugging before any tests execute]' \
'--debug[Run the VM and Chrome tests in debug mode]' \
'--coverage=[Gather coverage and output it to the specified directory]:dir:_files -/' \
'(--no-chain-stack-traces --chain-stack-traces)--chain-stack-traces[Use chained stack traces to provide greater exception]' \
'(--no-chain-stack-traces --chain-stack-traces)--no-chain-stack-traces[Do not use chained stack traces to provide greater exception]' \
'--no-retry[Do not rerun tests that have retry set]' \
'--test-randomize-ordering-seed[Use the specified seed to randomize the execution order of test cases]:seed' \
'(--no-fail-test --fail-test)--fail-test[Stop running tests after the first failure]' \
'(--no-fail-test --fail-test)--no-fail-test[Do not stop running tests after the first failure]' \
'(-r --reporter)'{-r,--reporter=}'[Set how to print test results]:reporter:_dart_test_reporter' \
'--file-reporter[Enable an additional reporter writing test results to a file]:reporter_file' \
'--verbose-trace[Emit stack traces with core library frames]' \
'--js-trace[Emit raw JavaScript stack traces for browser tests]' \
'(--color --no-color)--color[Use terminal colors]' \
'(--color --no-color)--no-color[Do not use terminal colors]' \
'*: :_files' \
&& ret=0
;;
esac
;;
esac
return ret
}
(( $+functions[_dart_compile] )) ||
_dart_compile() {
local ret=1
_arguments -C \
'(- *)'{-h,--help}'[Print this usage information]' \
'1: :_dart_compile_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
local -a opts=(
'(- *)'{-h,--help}'[Print this usage information]'
'(-o --output)'{-o,--output}'[Write the output to file]:output:_files'
)
case $words[1] in
(aot-snapshot|exe|jit-snapshot|kernel)
opts+=(
'--verbosity[Sets the verbosity level of the compilation]:level:(all error info warning)'
'(-p --packages)'{-p,--packages=}'[Get package locations from the specified file instead of .dart_tool/package_config.json]:config:_files'
)
;|
(aot-snapshot|exe|jit-snapshot|kernel|wasm)
opts+=(
'*'{-d,--define=}'[Define an environment declaration]:key_value:'
)
;|
(aot-snapshot|exe|kernel)
opts+=(
'--depfile=[Path to output Ninja depfile]:file:_files'
)
;|
(aot-snapshot|exe)
opts+=(
'(-S --save-debugging-info)'{-S,--save-debugging-info=}'[Remove debugging information from the output and save it separately to the specified file]:file:_files'
'--target-os[Compile to a specific target operating system]:os:(android fuchsia ios linux macos windows)'
)
;|
(aot-snapshot|wasm)
opts+=(
'--enable-asserts[Enable assert statements]'
)
;|
(kernel)
opts+=(
'(--no-link-platform --link-platform)--link-platform[Include the platform kernel in the resulting kernel file]'
'(--no-link-platform --link-platform)--no-link-platform[Do not include the platform kernel in the resulting kernel file]'
'(--no-embed-sources --embed-sources)--embed-sources[Embed source files in the generated kernel component]'
'(--no-embed-sources --embed-sources)--no-embed-sources[Do not embed source files in the generated kernel component]'
)
;|
(wasm)
opts+=(
'(--no-source-maps --source-maps)--source-maps[Generate a source map file]'
'(--no-source-maps --source-maps)--no-source-maps[Not generate a source map file]'
)
;;
(js)
opts+=(
'-O-[Set the compiler optimization level(defaults to -O1)]:level:(0 1 2 3 4)'
)
;;
esac
opts+=('*:entry_point:_files')
_arguments "$opts[@]" && ret=0
;;
esac
return $ret
}
(( $+functions[_dart_compile_subcommands] )) ||
_dart_compile_subcommands() {
local -a commands=(
"aot-snapshot:Compile Dart to an AOT snapshot"
"exe:Compile Dart to a self-contained executable"
"jit-snapshot:Compile Dart to a JIT snapshot"
"js:Compile Dart to JavaScript"
"kernel:Compile Dart to a kernel snapshot"
"wasm:Compile Dart to a WebAssembly/WasmGC module"
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_dart_format_output] )) ||
_dart_format_output() {
local -a outputs=(
"json:Print code and selection as JSON"
"none:Discard output"
"show:Print code to terminal"
"write:Overwrite formatted files on disk(default)"
)
_describe -t outputs 'output' outputs "$@"
}
(( $+functions[_dart_pub] )) ||
_dart_pub() {
local ret=1
_arguments -C \
'(- *)'{-h,--help}'[Print this usage information]' \
'(-v --verbose)'{-v,--verbose}'[Print detailed logging]' \
'(--color --no-color)--color[Use colors in terminal output]' \
'(--color --no-color)--no-color[Do not use colors in terminal output]' \
'(-C --directory)'{-C,--directory=}'[Run the subcommand in the directory]:dir:_files -/'\
'1: :_dart_pub_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
local -a opts=(
'(- *)'{-h,--help}'[Print this usage information]'
)
case $words[1] in
(add|downgrade|get|publish|remove|upgrade)
opts+=(
'(- *)'{-h,--help}'[Print this usage information]'
'(-n --dry-run)'{-n,--dry-run}'[Report what dependencies would change but do not change any]'
'(-C --directory)'{-C,--directory=}'[Run this in the directory]:dir:_files -/'
'*: :_files'
)
;|
(add|downgrade|get|upgrade)
opts+=(
'--offline[Use cached packages instead of accessing the network]'
)
;|
(add|get|remove|upgrade)
opts+=(
'--precompile[Build executables in immediate dependencies]'
'--no-example[Do not run "example/" if it exists]'
)
;|
(get)
opts+=(
'--enforce-lockfile[Enforce pubspec.lock]'
)
;|
(publish)
opts+=(
'(-f --force)'{-f,--force}'[Publish without confirmation if there are no errors]'
'--skip-validation[Publish without validation and resolution]'
'--ignore-warnings[Do not treat warnings as fatal]'
)
;|
(upgrade)
opts+=(
'--tighten[Updates lower bounds in pubspec.yaml to match the resolved version]'
'--unlock-transitive[Also upgrades the transitive dependencies of the listed dependencies]'
'--major-versions[Upgrades packages to their latest resolvable versions and updates pubspec.yaml]'
)
;|
(bump)
_dart_pub_bump && return 0
;;
(cache)
_dart_pub_cache && return 0
return 1
;;
(deps)
opts+=(
'(-s --style)'{-s,--style}'[How output should be displayed]:style:(compact tree list)'
'(--dev --no-dev)--dev[Include dev dependencies]'
'(--dev --no-dev)--no-dev[Do not include dev dependencies]'
'--executables[List all available executables]'
'--json[Output dependency information in a json format]'
'(-C --directory)'{-C,--directory=}'[Run this in the directory]:dir:_files -/'
)
;;
(global)
_dart_pub_global && return 0
return 1
;;
(outdated)
opts+=(
'(--no-dependency-overrides --dependency-overrides)--dependency-overrides[Show resolutions with "dependency_overrides"]'
'(--no-dependency-overrides --dependency-overrides)--no-dependency-overrides[Do not show resolutions with "dependency_overrides"]'
'(--no-dev-dependencies --dev-dependencies)--dev-dependencies[Take dev dependencies into account]'
'(--no-dev-dependencies --dev-dependencies)--no-dev-dependencies[Do not take dev dependencies into account]'
'--json[Output the results using a json format]'
'(--no-prereleased --prereleases)--prereleases[Include prereleases in latest version]'
'(--no-prereleased --prereleases)--no-prereleases[Do not include prereleases in latest version]'
'(--no-show-all --show-all)--show-all[Include dependencies that are already fulfilling --mode]'
'(--no-show-all --show-all)--no-show-all[Do not include dependencies that are already fulfilling --mode]'
'(--no-transitive --transitive)--transitive[Show transitive dependencies]'
'(--no-transitive --transitive)--no-transitive[Do not show transitive dependencies]'
'(-C --directory)'{-C,--directory=}'[Run this in the directory]:dir:_files -/' )
;;
(token)
_dart_pub_token && return 0
return 1
;;
esac
_arguments "$opts[@]" && ret=0
;;
esac
return $ret
}
(( $+functions[_dart_pub_subcommands] )) ||
_dart_pub_subcommands() {
local -a commands=(
"add:Add dependencies to 'pubspec.yaml'"
"bump:Increases the version number of the current package"
"cache:Work with the system cache"
"deps:Print package dependencies"
"downgrade:Downgrade the current package's dependencies to oldest versions"
"get:Get the current package's dependencies"
"global:Work with global packages"
"login:Log into pub.dev"
"logout:Log out of pub.dev"
"outdated:Analyze your dependencies to find which ones can be upgraded"
"publish:Publish the current package to pub.dev"
"remove:Removes dependencies from 'pubspec.yaml'"
"token:Manage authentication tokens for hosted pub repositories"
"unpack:Downloads a package and unpacks it in place"
"upgrade:Upgrade the current package's dependencies to latest versions"
"workspace:Work with the pub workspace"
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_dart_pub_bump] )) ||
_dart_pub_bump() {
local ret=1
_arguments -C \
'(- *)'{-h,--help}'[Print this usage information]' \
'1: :_dart_pub_bump_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
local -a opts=(
'(- *)'{-h,--help}'[Print this usage information]'
'(-n --dry-run)'{-n,--dry-run}'[Report what would change, but do not change anything]'
)
_arguments "$opts[@]" && ret=0
;;
esac
return $ret
}
(( $+functions[_dart_pub_bump_subcommands] )) ||
_dart_pub_bump_subcommands() {
local -a commands=(
'breaking:Increment to the next breaking version(eg. 0.1.2 -> 0.2.0)'
'major:Increment the major version number(eg. 3.1.2 -> 4.0.0)'
'minor:Increment the minor version number(eg. 3.1.2 -> 3.2.0)'
'patch:Increment the patch version number(eg. 3.1.2 -> 3.1.3)'
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_dart_pub_cache] )) ||
_dart_pub_cache() {
local ret=1
_arguments -C \
'(- *)'{-h,--help}'[Print this usage information]' \
'1: :_dart_pub_cache_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
local -a opts=(
'(- *)'{-h,--help}'[Print this usage information]'
'*: :_files'
)
case $words[1] in
(add)
opts+=(
'--all[Install all matching versions]'
'(-v --version)'{-v,--version}'[Version constraint]:version'
)
;;
(clean)
opts+=(
'(-f --force)'{-f,--force}'[Do not ask for confirmation]'
)
;;
esac
_arguments "$opts[@]" && ret=0
;;
esac
return $ret
}
(( $+functions[_dart_pub_cache_subcommands] )) ||
_dart_pub_cache_subcommands() {
local -a commands=(
"add:Install a package"
"clean:Clears the global PUB_CACHE"
"repair:Reinstall cached packages"
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_dart_pub_global] )) ||
_dart_pub_global() {
local ret=1
_arguments -C \
'(- *)'{-h,--help}'[Print this usage information]' \
'1: :_dart_pub_global_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
local -a opts=(
'(- *)'{-h,--help}'[Print this usage information]'
'*: :_files'
)
case $words[1] in
(activate)
opts+=(
'(-s --source)'{-s,--source}'[The source used to find the package]:source'
'--git-path[Path of git package in repository]:git_path'
'--git-ref[Git branch or commit to be retrieved]:git_ref'
'(-x --executable --noexecutables)--no-executables[Do not put executables on PATH]'
'(-x --executable --noexecutables)'{-x,--executable}'[Executable to place on PATH]'
'--overwrite[Overwrite executables from other packages with the same name]'
'(-u --hosted-url)'{-u,--hosted-url}'[A custom pub server URL for the package]:server'
)
;;
(run)
opts+=(
'(--enable-asserts --no-enable-asserts)--enable-asserts[Enable assert statements]'
'(--enable-asserts --no-enable-asserts)--no-enable-asserts[Do not enable assert statements]'
'*--enable-experiment=[Runs the executable in a VM with the given experiments enabled]:experiment'
)
;;
esac
_arguments "$opts[@]" && ret=0
;;
esac
return $ret
}
(( $+functions[_dart_pub_global_subcommands] )) ||
_dart_pub_global_subcommands() {
local -a commands=(
"activate:Make a package's executables globally available"
"deactivate:Remove a previously activated package"
"list:List globally activated packages"
"run:Run an executable from a globally activated package"
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_dart_pub_token] )) ||
_dart_pub_token() {
local ret=1
_arguments -C \
'(- *)'{-h,--help}'[Print this usage information]' \
'1: :_dart_pub_token_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
local -a opts=(
'(- *)'{-h,--help}'[Print this usage information]'
'*: :_files'
)
case $words[1] in
(add)
opts+=(
'--env-var=[Read the secret token from this environment variable]:envvar'
)
;;
(remove)
opts+=(
'--all[Remove all secret tokens]'
)
;;
esac
_arguments "$opts[@]" && ret=0
;;
esac
return $ret
}
(( $+functions[_dart_pub_token_subcommands] )) ||
_dart_pub_token_subcommands() {
local -a commands=(
"add:Add an authentication token for a package repository"
"list:List servers for which a token exists"
"remove:Remove secret token for package repository at hosted-url"
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_dart_pub_workspace] )) ||
_dart_pub_workspace() {
local ret=1
_arguments -C \
'(- *)'{-h,--help}'[Print this usage information]' \
'1: :_dart_pub_workspace_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
local -a opts=(
'(- *)'{-h,--help}'[Print this usage information]'
'--json[Output information in a json format]'
)
_arguments "$opts[@]" && ret=0
;;
esac
return $ret
}
(( $+functions[_dart_pub_workspace_subcommands] )) ||
_dart_pub_workspace_subcommands() {
local -a commands=(
'list:List all packages in the workspace and their directory'
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_dart_run_timeline_streams] )) ||
_dart_run_timeline_streams() {
local -a streams=(all API Compiler CompilerVerbose Dart Debugger Embedder GC Isolate VM)
_values -s ',' streams $streams
}
(( $+functions[_dart_run_enable_experiment] )) ||
_dart_run_enable_experiment() {
local -a features=(
'augumentations:Augumentations - enhancing declarations from outside'
'const-function:Allow more of the Dart language to be executed in const expression'
'dot-shorthands:Shorter dot syntax for static accesses'
'enhanced-parts:Generalize parts to be nested and have exports/imports'
'getter-setter-error:Stop reporting errors about mismatching types in a getter/setter pair'
'inference-update-4:A bundle of updates to type inference'
'macros:Static meta-programming'
'native-asserts:Compile and bundle native asserts'
'null-aware-elements:Null-aware elements and map entries in collections'
'record-use:Output arguments used by static functions'
'sound-flow-analysis:Assume sound null safety when computing type promotion, reachability, definite assignment'
'test-experiment:Has no effect'
'unquoted-imports:Shorter import syntax'
'variance:Sound variance'
)
_describe -t features 'command' features "$@"
}
(( $+functions[_dart_test_reporter] )) ||
_dart_test_reporter() {
local -a reporters=(
"compact:A single line, updated continuously"
"expanded:A separate line for each update"
"failures-only:A separate line for failing tests with no output for passing tests"
"github:A custom reporter for GitHub Actions"
"json:A machine-readable format"
"silent:A reporter with no output"
)
_describe -t reporters 'reporter' reporters "$@"
}
(( $+functions[_dart_subcommands] )) ||
_dart_subcommands() {
local -a commands=(
"analyze:Analyze Dart code in a directory"
"compile:Compile Dart to various formats"
"create:Create a new Dart project"
"devtools:Open DevTools (optionally connecting to an existing application)"
"doc:Generate API documentation for Dart projects"
"fix:Apply automated fixes to Dart source code"
"format:Idiomatically format Dart source code"
"info:Show diagnostic information about the installed tooling"
"pub:Work with packages"
"run:Run a Dart program"
"test:Run tests for a project"
)
_describe -t commands 'command' commands "$@"
}
_dart "$@"
# 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

@ -1,40 +0,0 @@
#compdef debuild
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for debuild 2.10.
#
# Status: incomplete.
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
#
# ------------------------------------------------------------------------------
# FIXME --noconf is only allowed in first position
_arguments \
'(- 1 *)'{-h,--help}'[show help]' \
'(- 1 *)--version[show version and copyright information]' \
{--no-conf,--noconf}'[don'\''t read devscripts config files]' \
{-r-,--rootcmd=}'[command used to become root if debuild not setuid root (default: fakeroot)]: :_command_names' \
'*'{-e-,--preserve-envvar=}'[preserve environment variable]: :_vars' \
'(-e --preserve-envvar)--preserve-env[preserve all environment vars (except PATH)]' \
'*'{-e-,--set-envvar=}'[preserve environment variable]: :_vars -qS=' \
'--prepend-path=[prepend to the sanitised PATH]: :_files -/' \
'(-D)-d[skip checking of build dependencies]' \
'(-d)-D[force checking of build dependencies]' \
'--check-dirname-level[how much to check directory names]:level:((0\:never 1\:only\ if\ program\ changes\ directory\ \(default\) 2\:always))' \
'--check-dirname-regex[Perl regex defining matching directory names, the string PACKAGE will be replaced by the package name (default: '\''PACKAGE(-.+)?'\'')]:regex'
# 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

@ -1,6 +1,6 @@
#compdef dget #compdef dget
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for dget # Completion script for dget 2.25.19
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -39,27 +39,21 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_dget() { _arguments -A "-*" \
local context state line expl '(- *)'{-h,--help}'[Show help message]' \
local -A opt_args '(- *)'{-v,--version}'[Print license, copyright, and version information and exit]' \
'(-a --all)'{-a,--all}'[Package is a source package; download all binary packages]' \
_arguments -A "-*" \ '(--no-conf -b --backup)'{-b,--backup}'[Move files that would be overwritten to ./backup]' \
'(--no-conf -h --help)'{-h,--help}'[Show help message]' \ '(--no-conf -q --quiet)'{-q,--quiet}'[Suppress wget/curl output]' \
'(--no-conf -V --version)'{-v,--version}'[Print license, copyright, and version information and exit]' \ '(--no-conf -x --extract -d --download-only --build)'{-d,--download-only}'[Do not extract downloaded source]' \
'(--no-conf -b --backup)'{-b,--backup}'[Move files that would be overwritten to ./backup]' \ '(--no-conf -x --extract -d --download-only --build)'{-x,--extract}'[Unpack downloaded source]' \
'(--no-conf -q --quiet)'{-q,--quiet}'[Suppress wget/curl output]' \ '(--no-conf -u --allow-unauthenticated)'{-u,--allow-unauthenticated}'[Make no attempt to verify source package signature]' \
'(--no-conf -x --extract -d --download-only --build)'{-d,--download-only}'[Do not extract downloaded source]' \ '(--no-conf -x --extract -d --download-only --build)--build[Build package with dpkg-buildpackage after download]' \
'(--no-conf -x --extract -d --download-only --build)'{-x,--extract}'[Unpack downloaded source]' \ '(--no-conf)--path[Check this directory in addition to the apt archive]:DIR:_files -/' \
'(--no-conf -x --extract -d --download-only --build)--build[Build package with dpkg-buildpackage after download]' \ '(--no-conf -k --insecure)'{-k,--insecure}'[Do not check SSL certificates when downloading]' \
'(--no-conf -u --allow-unauthenticated)'{-u,--allow-unauthenticated}'[Make no attempt to verify source package signature]' \ '(--no-conf --no-cache)--no-cache[Disable server-side HTTP cache]' \
'(--no-conf)--path[Check this directory in addition to the apt archive]:DIR:_files -/' \ "(--no-conf)--no-conf[Don't read devscripts config files]" \
'(--no-conf --insecure)--insecure[Do not check SSL certificates when downloading]' \ '(-)*:debian package or URL: _alternative "_deb_packages available" "_urls"'
'(--no-conf --no-cache)--no-cache[Disable server-side HTTP cache]' \
"(--no-conf)--no-conf[Don't read devscripts config files]" \
'(-)*:debian package or URL: _alternative "_deb_packages available" "_urls"'
}
_dget "$@"
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -3,7 +3,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for dhcpcd 2.3.2. # Completion script for dhcpcd 9.4.1 (http://roy.marples.name/projects/dhcpcd/)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -13,36 +13,42 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments \ _arguments \
'1:network interface:_net_interfaces' \ '(-b --background)'{-b,--background}'[Background immediately]' \
- release \ '(-c --script)'{-c,--script}'[Use this script instead of the default]: :_files' \
'(-k --release)'{-k,--release}'[causes an existing dhcpcd process running on the interface to release it'\''s lease, deconfigure the interface and then exit]' \ '(-D --duid)'{-D,--duid}'[Use a DHCP Unique Identifier]:id' \
- exit \ '(-d --debug)'{-d,--debug}'[Echo debug messages to the stderr and syslog]' \
'(-x --exit)'{-x,--exit}'[causes an existing dhcpcd process running on the interface to exit]' \ '(-E --lastlease)'{-E,--lastlease}'[If dhcpcd cannot obtain a lease, then try to use the last lease acquired for the interface]' \
- main \ '--lastleaseextend[Same as the -E/--lastlease, but the lease will be retained even if it expires]' \
'(-d --debug)'{-d,--debug}'[echo debug and informational messages to the console]' \ \*{-e,--env}'[Push value to the environment for use in dhcpcd-run-hooks(8)]:env' \
'(-h --hostname)'{-h,--hostname}'[specify the hostname sent, or an empty string to stop any hostname from being sent]:hostname:_hosts' \ '(-g --reconfigure)'{-g,--reconfigure}'[dhcpcd will re-apply IP address, routing and run dhcpcd-run-hooks(8) for each interface]' \
'(-i --classid)'{-i,--classid}'[override the DHCP vendor classid field we send]:classid' \ '(-F --fqdn)'{-F,--fqdn}'[Requests that the DHCP server updates DNS using FQDN instead of just a hostname]:fqdn' \
'(-l --leasetime)'{-l,--leasetime}'[request a specific lease time in seconds]:lease time \(seconds\)' \ '(-f --config)'{-f,--config}'[Specify a config to load instead of default]: :_files' \
'(-m --metric)'{-m,--metric}'[added routes will use the metric on systems where this is supported]:metric' \ '(-h --hostname)'{-h,--hostname}'[Sends hostname to the DHCP server so it can be registered in DNS]:hostname' \
'(-n --renew)'{-n,--renew}'[notifies an existing dhcpcd process running on the interface to renew it'\''s lease]' \ '(-I --clientid)'{-I,--clientid}'[Send the clientid]:clientid' \
'(-p --persistent)'{-p,--persistent}'[don'\''t deconfigure the interface and configuration at exit]' \ '(-i --vendorclassid)'{-i,--vendorclassid}'[Override the DHCPv4 venderclassid field sent]:vendorclassid' \
'(-r --request)'{-r,--request}'[skip the broadcast request step and just request an address]:address' \ '(-j --logfile)'{-j,--logfile}'[Writes to the specified logfile]: :_files' \
'(-s --inform)'{-s,--inform}'[behaves exactly like -r, but sends a DHCP inform instead of a request]:address' \ \*{-k,--release}'[Release its lease and de-configure the interface regardless of -p, --persistent option]: :_net_interfaces' \
'(-t --timeout)'{-t,--timeout}'[timeout after seconds, instead of the default 20]:timeout \(seconds\)' \ '(-l --leasetime)'{-l,--leasetime}'[Request a lease time of seconds. -1 represents an infinite lease time]:seconds' \
'(-u --userclass)'{-u,--userclass}'[tags the DHCP message with the userclass class]:class' \ '(-M --manager)'{-M,--manager}'[Start dhcpcd in Manager mode even if only one interface specified on the command line]' \
'*'{-H,--sethostname}'[forces dhcpcd to set the hostname as supplied by the DHCP server]' \ '(-m --metric)'{-m,--metric}'[Metrics are used to prefer an interface over another one, lowest wins]:metric' \
'({-I --clientid)'{-I,--clientid}'[send clientid as a client identifier string]:clientid' \ \*{-n,--rebind}'[Notifies dhcpcd to reload its configuration and rebind the specified interface]: :_net_interfaces' \
'*'{-S,--mscsr}'[request Microsoft specific Classless Static Routes (RFC 3442) code as well]' \ \*{-N,--renew}'[Notifies dhcpcd to renew existing addresses on the specified interface]: :_net_interfaces' \
'(-A --noarp)'{-A,--noarp}'[don'\''t request or claim the address by ARP]' \ \*{-o,--option}'[Request the DHCP option variable for use in dhcpcd-run-hooks]:option' \
'(-G --nogateway)'{-G,--nogateway}'[don'\''t set any default routes]' \ '(-p --persistent)'{-p,--persistent}"[Don't de-configure the interface and configuration at exit]" \
'(-L --noipv4ll)'{-L,--noipv4ll}'[don'\''t use IPv4LL at all]' \ '(-r --request)'{-r,--request}'[Request the address in the DHCP DISCOVER message]:address' \
'(-M --nomtu)'{-M,--nomtu}'[don'\''t set the MTU of the interface]' \ '(-s --inform)'{-s,--inform}'[Behaves exactly like -r, but sends a DHCP inform instead of a request]:address' \
'(-N --nontp)'{-N,--nontp}'[don'\''t touch /etc/ntpd.conf or restart the ntp service]' \ '--inform6[Performs a DHCPv6 Information Request]' \
'(-R --nodns)'{-R,--nodns}'[don'\''t send DNS information to resolvconf or touch /etc/resolv.conf]' \ \*{-S,--static}'[Configures a static DHCP value]:value' \
'(-T --test)'{-T,--test}'[on receipt of discover messages, simply print the contents of the DHCP message to the console]' \ '(-t --timeout)'{-t,--timeout}'[Timeout after seconds]:seconds' \
'(-Y --nonis)'{-Y,--nonis}'[don'\''t touch /etc/yp.conf or restart the ypbind service]' '(-u --userclass)'{-u,--userclass}'[Tags the DHCPv4 message with the userclass class]:class' \
'(-v --vendor)'{-v,--vendor}'[Add an encapsulated vendor option]:vendor' \
'(- *)--version[Display both program version and copyright information]' \
'-w[Wait for an address to be assigned before forking to the background]' \
'--waitip=[Wait for an address to assigned before forking to the background]: :(4 6)' \
\*{-x,--exit}'[This will signal an existing dhcpcd process running on the interface to exit]: :_net_interfaces' \
'(-y --reboot)'{-y,--reboot}'[Allow reboot seconds before moving to the discover phase if we have an old lease to use]:seconds' \
'1:network interface:_net_interfaces'
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -1,6 +1,6 @@
#compdef diana #compdef diana
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -79,72 +79,66 @@ _diana_command_arguments() {
(remove) (remove)
_diana_load_gids _diana_load_gids
_describe -t output 'Downloads to delete' GIDs _describe -t output 'Downloads to delete' GIDs
;; ;;
(info) (info)
_diana_load_gids _diana_load_gids
_describe -t output 'Downloads to get info' GIDs _describe -t output 'Downloads to get info' GIDs
;; ;;
(files) (files)
_diana_load_gids _diana_load_gids
_describe -t output 'Get files for downloads' GIDs _describe -t output 'Get files for downloads' GIDs
;; ;;
(forcerm) (forcerm)
_diana_load_gids _diana_load_gids
_describe -t output 'Downloads to delete' GIDs _describe -t output 'Downloads to delete' GIDs
;; ;;
(pause) (pause)
_diana_load_gids _diana_load_gids
_describe -t output 'Downloads to pause' GIDs _describe -t output 'Downloads to pause' GIDs
;; ;;
(resume) (resume)
_diana_load_paused_gids _diana_load_paused_gids
_describe -t output 'Downloads to resume' PGIDs _describe -t output 'Downloads to resume' PGIDs
;; ;;
(preview) (preview)
_diana_load_gids _diana_load_gids
_describe -t output 'Downloads to preview' GIDs _describe -t output 'Downloads to preview' GIDs
;; ;;
esac esac
} }
_diana() { _diana_subcommands() {
local -a commands local -a commands=(
"list:Output the list of active downloads."
"paused:Output the list of paused downloads."
"stopped:Output the list of stopped downloads."
"info:Output information regarding the given GIDs."
"files:Output the files owned by the downloads corresponding to the given GIDs."
"errors:Output the list of errors."
"stats:Output download bandwidth statistics."
"add:Download the given items (local or remote URLs to torrents, etc.)."
"remove:Remove the downloads corresponding to the given GIDs."
"forcerm:Forcibly remove the downloads corresponding to the given GIDs."
"pause:Pause the downloads corresponding to the given GIDs."
"resume:Resume the downloads corresponding to the given GIDs."
"preview:Preview all the files from all the downloads corresponding to the given GIDs."
"sleep:Pause all the active downloads."
"wake:Resume all the paused downloads."
"purge:Clear the list of stopped downloads and errors."
"clean:Stop seeding completed downloads."
)
commands=( _describe -t commands 'commands' commands
"list:Output the list of active downloads."
"paused:Output the list of paused downloads."
"stopped:Output the list of stopped downloads."
"info:Output information regarding the given GIDs."
"files:Output the files owned by the downloads corresponding to the given GIDs."
"errors:Output the list of errors."
"stats:Output download bandwidth statistics."
"add:Download the given items (local or remote URLs to torrents, etc.)."
"remove:Remove the downloads corresponding to the given GIDs."
"forcerm:Forcibly remove the downloads corresponding to the given GIDs."
"pause:Pause the downloads corresponding to the given GIDs."
"resume:Resume the downloads corresponding to the given GIDs."
"preview:Preview all the files from all the downloads corresponding to the given GIDs."
"sleep:Pause all the active downloads."
"wake:Resume all the paused downloads."
"purge:Clear the list of stopped downloads and errors."
"clean:Stop seeding completed downloads."
)
_arguments -C \
'1:cmd:->cmds' \
'*:: :->args' \
case "$state" in
(cmds)
_describe -t commands 'commands' commands
;;
(*)
_diana_command_arguments
;;
esac
} }
_diana _arguments \
'1:cmd:_diana_subcommands' \
'*:: :_diana_command_arguments'
# 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

141
src/_direnv Normal file
View File

@ -0,0 +1,141 @@
#compdef direnv
# ------------------------------------------------------------------------------
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS OR THE AUTHOR BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for direnv 2.34.0 (https://direnv.net/)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Nitai J. Perez <youcangetselfish@gmail.com>
#
# ------------------------------------------------------------------------------
(( $+functions[_direnv_commands] )) ||
_direnv_commands() {
local -a commands=(
'allow:Grants direnv permission to load the given .envrc or .env file'
'permit:Grants direnv permission to load the given .envrc or .env file'
'grant:Grants direnv permission to load the given .envrc or .env file'
'block:Revokes the authorization of a given .envrc or .env file'
'deny:Revokes the authorization of a given .envrc or .env file'
'disallow:Revokes the authorization of a given .envrc or .env file'
'revoke:Revokes the authorization of a given .envrc or .env file'
'edit:Opens PATH_TO_RC or the current .envrc or .env into an $EDITOR and allow the file to be loaded afterwards'
'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 help'
'hook:Used to setup the shell hook'
'prune:removes old allowed files'
'reload:triggers an env reload'
'status:prints some debug status information'
'stdlib:Displays the stdlib available in the .envrc execution context'
'version:prints the version or checks that direnv is older than VERSION_AT_LEAST'
)
_describe 'command' commands
}
_direnv() {
local curcontext="$curcontext" state line
typeset -A opt_args
local ret=1
_arguments -C \
'1: :_direnv_commands' \
'*:: :->command_args' && ret=0
case $state in
(command_args)
case $words[1] in
(allow|permit|grant|block|deny|revoke|edit)
_arguments \
'1:rc file:_files' \
&& ret=0
;;
(exec)
_arguments \
'1:directory:_files -/' \
'2:command:_command_names' \
&& ret=0
;;
(export)
local -a supported_shells=(bash elvish gha gzenv murex tcsh vim zsh fish json pwsh systemd)
_arguments \
'1:shell:($supported_shells)' \
&& ret=0
;;
(hook)
_arguments \
'1:shell:(bash zsh fish tcsh elvish)' \
&& ret=0
;;
(fetchurl)
_arguments \
'1:url:_urls' \
'2:integrity hash' \
&& ret=0
;;
(status)
_arguments \
'--json[print status information in JSON format]' \
&& ret=0
;;
(version)
_arguments \
'1:version at least' \
&& ret=0
;;
(help)
_arguments \
'1:show private:(SHOW_PRIVATE)' \
&& ret=0
;;
(prune|reload|status|stdlib)
# do not complete
ret=0
;;
(*)
_default && ret=0
;;
esac
;;
esac
return ret
}
_direnv "$@"
# 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

634
src/_diskutil Normal file
View File

@ -0,0 +1,634 @@
#compdef diskutil
# ------------------------------------------------------------------------------
# Copyright (c) 2025 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 diskutil command macOS 26
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex)
#
# ------------------------------------------------------------------------------
_diskutil() {
typeset -A opt_args
local context state line
local curcontext="$curcontext"
local ret=1
_arguments \
'1: :_diskutil_subcommands' \
'*::arg:->args' \
&& ret=0
case "$state" in
(args)
case $words[1] in
(list)
_arguments \
'-plist[output plist instead of normal user-readable output]' \
'1:: :(internal external)' \
'2:: :(physical virtual)' \
&& ret=0
;;
(info)
_arguments \
'-plist[output plist instead of normal user-readable output]' \
'-all[output all disks]' \
&& ret=0
;;
(listFilesystems)
_arguments \
'-plist[output plist instead of normal user-readable output]' \
&& ret=0
;;
(unmount|unmountDisk|eject|disableJournal|disableJournal)
_alternative 'force: :(force)' 'device: :_files' \
&& ret=0
;;
(mount)
_arguments \
'-mountOptions[mount options]:option' \
'-mountPoint[mount point]:path:_files -/' \
'*:: :_diskutil_mount_args' \
&& ret=0
;;
(moveJournal)
_alternative 'internal: :(internal)' 'device: :_files' \
&& ret=0
;;
(eraseDisk)
_arguments \
'-noEFI[do not create EFI partition]' \
'1:format:_diskutil_file_systems' \
'2:name' \
'*:: :_diskutil_erasedisk_args' \
&& ret=0
;;
(eraseVolume)
_arguments \
'1:format:_diskutil_file_systems' \
'2:name' \
'*:: :_diskutil_erasedisk_args' \
&& ret=0
;;
(zeroDisk)
_alternative 'force: :(force)' 'short: :(short)' 'device: :_files' \
&& ret=0
;;
(secureErase)
_arguments \
'1:format:_diskutil_secure_erase_args' \
'*:: :_files' \
&& ret=0
;;
(partitionDisk)
_arguments \
'-noEFI[do not create EFI partition on the target disk]' \
'*:: :_files' \
&& ret=0
;;
(resizeVolume)
_arguments \
'-plist[emit a property list instead of user-formatted output]' \
'*:: :_files' \
&& ret=0
;;
(APFS)
_diskutil_APFS && ret=0
;;
(appleRAID)
_diskutil_appleRAID && ret=0
;;
(coreStorage)
_diskutil_corestorage && ret=0
;;
(image)
_diskutil_image && ret=0
;;
(*)
_arguments \
'*:: :_files' \
&& ret=0
;;
esac
;;
esac
return ret
}
(( $+functions[_diskutil_subcommands] )) ||
_diskutil_subcommands() {
local -a commands=(
"list:List disks"
"info:Get detailed information about a specific whole disk or partition"
"activity:Continuously display system-wide disk manipulation activity"
"listFilesystems:Show the file system personalities available for formatting"
"unmount:Unmount a single volume"
"unmountDisk:Given a disk containing a partition map, unmount all of its volumes"
"eject:Eject a disk"
"mount:Mount a single volume"
"mountDisk:Mount all mountable and UI-browsable volumes on the give partition map"
"rename:Rename a volume"
"enableJournal:Enable journaling on an HFS+ volume"
"disableJournal:Disable journaling on an HFS+ volume"
"moveJournal:Create a 512MB Apple_Journal partiton"
"enableOwnership:Enable ownership a volume"
"disableOwnership:Disable ownership of a volume"
"verifyVolume:Verify the file system data structures of a volume"
"repairVolume:Repair the file system data structures of a volume"
"verifyDisk:Verify the partition map layout of a whole disk intended for booting or data use"
"repairDisk:Repair the partition map layout of a whole disk intended for booting or data use"
"eraseDisk:Erase an existing disk"
"eraseVolume:Write out a new empty file system volume"
"reformat:Erase an existing volume by writing out a new empty file system"
"eraseOptical:Erase optical media"
"zeroDisk:Erase a device, writing zeros to the media"
"randomDisk:Erase a whole disk, writing random data to the media"
"secureErase:Erase, using a secure method"
"partitionDisk:Partition a disk, removing all volumes"
"resizeVolume:Non-destructively resize a volume"
"splitPartition:Destructively split a volume into multiple partitions"
"mergePartitions:Merge two or more partitions on a disk"
"addPartition:Create a new partition following an existing partition"
"APFS:Apple APFS is a system of virtual volumes"
"appleRAID:create, manipulate, destroy AppleRAID volumes"
"coreStorage:gather information/remove CoreStorage volumes"
"image:manipulate DiskImages framework with StorageKit framework"
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_diskutil_mount_args] )) ||
_diskutil_mount_args() {
local ret=1
local -a attributes=(
'readonly[the file system is mounted read only]'
'nobrowse[the file system is mounted with a recommendation to prevent display]'
)
_alternative \
'attributes: :_values -w attributes $attributes' \
'device: :_files' && ret=0
return ret
}
(( $+functions[_diskutil_erasedisk_args] )) ||
_diskutil_erasedisk_args() {
local ret=1
_alternative \
'type: :(APM MBR GPT)' \
'device: :_files' && ret=0
return ret
}
(( $+functions[_diskutil_secure_erase_args] )) ||
_diskutil_secure_erase_args() {
local ret=1
local -a levels=(
'0[Single-pass zero fill erase]'
'1[Single-pass random fill erase]'
'2[Seven-pass erase]'
'3[Gutmann algorithm 35-pass erase]'
'4[Three-pass erase, consisting of two random fills plus a final zero fill]'
)
_alternative \
'freespace: :(freespace)' \
'level: :_values level $levels' && ret=0
return ret
}
(( $+functions[_diskutil_file_systems] )) ||
_diskutil_file_systems() {
local file_systems=(
'APFSX:Case-sensitive APFS'
'APFS:APFS'
'ExFAT:ExFat'
'FREE:Free Space'
'MS-DOS:FAT'
'FAT32:FAT32'
'HFS+:MacOS Extended HFS+'
'HFSX:Case-sensitive Mac OS Extended HFS+'
'JHFSX:Case-sensitive and journaled Mac OS Extended HFS+'
'JHFS+:Journaled Mac OS Extended HFS+'
)
_describe -t file_systems 'file_system' file_systems "$@"
}
(( $+functions[_diskutil_APFS] )) ||
_diskutil_APFS() {
local ret=1
_arguments -C \
'1: :_diskutil_APFS_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
case $words[1] in
(list|resizeContainer|listCryptoUsers|listSnapshots)
_arguments \
'-plist[emit a property list instead of user-formatted output]' \
'*:: :_files' \
&& ret=0
;;
(convert)
_arguments \
'-dryrun[all calculations, checks, some data moving is performed but your disk is left as valid HFS]' \
'-prebootSource[staging directory of macOS boot items]' \
'*:: :_files' \
&& ret=0
;;
(deleteContainer)
_arguments \
'-force[Activate an alternate last-resort mode]' \
'*:: :_files' \
&& ret=0
;;
(addVolume)
_arguments \
'-passprompt[will be prompted interactively for a passphrase]' \
'-passphrase[passphrase]:passphrase' \
'-stdinpassphrase[read passphrase from standard input]' \
'-passphraseHint[passphrase hint]:hint' \
'-reserve[guarantee a minimum amount of space for your volume]:reserve' \
"-quota[limit your volume's file usage to a maximum amount]:quota" \
'-role[meta-data flags from APFS Volume Roles]:roles' \
'-groupWith[become a member of the same APFS Volume Group]' \
'-sibling[sibling group device]:group_device' \
'-nomount[leave volume unmounted]' \
'-mountpoint[mountpoint path]:path:_files' \
'*:: :_files' \
&& ret=0
;;
(eraseVolume)
_arguments \
'-passprompt[will be prompted interactively for a passphrase]' \
'-passphrase[passphrase]:passphrase' \
'-stdinpassphrase[read passphrase from standard input]' \
'-passphraseHint[passphrase hint]:hint' \
'-role[meta-data flags from APFS Volume Roles]:roles' \
'-groupWith[become a member of the same APFS Volume Group]' \
'-sibling[sibling group device]:group_device' \
'*:: :_files' \
&& ret=0
;;
(unlockVolume)
_arguments \
'-user[cryptographic user]:user' \
'-recoverykeychain[key chain file]:path:_files' \
'-passphrase[passphrase]:passphrase' \
'-stdinpassphrase[read passphrase from standard input]' \
'-nomount[leave volume unmounted]' \
'-mountpoint[mountpoint path]:path:_files' \
'-systemreadwrite[mount read/write]' \
'-verify[test passphrase correctness without affecting the locked or unlocked state]' \
'-plist[emit a property list instead of user-formatted output]' \
'*:: :_files' \
&& ret=0
;;
(changePassphrase)
_arguments \
'-user[cryptographic user]:user' \
'-oldPassphrase[old passphrase]:old_passphrase' \
'-oldStdinpassphrase[read old passphrase from standard input]' \
'-newPassphrase[new passphrase]:new_passphrase' \
'-newStdinpassphrase[read new passphrase from standard input]' \
'*:: :_files' \
&& ret=0
;;
(setPassphraseHint)
_arguments \
'-user[cryptographic user]:user' \
'-hint[hint message]:hint' \
'-clear[clear any existing hint]' \
'*:: :_files' \
&& ret=0
;;
(encryptVolume)
_arguments \
'-user[cryptographic user]:user' \
'-passphrase[passphrase]:passphrase' \
'-stdinpassphrase[read passphrase from standard input]' \
'*:: :_files' \
&& ret=0
;;
(decryptVolume)
_arguments \
'-user[cryptographic user]:user' \
'-recoverykeychain[key chain file]:path:_files' \
'-passphrase[passphrase]:passphrase' \
'-stdinpassphrase[read passphrase from standard input]' \
'*:: :_files' \
&& ret=0
;;
(deleteSnapshot)
_arguments \
'-user[cryptographic user]:user' \
'-xid[transaction ID]:xid' \
'-name[snapshort name]:name' \
'-wait[wait for removing snapshot]' \
'*:: :_files' \
&& ret=0
;;
(updatePreboot)
_arguments \
'-od[open directory path]:dir:_files -/' \
'*:: :_files' \
&& ret=0
;;
esac
;;
esac
return ret
}
(( $+functions[_diskutil_APFS_subcommands] )) ||
_diskutil_APFS_subcommands() {
local -a commands=(
'list:Display APFS objects as a tree'
'convert:Convert an HFS volume to an APFS Container with a single APFS Volume'
'create:Create an empty APFS Container and add one APFS Volume with the given name'
'createContainer:Create an empty APFS Container'
'deleteContainer:Destroy an existing APFS Container'
'resizeContainer:Resize an existing APFS Container'
'addVolume:Add a new APFS Volume to an existing APFS Container'
'deleteVolume:Remove the given APFS Volume from its APFS Container'
'deleteVolumeGroup:Remove all APFS Volumes from the APFS Container'
'eraseVolume:Erase the contents of an existing APFS Volume'
'changeVolumeRole:Change the role metadata flags of an existing APFS Volume'
'unlockVolume:Unlock the mount an encrypted and locked APFS Volume or verify a passphrase'
'lockVolume:Unmount and lock an encrypted unlocked APFS Volume'
'listCryptoUsers:Show all cryptographic users and special-purpose users'
'changePassphrase:Change the passphrase of the user associated with the given APFS Volume'
'setPassphraseHint:Set an arbitrary hint string to aid recall of a passphrase'
'encryptVolume:Start encryption of a currently-unencrypted APFS Volume'
'decryptVolume:Start decryption of a currently-encrypted APFS Volume'
'listSnapshots:Show all APFS Snapshots associated with the given APFS Volume'
'deleteSnapshot:Remove the given APFS Snapshot from its APFS Volume'
'listGroups:Display the relationships among APFS Volumes which are defined by APFS Volume Groups'
'defragment:Manage automatic background defragmentation at the APFS Container or Volume level'
"updatePreboot:Update the target volume's associated Preboot Volume"
'syncPatchUsers:Perform a specific repair of APFS cryptographic user lock records'
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_diskutil_appleRAID] )) ||
_diskutil_appleRAID() {
local ret=1
_arguments -C \
'1: :_diskutil_appleRAID_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
case $words[1] in
(list)
_arguments \
'-plist[emit a property list instead of user-formatted output]' \
'*:: :_files' \
&& ret=0
;;
(create)
_arguments \
'1:command:(mirror stripe concat)' \
'*:: :_files' \
&& ret=0
;;
(add)
_arguments \
'1:type:(member spare)' \
'*:: :_files' \
&& ret=0
;;
(enable)
_arguments \
'1:command:(mirror concat)' \
'*:: :_files' \
&& ret=0
;;
(update)
_arguments \
'1:key:(AutoRebuild SetTimeout)' \
'2:value' \
'*:: :_files' \
&& ret=0
;;
esac
;;
esac
return ret
}
(( $+functions[_diskutil_appleRAID_subcommands] )) ||
_diskutil_appleRAID_subcommands() {
local -a commands=(
'list:Display AppleRAID volumes with current status and associated member disks'
'create:Create a new RAID set consisting of multiple disks and/or RAID sets'
'delete:Destroy an existing RAID set'
'repairMirror:Repair a degraded mirror'
'add:Add a new member or hot spare to an existing RAID set'
'remove:Remove a member or spare from an existing RAID set'
'enable:Convert a non-RAID disk partition into an RAID set'
'update:Update the key-value parameters of an existing RAID set'
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_diskutil_corestorage] )) ||
_diskutil_corestorage() {
local ret=1
_arguments -C \
'1: :_diskutil_corestorage_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
case $words[1] in
(list|info)
_arguments \
'-plist[emit property list instead of the formatted tree output]' \
'*:: :_files' \
&& ret=0
;;
(unlockVolume)
_arguments \
'-nomount[not mount automatically]' \
'-stdinpassphrase[read password from standard input]' \
'-passphrase[passphrase]:passphrase' \
'-recoverykeychain[a path to keychain file]:file:_files' \
'*:: :_files' \
&& ret=0
;;
esac
;;
esac
return ret
}
(( $+functions[_diskutil_corestorage_subcommands] )) ||
_diskutil_corestorage_subcommands() {
local -a commands=(
'list:Display a tree view of the CoreStorage world'
'info:Display properties of the CoreStorage object'
'delete:Delete a CoreStorage logical volume group'
'unlockVolume:Unlock a logical volume and file system'
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_diskutil_image] )) ||
_diskutil_image() {
local ret=1
_arguments -C \
'--stdinpassphrase[read the passphrase from stdin]' \
'--verbose[enable verbose output]' \
'--plist[produce output in a plist format]' \
'1: :_diskutil_image_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
case $words[1] in
(attach)
_arguments \
'--readOnly[disk image is attached read-only]' \
'--nobrowse[hide the mounted volume in the disk image from GUI applications]' \
'--mountPoint[path to mount the image]:mount_point:_files -/' \
'--mountOptions[comma separated mount options]:option' \
'--mountPolicy[mount policy]:policy:(noMount autoMount forceMount)' \
'--noMount[skip any mount attempts and only attach the disk image]' \
'*--shadow[shadow file path]:file:_files' \
'*:: :_files' \
&& ret=0
;;
(info)
_arguments \
'--extra[additional information will be retrieved for some image types]' \
&& ret=0
;;
(create)
_diskutil_image_create && ret=0
;;
(resize)
_arguments \
'(-s --size)'{-s,--size}'[new size of the disk image]:size' \
'--image-only[only resize the disk image and adjust a secondary GPT table to the new size]' \
&& ret=0
;;
esac
;;
esac
return ret
}
(( $+functions[_diskutil_image_subcommands] )) ||
_diskutil_image_subcommands() {
local -a commands=(
'attach:Attach a disk image as a device'
'info:Print out information includes about a disk image'
'chpass:Change the passphrase of a given encrypted image'
'create:Create a disk image'
'resize:Resizes an existing disk image represented by given URL'
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_diskutil_image_create] )) ||
_diskutil_image_create() {
local ret=1
_arguments -C \
'1: :_diskutil_image_create_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
case $words[1] in
(blank)
_arguments \
'--format[disk format]:format:(RAW ASIF USDB)' \
'--size[disk size]:size' \
'--volumeName[volume name]:name' \
'-fs[create a file system in the specified format]:format:(APFS ExFAT MS-DOS)' \
'*:: :_files' \
&& ret=0
;;
(from)
_arguments \
'--format[disk format]:format:(RAW UDRO UDZO ULFO ULMO ASIF UDSB)' \
'--shadow[path to the shadow file]:path:_files' \
'*:: :_files' \
&& ret=0
;;
esac
;;
esac
return ret
}
(( $+functions[_diskutil_image_create_subcommands] )) ||
_diskutil_image_create_subcommands() {
local -a commands=(
'blank:create a blank disk image'
'from:create a disk image from source'
)
_describe -t commands 'command' commands "$@"
}
_diskutil "$@"
# 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

59
src/_distro_info Normal file
View File

@ -0,0 +1,59 @@
#compdef distro-info ubuntu-distro-info debian-distro-info
#
# ------------------------------------------------------------------------------
# Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
#
# 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 for distro-info
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei YOSHIDA (https://github.com/syohex)
#
# ------------------------------------------------------------------------------
_arguments \
'(- *)'{-h,--help}'[display help message and exit]' \
'--date=[date for calculating the version]:date' \
'(-a --all)'{-a,--all}'[list all known versions]' \
'(-y --days)'{-y,--days=}'[display number of days until specified version reaches the specified milestone]:milestone:(created release eol eol-server)' \
'(-d --devel)'{-d,--devel}'[latest development version]' \
'--series=[series to calculate the version for]:series' \
'(-s --stable)'{-s,--stable}'[latest stable version]' \
'--supported[list of all supported version, including development releases]' \
'--unsupported[list of all unsupported stable versions]' \
'(-c --codename)'{-c,--codename}'[print the codename(default)]' \
'(-r --release)'{-r,--release}'[print the release version]' \
'(-f --fullname)'{-f,--fullname}'[print the full name]'
# 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

54
src/_do-release-upgrade Normal file
View File

@ -0,0 +1,54 @@
#compdef do-release-upgrade
# ------------------------------------------------------------------------------
# Copyright (c) 2023 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 do-release-upgrade 25.10.7
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_arguments \
'(- *)'{-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 -/' \
'(-p --proposed)'{-p,--proposed}'[Try upgrading to the latest release using the upgrade from \$distro-proposed]' \
'(-f --frontend)'{-f,--frontend}'[Run the specified frontend]:frontend' \
'(- *)--check-dist-upgrade-only[Check only if a new distribution release is available]' \
'--allow-third-party[Try the upgrade with third party mirrors and repositories]' \
'(-q --quiet)'{-q,--quiet}'[Quiet mode]'
# 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

@ -1,6 +1,6 @@
#compdef docpad #compdef docpad
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2011 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,51 +28,58 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for docpad (https://github.com/bevry/docpad). # Completion script for docpad v6.38.2 (https://github.com/bevry/docpad).
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
# ------- # -------
# #
# * Changwoo Park (https://github.com/pismute) # * Changwoo Park (https://github.com/pismute)
# * Shohei Yoshida (https://github.com/syohex)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
local curcontext="$curcontext" state line ret=1 _docpad_subcommands() {
local -a commands=(
"run:run docpad on your project"
"init:initialize your project"
"generate:(re)generates your project"
"render:render the file at <path> and output its results to stdout"
"watch:watches your project for changes, and (re)generates whenever a change is made"
"clean:ensure everything is cleaned correctly (will remove your out directory)"
"update:update your local DocPad and plugin installations to their latest compatible version"
"upgrade:update your local DocPad and plugin installations to their latest compatible version"
"install:install plugins"
"uninstall:uninstall a plugin"
"info:display the information about your docpad instance"
)
local -a _1st_arguments _describe -t commands 'command' commands "$@"
_1st_arguments=( }
'run: run [options], does everything - skeleton, generate, watch, server'
'server: server [options], creates a server for your generated project'
'skeleton: skeleton [options], will create a new project in your cwd based off an existing skeleton'
'render: render [path], render the file at <path> and output its results to stdout:path:_files'
'generate: (re)generates your project'
'watch: watches your project for changes, and (re)generates whenever a change is made'
'install: ensure everything is installed correctly'
'clean: ensure everything is cleaned correctly'
'info: display the information about your docpad instance'
'help: output the help'
)
_arguments -C \ _docpad() {
'(-h --help)'{-h,--help}'[output usage information]'\ local ret=1
'(-V --version)'{-V,--version}'[output the version number]'\
'(-o --out)'{-o,--out}'[where to output the rendered directory or files]:path:_files'\
'(-c --config)'{-c,--config}'[a custom configuration file to load in]:path:_files'\
'(-e --env)'{-e,--env}'[the environment name to use for this instance, multiple names can be separated with a comma]'\
'(-d --debug)'{-d,--debug}'+[the level of debug messages you would like to display, if specified defaults to 7, otherwise 6]:number'\
'(-f --force)'{-f,--force}'[force a re-install of all modules]'\
'1: :->cmds'\
'*: :_files'&& ret=0
case $state in _arguments \
cmds) '--outpath[a custom directory to place the rendered project]: :_files -/' \
_describe -t commands 'docpad command' _1st_arguments && ret=0 '--config[a custom configuration file to load in]: :_files' \
;; '--env[the environment name to use for this instance, multiple names can be separated with a comma]' \
'--log[the rfc log level to display]:level' \
'(-v --verbose)'{-v,--verbose}'[set log level to 7]' \
'(-d --debug)'{-d,--debug}'[output a log file]' \
'--global[whether or not we should just fire global installation of docpad]' \
'(--color --colour)'{--color,--colour}'[use color terminal output(default: true)]' \
'--silent[do not write anything that is not essential]' \
'--progress[output the progress as it occurs(default: true)]' \
'--version[show version]' \
'(- *)'{-h,--help}'[output usage information]'\
'1: :_docpad_subcommands'\
'*:: :_files' && ret=0
esac return ret
}
return ret _docpad "$@"
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -1,191 +0,0 @@
#compdef drush
# ------------------------------------------------------------------------------
# Copyright (c) 2014 Github zsh-users - http://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for Drush (http://drush.ws).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Vasily Kraev (https://github.com/vasilykraev)
#
# ------------------------------------------------------------------------------
_drush() {
local curcontext='$curcontext' state line cmds ret=1
integer NORMARG
typeset -A opt_args
global_args=('--debug' '--verbose' '--yes' '--no' '--simulate' '--root=' '--uri=')
_arguments -C \
'(--*)'{--version,--version}'[Show drush version.]' \
'(- *)'{-d,--debug}'[Display even more information, including internal messages.]' \
'(- *)'{-v,--verbose}'[Display extra information about the command.]' \
'(- *)'{-y,--yes}'[Assume "yes" as answer to all prompts.]' \
'(- *)'{-n,--no}'[Assume "no" as answer to all prompts.]' \
'(- *)'{-s,--simulate}'[Simulate all relevant actions (don'\''t actually change the system).]' \
'(- *)'{-r,--root=}'[Drupal root directory to use (default: current directory).]' \
'(- *)'{-l,--uri=}'[URI of the drupal site to use (only needed in multisite environments or when running on an alternate port).]' \
'1: :->cmds' \
'*::arg:->args' \
&& ret=0
case $state in
cmds)
_values 'drush command' \
'(archive-dump)'{archive-dump,ard,arb}'[Backup your code, files, and database into a single file.]' \
'(archive-restore)'{archive-restore,arr}'[Expand a site archive into a Drupal web site.]' \
'(cache-clear)'{cache-clear,cc}'[Clear a specific cache, or all drupal caches.]' \
'(core-status)'{core-status,status,st}'[Provides a birds-eye view of the current Drupal installation, if any.]' \
'(core-cron)'{core-cron,cron}'[Run all cron hooks in all active modules for specified site.]' \
'(core-execute)'{core-execute,exec}'[Execute a shell command. Usually used with a site alias.]' \
'(drupal-directory)'{drupal-directory,dd}'[Return the filesystem path for modules/themes and other key folders.]' \
'help[Print this help message.]' \
'image-flush[Flush all derived images for a given style.]' \
'(site-alias)'{site-alias,sa}'[Print an alias record.]' \
'(site-install)'{site-install,si}'[Install Drupal along with modules/themes/configuration using the specified install profile.]' \
'test-clean[Clean temporary tables and files.]' \
'test-run[Run tests. Note that you must use the --uri option.]' \
'(updatedb)'{updatedb,updb}'[Apply any database updates required (as with running update.php).]' \
'(variable-delete)'{variable-delete,vdel}'[Delete a variable.]' \
'(variable-get)'{variable-get,vget}'[Get a list of some or all site variables and values.]' \
'(variable-set)'{variable-set,vset}'[Set a variable.]' \
'(pm-list)'{pm-list,pml}'[Show a list of available extensions (modules and themes).]' \
'(pm-disable)'{pm-disable,dis}'[Disable one or more extensions (modules or themes). Disable dependant extensions as well.]' \
'(pm-download)'{pm-download,dl}'[Download projects from drupal.org or other sources.]' \
'(pm-enable)'{pm-enable,en}'[Enable one or more extensions (modules or themes). Enable dependant extensions as well.]' \
'pm-uninstall[Uninstall one or more modules.]' \
'pm-update[Update Drupal core and contrib projects and apply any pending database updates (Same as pm-updatecode + updatedb).]' \
'(sql-cli)'{sql-cli,sqlc}'[Open a SQL command-line interface using Drupals credentials.]' \
'sql-drop[Drop all tables in a given database.]' \
'sql-dump[Exports the Drupal DB as SQL using mysqldump or equivalent.]' \
'(sql-query)'{sql-query,sqlq}'[Execute a query against the site database.]' \
'sql-sync[Copy and import source database to target database. Transfers via rsync.]' \
'(user-login)'{user-login,uli}'[Display a one time login link for the given user account (defaults to uid 1).]' \
'(user-password)'{user-password,upwd}'[(Re)Set the password for the user account with the specified name.]' \
'(devel-reinstall)'{devel-reinstall,dre}'[Disable, Uninstall, and Install a list of projects. (devel)]' \
'(devel-token)'{devel-token,token}'[List available tokens (devel)]' \
'(generate-content)'{generate-content,genc}'[Create content. (devel_generate)]' \
'(generate-menus)'{generate-menus,genm}'[Create menus and menu items. (devel_generate)]' \
'(generate-terms)'{generate-terms,gent}'[Create terms in specified vocabulary. (devel_generate)]' \
'(generate-users)'{generate-users,genu}'[Create users. (devel_generate)]' \
'(generate-vocabs)'{generate-vocabs,genv}'[Create vocabularies. (devel_generate)]' \
'(features-diff)'{features-diff,fd}'[Show the difference between the default and overridden state of a feature.]' \
'(features-export)'{features-export,fe}'[Export a feature from your site into a module.]' \
'(features-list)'{features-list,fl}'[List all the available features for your site.]' \
'(features-revert)'{features-revert,fr}'[Revert a feature module on your site.]' \
'(features-revert-all)'{features-revert-all,fra}'[Revert all enabled feature module on your site.]' \
'(features-update)'{features-update,fu}'[Update a feature module on your site.]' \
'(features-update-all)'{features-update-all,fua}'[Update all feature modules on your site.]' \
&& ret=0
;;
args)
case $line[1] in
(archive-dump|ard)
_arguments \
'(--description)--description=[Filter out extensions that are provided by drupal core.]' \
'(--destination)--destination=[The full path and filename in which the archive should be stored. If omitted, it will be saved to the drush-backups directory.]' \
'(--no-core)--no-core[Exclude Drupal core, so the backup only contains the site specific stuff.]' \
'(--pipe)--pipe[Only print the destination of the archive. Useful for scripts that don'\''t pass --destination.]' \
'(--tar-options)--tar-options=[Options passed thru to the tar command.]' \
&& ret=0
compadd -a global_args
;;
(archive-restore|arr)
_arguments \
'(--db-prefix)--db-prefix[An optional table prefix to use during restore.]' \
'(--db-su)--db-su[Account to use when creating the new database. Optional.]' \
'(--db-su-pw)--db-su-pw[Password for the "db-su" account. Optional.]' \
'(--db-url)--db-url=[A Drupal 6 style database URL indicating the target for database restore. If not provided, the archived settings.php is used. ]' \
'(--destination)--destination[Specify where the Drupal site should be expanded, including the docroot. Defaults to the current working directory.]' \
'(--overwrite)--overwrite[Allow drush to overwrite any files in the destination.]' \
&& ret=0
compadd -a global_args
;;
(user-password|upwd)
_arguments \
'--password=:Set the password for the username someuser.' \
&& ret=0
;;
(help)
_values 'commands' 'arb' 'archive-dump' 'archive-restore' 'ard' 'arr' 'cache-clear' 'cc' 'core-cron' 'core-execute' 'core-status' 'cron' 'dd' 'devel-reinstall' 'devel-token' 'dis' 'dl' 'dre' 'drupal-directory' 'en' 'exec' 'fd' 'fe' 'features-diff' 'features-export' 'features-list' 'features-revert' 'features-revert-all' 'features-update' 'features-update-all' 'fl' 'fr' 'fra' 'fu' 'fua' 'genc' 'generate-content' 'generate-menus' 'generate-terms' 'generate-users' 'generate-vocabs' 'genm' 'gent' 'genu' 'genv' 'help' 'image-flush' 'pm-disable' 'pm-download' 'pm-enable' 'pm-list' 'pm-uninstall' 'pm-update' 'pml' 'sa' 'si' 'site-alias' 'site-install' 'sql-cli' 'sql-drop' 'sql-dump' 'sql-query' 'sql-sync' 'sqlc' 'sqlq' 'st' 'status' 'test-clean' 'test-run' 'token' 'uli' 'updatedb' 'updb' 'upwd' 'user-login' 'user-password' 'variable-delete' 'variable-get' 'variable-set' 'vdel' 'vget' 'vset'
;;
(cc)
_values 'options' 'all' 'drush' 'theme-registry' 'menu' 'css-js' 'block'
;;
(pm-list|pml)
_arguments \
'(--core)--core[Filter out extensions that are not in drupal core.]' \
'(--no-core)--no-core[Filter out extensions that are provided by drupal core.]' \
'(--pipe)--pipe[Returns a whitespace delimited list of the names of the resulting extensions.]' \
'(--status)--status=-[Filter by extension status. Choices: enabled, disabled and/or "not installed".]:status:(enabled disabled)' \
'(--type)--type=-[Filter by extension type. Choices: module, theme.]:type:(module theme)' \
&& ret=0
;;
(pm-disable|dis)
_modules=( $(drush pml --status=enabled --pipe) )
if [[ $_modules != "" ]]; then
_values 'enabled modules' $_modules
fi
;;
(pm-enable|en)
_arguments -C \
'--resolve-dependencies[Attempt to download any missing dependencies. At the moment, only works when the module name is the same as the project name.]' \
'--skip[Skip automatic downloading of libraries (c.f. devel).]' && ret=0
_modules=( $(drush pml --status="disabled,not installed" --pipe) )
if [[ $_modules != "" ]]; then
_values -s 'not yet enabled modules' $_modules && ret=0
fi
;;
(*)
_values 'Global options' \
{-d,--debug}'[Display even more information, including internal messages.]' \
{-v,--verbose}'[Display extra information about the command.]' \
{-y,--yes}'[Assume "yes" as answer to all prompts.]' \
{-n,--no}'[Assume "no" as answer to all prompts.]' \
{-s,--simulate}'[Simulate all relevant actions (don'\''t actually change the system).]' \
{-r,--root=}'[Drupal root directory to use (default: current directory).]' \
{-l,--uri=}'[URI of the drupal site to use (only needed in multisite environments or when running on an alternate port).]'
;;
esac
;;
esac
}
_drush '$@'
# 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

@ -3,7 +3,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for ecdsaultils v0.4.0 (https://github.com/tcatm/ecdsautils) # Completion script for ecdsaultils v0.4.0 (https://github.com/freifunk-gluon/ecdsautils)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -19,16 +19,15 @@ _ecdsautil_args() {
_arguments '1:somefile:_files' _arguments '1:somefile:_files'
;; ;;
(verify) (verify)
_arguments '-s[signature]:secret:_files' '-p[publickey]:pubkey:_files' _arguments \
'-n[signaturecount]:signaturecount:""' ':file:_files' '-s[signature]:secret:_files' '-p[publickey]:pubkey:_files' \
'-n[signaturecount]:signaturecount:""' ':file:_files'
;; ;;
esac esac
} }
_ecdsautil() { _ecdsautil() {
local -a commands local -a commands=(
commands=(
"help:Show help" "help:Show help"
"generate-key:generate a new secret on stdout" "generate-key:generate a new secret on stdout"
"show-key:output public key of secret read from stdin" "show-key:output public key of secret read from stdin"
@ -38,16 +37,24 @@ _ecdsautil() {
_arguments -C \ _arguments -C \
'1:cmd:->cmds' \ '1:cmd:->cmds' \
'*:: :->args' \ '*:: :->args'
case "$state" in case "$state" in
(cmds) (cmds)
_describe -t commands 'commands' commands _describe -t commands 'commands' commands
;; ;;
(*) (*)
_ecdsautil_args _ecdsautil_args
;; ;;
esac esac
} }
_ecdsautil "$@" _ecdsautil "$@"
# 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

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

131
src/_emacs Normal file
View File

@ -0,0 +1,131 @@
#compdef emacs emacsclient
# ------------------------------------------------------------------------------
# Copyright (c) 2022 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
#
# 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 emacs 31. (https://www.gnu.org/software/emacs/)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei YOSHIDA (https://github.com/syohex)
#
# ------------------------------------------------------------------------------
case $service in
(emacs)
_arguments -s \
'--batch[do not do interactive display, implies -q]' \
'--chdir[change to directory]:dir:_files -/' \
'(--daemon --bg-daemon --fg-daemon)'{--daemon,--bg-daemon=-}'[start a named server in the background]::name' \
'(--daemon --bg-daemon --fg-daemon)--fg-daemon=-[start a named server in the foreground]::name' \
'--debug-init[enable Emacs Lisp debugger for init file]' \
'(-d --display)'{-d,--display}'[use X server DISPLAY]:display:_x_display' \
'--module-assertions[assert behavior of dynamic modules]' \
'--dump-file[read dumped state from FILE]:file:_files' \
'(- *)--fingerprint[output fingerprint and exit]' \
'--seccomp=[read Seccomp BPF filter from FILE]: :_files' \
'--no-build-details[do not add build details such as time stamps]' \
'--no-desktop[do not load a saved desktop]' \
'(-q --no-init-file)'{-q,--no-init-file}'[loader neither ~/.emacs nor default.el]' \
'(-nl --no-loadup)'{-nl,--no-loadup}'[do not load loadup.el]' \
'--no-site-file[do not load site-start.el]' \
'--no-x-resources[do not load X resources]' \
'(-nsl --no-site-lisp)'{-nsl,--no-site-lisp}'[do not add site-lisp directories to load-path]' \
'--no-splash[do not display a splash screen on startup]' \
'(-nw --no-window-system)'{-nw,--no-window-system}'[do not communicate with X, ignoring $DISPLAY]' \
'--init-directory=[use DIR when looking for the Emacs init files]:dir:_files -/' \
'(-Q --quick)'{-Q,--quick}'[equivalent to -q --no-site-file --no-site-lisp --no-splash --no-x-resources]' \
'--script[run FILE as an Emacs Lisp script]:file:_files' \
'-x[same as -Q --script]' \
'(-t --terminal)'{-t,--terminal}'[use DEVICE for terminal IO]: :_files' \
'(-u --user)'{-u,--user}"[load user's init file instead of your own]" \
\*{-L,--directory}'[prepend DIR to load-path(with :DIR, append DIR)]: :_files -/' \
{--eval,--execute}'[evaluate Emacs Lisp expression EXPR]:expr' \
\*{--file,--find-file,--visit}'[visit FILE]: :_files' \
\*{-f,--funcall}'[call Emacs Lisp function FUNC with no arguments]:func' \
'--insert[insert contents of FILE into current buffer]:file:_files' \
'--kill[exit without asking for confirmation]' \
\*{-l,--load}'[load Emacs Lisp FILE using the load function]: :_files' \
'(-bg --background-color)'{-bg,--background-color}'[window background color]:color' \
'(-D --basic-display)'{-D,--basic-display}'[disable many display features]' \
'(-bd --border-color)'{-bd,--border-color}'[main border color]:color' \
'(-bw --border-width)'{-bw,--border-width}'[width of main border]' \
'--color=-[override color mode for character terminals]:: :(auto never always ansi8)' \
'(-cr --cursor-color)'{-cr,--cursor-color}'[color of the Emacs cursor indicating point]:color' \
'(-fn --font)'{-fn,--font}'[default font, must be fixed-width]:font' \
'(-fg --foreground)'{-fg,--foreground}'[window foreground color]:color' \
'(-fh --fullheight)'{-fh,--fullheight}'[make the first frame high as the screen]' \
'(-fs --fullscreen)'{-fs,--fullscreen}'[make the first frame fullscreen]' \
'(-fw --fullwidth)'{-fw,--fullwidth}'[make the first frame wide as the screen]' \
'(-mm --maximized)'{-mm,--maximized}'[make the first frame maximized]' \
'(-g --geometry)'{-g,--geometry}'[window geometry]:geometry' \
'(-nbi --no-bitmap-icon)'{-nbi,--no-bitmap-icon}'[do not use picture of gnu for Emacs icon]' \
'--iconic[start Emacs in iconified state]' \
'(-ib --internal-border)'{-ib,--internal-border}'[width between text and main border]:width' \
'(-lsp --line-spacing)'{-lsp,--line-spacing}'[additional space to put between lines]' \
'(-ms --mouse-color)'{-ms,--mouse-color}'[mouse cursor color in Emacs window]:color' \
'(-T --name --title)'{-T,--name,--title}'[title for initial Emacs frame]:title' \
'(-nbc --no-blinking-cursor)'{-nbc,--no-blinking-cursor}'[disable blinking cursor]' \
'(-r -rv --reverse-video)'{-r,-rv,--reverse-video}'[switch foreground and background]' \
'(-vb --vertical-scroll-bars)'{-vb,--vertical-scroll-bars}'[enable vertical scroll bars]' \
'--xrm[set additional X resources]:resource' \
'--parent-id[set parent window]:xid' \
'(- *)--help[display help and exit]' \
'(- *)--version[output version information and exit]' \
'*:: :_files'
;;
(emacsclient)
_arguments -s -n : \
'(- *)'{-V,--version}'[Print version information and exit]' \
'(- *)'{-H,--help}'[Print this usage information message and exit]' \
'(-nw -t --tty --no-window-system)'{-nw,-t,--tty,--no-window-system}'[Open a new Emacs frame on the current terminal]' \
'(-c --create-frame)'{-c,--create-frame}'[Create a new frame instead of trying to use the current Emacs frame]' \
'(-r --reuse-frame)'{-r,--reuse-frame}'[Create a new frame if none exists, otherwise use the current Emacs frame]' \
'(-F --frame-parameters)'{-F,--frame-parameters=}'[Set the parameters of a new frame]:alist' \
'(-e --eval)'{-e,--eval}'[Evaluate as Emacs Lisp expressions]' \
'(-n --no-wait)'{-n,--no-wait}'[Returns immediately without waiting for finish]' \
'(-w --timeout)'{-w,--timeout=}'[Seconds to wait before timing out]:seconds' \
'(-q --quiet)'{-q,--quiet}"[Don't display messages on success]" \
'(-u --suppress-output)'{-u,--suppress-output}"[Don't display return values from the server]" \
'(-d --display)'{-d,--display=}'[Tell the server to display the files on the given display]:display:_x_display' \
'--parent-id=[Open in parent window ID, via XEmbed]' \
'(-s --socket-name)'{-s,--socket-name=}'[Set filename of the UNIX socket for communication]: :_files' \
'(-f --server-file)'{-f,--server-file=}'[Set filename of the TCP authentication file]: :_files' \
'(-a --alternate-editor)'{-a,--alternate-editor=}'[Editor to fallback to if the server is not running if EDITOR is the empty string]:editor:_files' \
'(-T --tramp)'{-T,--tramp=}'[PREFIX to prepend to filenames sent by emacsclient for locating files remotely via Tramp]:prefix' \
'*:: :_files'
;;
esac
# 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

@ -3,8 +3,8 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for emulator (Android Emulator) 12.0 # Completion script for emulator (Android Emulator) 35.3.11.0
# (http://developer.android.com/guide/developing/tools/emulator.html). # (https://developer.android.com/studio/run/emulator-command).
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -14,119 +14,274 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_emulator() {
typeset -A opt_args
local context state line curcontext="$curcontext"
local ret=1
typeset -A opt_args local -a option_names=(
local context state line curcontext="$curcontext" list-avds sysdir system vendor writable-system delay-adb datadir
kernel ramdisk image initdata data encryption-key logcat-output
partition-size cache cache-size no-cache nocache sdcard
quit-after-boot qemu-top-dir monitor-adb snapstorage
no-snapstorage snapshot no-snapshot no-snapshot-save
no-snapshot-load force-snapshot-load qcow2-for-userdata
snapshot-list no-snapshot-update-time wipe-data avd avd-arch
skindir skin no-skin noskin memory ui-only id cores accel no-accel
ranchu engine netspeed netdelay netfast code-profile show-kernel
shell no-jni nojni dalvik-vm-checkjni logcat log-nofilter
log-detailed no-audio noaudio audio radio port ports
modem-simulator-port onion onion-alpha onion-rotation dpi-device
scale wifi-client-port wifi-server-port http-proxy timezone
change-language change-country change-locale dns-server net-tap
net-socket net-tap-script-up net-tap-script-down cpu-delay
no-boot-anim no-window qt-hide-window no-sim lowram version
no-passive-gps gnss-file-path gnss-grpc-port virtio-console
read-only is-restart report-console gps shell-serial tcpdump
bootchart charmap studio-params prop shared-net-id nand-limits gpu
use-host-vulkan vsync-rate camera-back camera-front webcam-list
virtualscene-poster screen selinux unix-pipe fixed-scale
wait-for-debugger skip-adb-auth metrics-to-console
metrics-collection metrics-to-file no-metrics detect-image-hang
feature icc-profile sim-access-rules-file phone-number acpi-config
fuchsia window-size allow-host-audio restart-when-stalled
perf-stat share-vid grpc grpc-tls-key grpc-tls-cer grpc-tls-ca
grpc-use-token grpc-use-jwt grpc-allowlist idle-grpc-timeout
waterfall grpc-ui packet-streamer-endpoint netsim-args
multidisplay google-maps-key no-location-ui use-keycode-forwarding
record-session legacy-fake-camera camera-hq-edge no-direct-adb
check-snapshot-loadable no-hidpi-scaling no-mouse-reposition
guest-angle usb-passthrough append-userspace-opt save-path
no-nested-warnings wifi-tap wifi-tap-script-up
wifi-tap-script-down wifi-socket vmnet-bridged vmnet-shared
vmnet-start-address ting mnet_end_address vmnet-end-address
vmnet-subnet-mask vmnet-isolated wifi-user-mode-options
network-user-mode-options adb-path hotplug-multi-display xts
wifi-mac-address no-ethernet android-serialno
)
_list_avds() { local -a help_flags=()
for name in $option_names[@]
do
help_flags+=("(- *)-help-${name}[print -${name} help message]")
done
# TODO All image options are contextual to -sysdir value
# TODO All skin options are contextual to -skindir value
# TODO snapshot options are mutually exclusive
# TODO Use '-snapshot-list' output for snapshot names
# TODO -logcat: use completer from _adb
# TODO Complete options with device values
# TODO Complete -prop
_arguments -C \
'-list-avds[list available AVDs]' \
'-sysdir[search for system disk images in the directory]: :_files -/' \
'-vendor[read initial vendor image]: :_files' \
"-writable-system[make system image writable after 'adb remount']" \
'-delay-adb[delay adb communication till boot completes]' \
'-datadir[write user data into the directory]: :_files -/' \
'-kernel[use specific emulated kernel]: :_files' \
'(-system -image)'{-system,-image}'[read initial system image from the file]: :_files -g "*.img"' \
'-ramdisk[ramdisk image (default <system>/ramdisk.img]: :_files -g "*.img"' \
"-initdata[same as '-init-data <file>']: :_files" \
'-data[data image (default <datadir>/userdata-qemu.img]: :_files -g "*.img"' \
'-encryption-key[read initial encryption key image]: :_files' \
'-logcat-output[output file of logcat]: :_files' \
'-partition-size[system/data partition size]:size (in MBs)' \
'(-no-cache -nocache)-cache[cache partition image (default is temporary file)]: :_files -g "*.img"' \
'(-cache -no-cache -nocache)'{-no-cache,-nocache}'[disable the cache partition]' \
'-sdcard[SD card image (default <system>/sdcard.img]: :_files -g "*.img"' \
'-quit-after-boot[quit emulator after guest boots completely]' \
'-qemu-top-dir[use the emulator in the specified dir]: :_files -/' \
'-monitor-adb[monitor the adb messages between guest and host]:verbose_level' \
'(-no-snapstorage)-snapstorage[file that contains all state snapshots]: :_files -g "*.img"' \
'(-snapstorage)-no-snapstorage[do not mount a snapshot storage file]' \
"-snapshot[name of snapshot within storage file for auto-start and auto-save]:snapshot name" \
'-no-snapshot[perform a full boot and do not do not auto-save, but qemu vmload and vmsave operate on snapstorage]' \
'-no-snapshot-save[do not auto-save to snapshot on exit: abandon changed state]' \
'-no-snapshot-load[do not auto-start from snapshot: perform a full boot]' \
'-force-snapshot-load[force starting from snapshot]' \
'-qcow2-for-userdata[use qcow2 for userdata]' \
'-snapshot-list[show a list of available snapshots]' \
'-no-snapshot-update-time[do not do try to correct snapshot time on restore]' \
'-wipe-data[reset the user data image (copy it from initdata)]' \
'-avd[use a specific android virtual device]:android virtual device name:($(_emulator_list_avds))' \
'-avd-arch[use a specific target architecture]:target' \
'-skindir[search skins in <dir> (default <system>/skins)]: :_files -/' \
'-skin[select a given skin]' \
'(-noskin -no-skin)'{-noskin,-no-skin}'[don'\''t use any emulator skin]' \
'-memory[physical RAM size in MBs]:size (in MBs)' \
'-ui-only[run only the UI feature requested]:feature' \
'-id[assign an ID to this virtual device]:id' \
'-cores[Set number of CPU cores to emulator]:number' \
'(-no-accel)-accel[Configure emulation acceleration]:mode' \
"(-accel)-no-accel[Same as '-accel off']" \
'-ranchu[use new emulator backend instead of the classic one]' \
'-engine[select engine]:engine:(auto classic qemu2)' \
'-netspeed[maximum network download/upload speeds]:speed' \
'-netdelay[network latency emulation]:delay' \
'-netfast[disable network shaping]' \
'-code-profile[enable code profiling]:profile' \
'-show-kernel[display kernel messages]' \
'-shell[enable root shell on current terminal]' \
{-no-jni,-nojni}'[disable JNI checks in the Dalvik runtime]' \
'-logcat[enable logcat output with given tags]:logcat tags' \
'-logcat-nofilter[disable the duplicate log filter]' \
'-log-detailed[enable detailed logging info]' \
'(-audio -noaudio -no-audio)'{-noaudio,-no-audio}'[disable audio support]' \
'(-noaudio -no-audio)-audio[use specific audio backend]:audio backend' \
'-radio[redirect radio modem interface to character device]:device' \
'-port[TCP port that will be used for the console]:port number' \
'-ports[TCP ports used for the console and adb bridge]:console port,adb port' \
'-modem-simulator-port[TCP port to use for android modem simulator]:port' \
'-onion[use overlay PNG image over screen]: :_files -g "*.(png|PNG)"' \
'-onion-alpha[specify onion-skin translucency]:percentage' \
'-onion-rotation[specify onion-skin rotation]:rotation:(0 1 2 3)' \
'-dpi-device[specify device'\''s resolution in dpi (default 165)]:dpi' \
'-scale[scale emulator window]:scale' \
'-wifi-client-port[connect to other emulator for WiFi forwarding]:port' \
'-wifi-server-port[listen to other emulator for WiFi forwarding]:port' \
'-http-proxy[make TCP connections through a HTTP/HTTPS proxy]:proxy' \
"-timezone[use this timezone instead of the host's default]:timezone" \
'-change-language[use this language instead of the current one]:language' \
'-change-country[use this country instead of the current one]:country' \
'-change-locale[use this locale instead of the current one]' \
'-dns-server[use this DNS server(s) in the emulated system]:DNS servers' \
'-net-tap[use this TAP interface for network]:interface' \
'-net-socket[use Socket interface for network]:option' \
'-net-tap-script-up[script to run when the TAP interface goes up]: :_files' \
'-net-tap-script-down[script to run when the TAP interface goes down]: :_files' \
'-cpu-delay[throttle CPU emulation]:CPU delay' \
'-no-boot-anim[disable animation for faster boot]' \
'-no-window[disable graphical window display]' \
'-qt-hide-window[start QT window but hide window display]' \
'-no-sim[device has no SIM card]' \
'-lowram[device is a low ram device]' \
'(- : *)-version[display emulator version number]' \
'-no-passive-gps[disable passive gps updates]' \
'-gnss-file-path[use the specified filepath to read gnss data]: :_files' \
'-gnss-grpc-port[use the specified port number to start grpc service]:port' \
'-virtio-console[using virtio console as console]' \
'-read-only[allow running multiple instances of emulators on the same AVD]' \
'-is-restart[specify that this emulator was a restart and to wait out given PID]: :_pids' \
'-report-console[report console port to remote socket]: :_socket' \
'-gps[redirect NMEA GPS to character device]:device' \
'-shell-serial[specific character device for root shell]:device' \
'-tcpdump[capture network packets to file]: :_files' \
'-bootchart[enable bootcharting]:timeout' \
'-charmap[use specific key character map]: :_files' \
'*-prop[set system property on boot]:name=value' \
'-shared-net-id[join the shared network, using IP address 10.1.2.<number>]:number' \
'-nand-limits[enforce NAND/Flash read/write thresholds]:limits' \
'-gpu[set hardware OpenGLES emulation mode]:mode' \
'-use-host-vulkan[use host for vulkan emulation regardless of "gpu" mode]' \
'-vsync-rate[set the vsync rate]:rate' \
'-camera-back[set emulation mode for a camera facing back]:mode' \
'-camera-front[set emulation mode for a camera facing front]:mode' \
'-webcam-list[list web cameras available for emulation]' \
'*-virtualscene-poster[load a png or jpeg image as a poster in the virtual scene]' \
'-screen[set emulated screen mode]:mode' \
'-selinux[set SELinux mode]:mode:(disabled permissive)' \
'-unix-pipe[add path to the list of allowed Unix pipes]:file:_files' \
'-fixed-scale[use fixed 1:1 scale for the initial emulator window]' \
'-wait-for-debugger[pause an launch and wait for a debugger process to attach before resuming]' \
'-skip-adb-auth[skip adb authentication dialogue]' \
'-metrics-to-console[enable usage metrics and print the messages to stdout]' \
'-metrics-collection[enable usage metrics and send them to google play]' \
'-metrics-to-file[enable usage metrics and write the messages into specified file]: :_files' \
'-no-metrics[disable metrics collection]' \
'-detect-image-hang[enable the detection of system image hangs]' \
'*-feature[force-enable or disable the features]:name' \
'-icc-profile[use icc profile from specified file]: :_files' \
'-sim-access-rules-file[use SIM access rules from specified file]: :_files' \
'-phone-number[set the phone number of the emulated device]:phone_number' \
'-acpi-config[specify acpi device properties]: :_files' \
'-fuchsia[run Fuchsia image]' \
'-window-size[set window size for when bypassing android-specific setup]:size' \
'-allow-host-audio[allow sending of audio from audio input devices]' \
'-restart-when-stalled[allow restarting guest when it is stalled]' \
'-perf-stat[run pediodic perf stat reporter in the background and output to specified file]: :_files' \
'-share-vid[share current video state in shared memory region]' \
'-grpc[TCP ports used for the gRPC bridge]' \
'-grpc-tls-key[file with the private key used to enable gRPC TLS]: :_files' \
'-grpc-tls-cer[file with the public X509 certificate used to enable gRPC TLS]: :_files' \
'-grpc-tls-ca[file with the Certificate Authorities used to validate client certificates]: :_files' \
'-grpc-use-token[use the emulator console token for gRPC authentication]' \
'-grpc-use-jwt[use a signed JWT token for gRPC authentication]' \
'-grpc-allowlist[use a custom allow list for gRPC authentication]: :_files' \
'-idle-grpc-timeout[terminate the emulrator if there is no gRPC activity within the given second]:seconds' \
'-waterfall[mode in which to run waterfall]:mode' \
'-grpc-ui[use the experimental gRPC ui]' \
'-packet-streamer-endpoint[use the provided packet streamer endpoint when present]:uri:_urls' \
'-netsim-args[additional netsim arguments]' \
'-google-maps-key[API key to use with the Google Maps GUI]:api_key' \
'-no-location-ui[disable the location UI in the extended window]' \
'-use-keycode-forwarding[use keycode forwarding instead of host charmap translation]' \
'-record-session[screen record the emulator session]' \
'-legacy-fake-camera[use legacy camera HAL for the emulated fake camera]' \
'-camera-hq-edge[enable high qualify edge processing for emulated camera]' \
'-no-direct-adb[use external adb executable for internal communication]' \
'-check-snapshot-loadable[check if a snapshot is loadable]' \
'-no-hidpi-scaling[disable HiDPI scaling of guest display on macOS devices]' \
'-no-mouse-reposition[do not reposition the mouse to emulator window center]' \
'-guest-angle[enable guest ANGLE as system driver]' \
'-usb-passthrough[host USB device Passthrough]:param' \
'*-append-userspace-opt[append a property which is passed to the userspace]:param' \
'-save-path[override save path for screenshot and bug report]: :_files' \
'-no-nested-warnings[disable warning dialog when emulator is running in nested virtualization]' \
'-wifi-tap[use this TAP interface for Virtio Wi-Fi]: :_files' \
'-wifi-tap-script-up[script to run when the TAP interface goes up]: :_files' \
'-wifi-tap-script-down[script to run when the TAP interface goes down]: :_files' \
'-wifi-socket[use Socket interface for Virtio Wi-Fi]: :_socket' \
'-vmnet-bridged[enable vmnet framework in shared mode]: :_files' \
'-vmnet-shared[enable vmnet framework in shared mode]' \
'-vmnet-start-address[starting IPv4 address to assing using DHCP]:v4_addr' \
'-vmnet-end-address[ending IPv4 address to assing using DHCP]:v4_addr' \
'-vmnet-subnet-mask[IPv4 netmask to assing using DHCP]:v4_addr' \
'-vmnet-isolated[enable isolation for the interface]' \
'-wifi-user-mode-options[override default user mode networking option for wifi network]:options' \
'-network-user-mode-options[override default user mode networking option for both radio and wifi network]:options' \
'-adb-path[use adb binary from specified path]: :_files' \
'-hotplug-multi-display[use the HAL hotplug display to implement multiDisplay]' \
'-xts[use android64-xts CPU profile instead of the default one]' \
'-wifi-mac-address[override the mac address of the wlan0 interface in AVD]:mac_address' \
'-no-ethernet[disable virtual Ethernet interface en0]' \
'-android-serialno[set customized android serial number]:serial_no' \
'-qemu[pass arguments to qemu]:arguments' \
"-verbose[same as '-debug-init']" \
'*'{-debug,-debug-,-debug-no-}'[enable/disable specific debug messages]:tag' \
'(- : *)-help[display help information]' \
'(- : *)-help-disk-images[about disk images]' \
'(- : *)-help-debug-tags[debug tags for -debug <tags>]' \
'(- : *)-help-char-devices[character <device> specification]' \
'(- : *)-help-environment[environment variables]' \
'(- : *)-help-virtual-device[virtual device management]' \
'(- : *)-help-sdk-images[about disk images when using the SDK]' \
'(- : *)-help-build-images[about disk images when building Android]' \
'(- : *)-help-all[prints all help content]' \
$help_flags[@] \
'1: :->cmds' \
'*:: :->args' && ret=0
case $state in
(cmds)
local -a avds=($(_emulator_list_avds))
for ((i=1; i<=${#avds[@]}; i++)); do
avds[i]="@${avds[i]}"
done
_values 'avds' "${avds[@]}"
;;
esac
return ret
}
_emulator_list_avds() {
local -a _avds=($HOME/.android/avd/*.ini(N.:t:r)) local -a _avds=($HOME/.android/avd/*.ini(N.:t:r))
echo "${_avds[@]}" echo "${_avds[@]}"
} }
# TODO All image options are contextual to -sysdir value _emulator "$@"
# TODO All skin options are contextual to -skindir value
# TODO snapshot options are mutually exclusive
# TODO Use '-snapshot-list' output for snapshot names
# TODO -logcat: use completer from _adb
# TODO Complete options with device values
# TODO Complete -prop
_arguments \
'(- : *)-version[display emulator version number]' \
'(- : *)-help[display help information]' \
'(- : *)-help-disk-images[about disk images]' \
'(- : *)-help-keys[supported key bindings]' \
'(- : *)-help-debug-tags[debug tags for -debug <tags>]' \
'(- : *)-help-char-devices[character <device> specification]' \
'(- : *)-help-environment[environment variables]' \
'(- : *)-help-keyset-file[key bindings configuration file]' \
'(- : *)-help-virtual-device[virtual device management]' \
'(- : *)-help-sdk-images[about disk images when using the SDK]' \
'(- : *)-help-build-images[about disk images when building Android]' \
'(- : *)-help-all[prints all help content]' \
'(- : *)-help-'{version,list-avds,sysdir,system,writable-system,image,datadir,kernel,ramdisk,initdata,data,partition-size,cache,no-cache,nocache,sdcard,snapstorage,no-snapstorage,snapshot,no-snapshot,no-snapshot-save,no-snapshot-load,snapshot-list,no-snapshot-update-time,wipe-data,avd,skindir,skin,noskin,no-skin,memory,cores,accel,no-accel,netspeed,netdelay,netfast,trace,show-kernel,shell,no-jni,nojni,logcat,noaudio,no-audio,audio,raw-keys,radio,port,ports,onion,onion-alpha,onion-rotation,scale,dpi-device,http-proxy,timezone,dns-server,cpu-delay,no-boot-anim,no-window,report-console,gps,keyset,shell-serial,tcpdump,bootchart,charmap,prop,shared-net-id,nand-limits,memcheck,qemu,verbose}'[print option-specific help]' \
'-list-avds[list available AVDs]' \
'-sysdir[search for system disk images in the directory]: :_files -/' \
'(-system -image)'{-system,-image}'[read initial system image from the file]: :_files -g "*.img"' \
'-writable-system[make system image writable after '\''adb remount'\'']' \
'-datadir[write user data into the directory]: :_files -/' \
'-kernel[use specific emulated kernel]: :_files' \
'-ramdisk[ramdisk image (default <system>/ramdisk.img]: :_files -g "*.img"' \
'-initdata[same as '\''-init-data <file>'\'']: :_files' \
'-data[data image (default <datadir>/userdata-qemu.img]: :_files -g "*.img"' \
'-partition-size[system/data partition size]:size (in MBs)' \
'(-no-cache -nocache)-cache[cache partition image (default is temporary file)]: :_files -g "*.img"' \
'(-cache -no-cache -nocache)'{-no-cache,-nocache}'[disable the cache partition]' \
'-sdcard[SD card image (default <system>/sdcard.img]: :_files -g "*.img"' \
'(-no-snapstorage)-snapstorage[file that contains all state snapshots (default <datadir>/snapshots.img)]: :_files -g "*.img"' \
'(-snapstorage)-no-snapstorage[do not mount a snapshot storage file (this disables all snapshot functionality)]' \
'-snapshot[name of snapshot within storage file for auto-start and auto-save (default '\''default-boot'\'')]:snapshot name' \
'-no-snapshot[perform a full boot and do not do not auto-save, but qemu vmload and vmsave operate on snapstorage]' \
'-no-snapshot-save[do not auto-save to snapshot on exit: abandon changed state]' \
'-no-snapshot-load[do not auto-start from snapshot: perform a full boot]' \
'-snapshot-list[show a list of available snapshots]' \
'-no-snapshot-update-time[do not do try to correct snapshot time on restore]' \
'-wipe-data[reset the user data image (copy it from initdata)]' \
'-avd[use a specific android virtual device]:android virtual device name:($(_list_avds))' \
'-skindir[search skins in <dir> (default <system>/skins)]: :_files -/' \
'-skin[select a given skin]' \
'(-noskin -no-skin)'{-noskin,-no-skin}'[don'\''t use any emulator skin]' \
'-memory[physical RAM size in MBs]:size (in MBs)' \
'-cores[Set number of CPU cores to emulator]:number' \
'(-no-accel)-accel[Configure emulation acceleration]:mode' \
'(-accel)-no-accel[Same as '\''-accel off'\'']' \
'-netspeed[maximum network download/upload speeds]:speed' \
'-netdelay[network latency emulation]:delay' \
'-netfast[disable network shaping]' \
'-trace[enable code profiling (F9 to start)]:trace name' \
'-show-kernel[display kernel messages]' \
'-shell[enable root shell on current terminal]' \
{-no-jni,-nojni}'[disable JNI checks in the Dalvik runtime]' \
'-logcat[enable logcat output with given tags]:logcat tags' \
'(-audio -noaudio -no-audio)'{-noaudio,-no-audio}'[disable audio support]' \
'(-noaudio -no-audio)-audio[use specific audio backend]:audio backend' \
'-raw-keys[disable Unicode keyboard reverse-mapping]' \
'-radio[redirect radio modem interface to character device]:device' \
'-port[TCP port that will be used for the console]:port number' \
'-ports[TCP ports used for the console and adb bridge]:console port,adb port' \
'-onion[use overlay PNG image over screen]: :_files -g "*.(png|PNG)"' \
'-onion-alpha[specify onion-skin translucency]:percentage' \
'-onion-rotation[specify onion-skin rotation]:rotation:((1 2 3 4))' \
'-scale[scale emulator window]:scale' \
'-dpi-device[specify device'\''s resolution in dpi (default 165)]:dpi' \
'-http-proxy[make TCP connections through a HTTP/HTTPS proxy]:proxy' \
'-timezone[use this timezone instead of the host'\''s default]:timezone' \
'-dns-server[use this DNS server(s) in the emulated system]:DNS servers' \
'-cpu-delay[throttle CPU emulation]:CPU delay' \
'-no-boot-anim[disable animation for faster boot]' \
'-no-window[disable graphical window display]' \
'-report-console[report console port to remote socket]: :_socket' \
'-gps[redirect NMEA GPS to character device]:device' \
'-keyset[specify keyset file name]: :_files' \
'-shell-serial[specific character device for root shell]:device' \
'-tcpdump[capture network packets to file]: :_files' \
'-bootchart[enable bootcharting]:timeout' \
'-charmap[use specific key character map]: :_files' \
'*-prop[set system property on boot]:name=value' \
'-shared-net-id[join the shared network, using IP address 10.1.2.<number>]:number' \
'-nand-limits[enforce NAND/Flash read/write thresholds]:limits' \
'-memcheck[enable memory access checking]:flags' \
'-qemu[pass arguments to qemu]:arguments' \
'-verbose[same as '\''-debug-init'\'']' \
'*'{-debug,-debug-,-debug-no-}'[enable/disable specific debug messages]:tag' \
'1: :->cmds' \
'*:: :->args' && ret=0
case $state in
cmds)
local -a _avds=($(_list_avds))
for ((i=1; i<=${#_avds[@]}; i++)); do
_avds[i]="@${_avds[i]}"
done
_values 'avds' "${_avds[@]}"
;;
esac
return ret
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -39,11 +39,19 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
args=( 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]' '(-)'--version'[display version information and exit]'
'(-)1:directory: _path_files -/' '(-)1:directory: _path_files -/'
'(-)2:command: _command_names -e' '(-)2:command: _command_names -e'
'*::arguments: _precommand' '*::arguments: _precommand'
) )
_arguments -S $args _arguments -S $args
# 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

@ -1,6 +1,6 @@
#compdef exportfs #compdef exportfs
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2011 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -37,15 +37,22 @@
# * Timofey Titovets <nefelim4ag@gmail.com> # * Timofey Titovets <nefelim4ag@gmail.com>
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_exportfs() {
_values -w 'option' \ _arguments \
'(-i)-a[Export or unexport all directories]' \ '(-d --debug)'{-d,--debug}'[Turn on debugging]:kind:(all auth call general parse)' \
'(-a -r -u)-i[Ignore the /etc/exports file and files under /etc/exports.d directory]' \ '(-i)-a[Export or unexport all directories]' \
'(-i)-r[Reexport all directories]' \ '(-a -r -u)-i[Ignore the /etc/exports file and files under /etc/exports.d directory]' \
'(-i)-u[Unexport one or more directories]' \ '-o[Specify a list of export options in the same manner as in exports]:option' \
'-f[Flush everything out of export table]' \ '(-i)-r[Reexport all directories]' \
'-o[option1,option2.. Specify a list of export options]' \ '(-i)-u[Unexport one or more directories]' \
'-s[Display the current export list suitable for /etc/exports]' \ "-f[Flush everything out of kernel's export table]" \
'-v[Be verbose]' '-v[Be verbose]' \
} '-s[Display the current export list suitable for /etc/exports]'
_exportfs "$@"
# 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

@ -1,6 +1,6 @@
#compdef fab #compdef fab
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2015 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2015 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,9 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for Fabric (http://fabfile.org) # Completion script for Fabric v3.2.2 (https://www.fabfile.org/)
#
# Source: https://github.com/vhbit/fabric-zsh-autocomplete
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -40,65 +38,42 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_fab_tasks() {
local curcontext=$curcontext state line local -a tasks=(${(f)"$(fab --list 2>/dev/null| awk '/^ /{first=$1;$1="";print first ":" substr($0, 2) }')"})
declare -A opt_args if (( $#tasks > 0)); then
_describe -t 'task' tasks tasks
declare target_list fi
target_list=(`fab --shortlist 2>/dev/null`)
_targets() {
_describe -t commands "fabric targets" target_list
} }
output_levels=( _arguments \
'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.' '--complete[Print tab-completion candidates for given parse remainder]' \
'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!' "--hide=[Set default value of run()'s 'hide' kwarg]:str" \
'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.' '(- *)--list-agent-keys[Display ssh-agent key list, and exit]' \
'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''.' '--no-dedupe[Disable task deduplication]' \
'stdout: Local, or remote, stdout, i.e. non-error output from commands.' '--print-completion-script=[Print the tab-completion script for your preferred shell]:shell:(bash zsh fish)' \
'stderr: Local, or remote, stderr, i.e. error-related output from commands.' '--prompt-for-login-password[Request an upfront SSH-auth password prompt]' \
'user: User-generated output, i.e. local output printed by fabfile code via use of the fastprint or puts functions.' '--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]' \
_arguments -w -S -C \ '(-c --collection)'{-c,--collection=}'[Specify collection name to load]:name' \
'(-)'{-h,--help}'[show this help message and exit]: :->noargs' \ '(-d --debug)'{-d,--debug}'[Enable debug output]' \
'(-)'{-V,--version}'[show program'\''s version number and exit]: :->noargs' \ '(-D --list-depth)'{-D,--list-depth=}'[When listing tasks, only show the first INT levels]:level' \
'(-)--list[print list of possible commands and exit]: :->noargs' \ '(-e --echo)'{-e,--echo}'[Echo executed commands before running]' \
'(-)--shortlist[print non-verbose list of possible commands and exit]: :->noargs' \ '(-f --config)'{-f,--config=}'[Runtime configuration file to use]:file:_files' \
'(--reject-unknown-hosts)--reject-unknown-hosts[reject unknown hosts]' \ '(-F --list-format)'{-F,--list-format=}'[Change the display format used when listing tasks]:format:(flat nested json)' \
'(--no-pty)--no-pty[do not use pseudo-terminal in run/sudo]' \ '(- *)'{-h,--help=-}'[Show core or per-task help and exit]::task:_fab_tasks' \
"(-d+ --display=-)"{-d+,--display=-}"[print detailed info about a given command]: :_targets" \ '(-H --hosts)'{-H,--hosts=}'[Comma-separated host name(s) to execute tasks against]:host' \
'(-D --disable-known-hosts)'{-D,--disable-known-hosts}'[do not load user known_hosts file]' \ \*{-i,--identity=}'[Path to runtime SSH identity (key) file]:file:_files' \
'(-r --reject-unknown-hosts)'{-r,--reject-unknown-hosts}'[reject unknown hosts]' \ '(-l --list)'{-l,--list=-}'[List available tasks, optionally limited to a namespace]::namespace' \
'(-u+ --user=-)'{-u+,--user=-}'[username to use when connecting to remote hosts]: :' \ '(-p --pty)'{-p,--pty}'[Use a pty when executing shell commands]' \
'(-p+ --password=-)'{-p+,--password=-}'[password for use with authentication and/or sudo]: :' \ '(-r --search-root)'{-r,--search-root=}'[Change root directory used for finding task modules]:dir:_files -/' \
'(-H+ --hosts=-)'{-H+,--hosts=-}'[comma separated list of hosts to operate on]: :' \ '(-R --dry)'{-R,--dry}'[Echo commands instead of running]' \
'(-R+ --roles=-)'{-R+,--roles=-}'[comma separated list of roles to operate on]: :' \ '(-S --ssh-config)'{-S,--ssh-config=}'[Path to runtime SSH config file]:file:_files' \
'(-a --no-agent)'{-a,--no-agent}'[don'\''t use the running SSH agent]' \ '(-t --connect-timeout)'{-t,--connect-timeout=}'[Specifies default connection timeout, in seconds]:seconds' \
'(-k --no-keys)'{-k,--no-keys}'[don'\''t load private key files from ~/.ssh/]' \ '(-T --command-timeout)'{-T,--command-timeout=}'[Specify a global command execution timeout, in seconds]:seconds' \
'(-w --warn-only)'{-w,--warn-only}'[warn instead of abort, when commands fail]' \ '(- *)'{-V,--version}'[Show version and exit]' \
'-i+[path to SSH private key file. May be repeated]: :_files' \ '(-w --warn-only)'{-w,--warn-only}'[Warn, instead of failing, when shell commands fail]' \
"(-f+ --fabfile=)"{-f+,--fabfile=}"[Python module file to import]: :_files -g *.py" \ '*::task:_fab_tasks'
'(-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
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -1,6 +1,6 @@
#compdef fail2ban-client #compdef fail2ban-client
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2020 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2020 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Permission is hereby granted, free of charge, to any person obtaining # Permission is hereby granted, free of charge, to any person obtaining
@ -35,11 +35,32 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_f2bc_jails() { _fail2ban_client() {
LANG=C fail2ban-client status 2> /dev/null | sed -n -e 's/.*Jail list:\s\+//' -e 'T' -e 's/,\s\+/\'$'\n/g' -e 'p' integer NORMARG
_arguments -A "-*" -n \
'-c[configuration directory]:dir:_files -/' \
'-s[socket path]:file:_files' \
'-p[pidfile path]:file:_files' \
'--loglevel[logging level]:level:(CRITICAL ERROR WARNING NOTICE INFO DEBUG TRACEDEBUG HEAVYDEBUG)' \
'--logtarget[logging target]:target:(stdout stderr syslog sysout)' \
'--syslogsocket[syslog socket path]:file:_files' \
'-d[dump configuration]' \
'(--dp --dump-pretty)'{--dp,--dump-pretty}'[dump the configuration using more human readable representation]' \
'(-t --test)'{-t,--test}'[test configuration]' \
'-i[interactive mode]' \
'-v[increase verbosity]' \
'-q[decrease verbosity]' \
'-x[force execution of the server (remove socket file)]' \
'-b[start server in background]' \
'-f[start server in foreground]' \
'--str2sec[convert time abbreviation format to seconds]:_message str2sec' \
'(-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'
} }
_complete_f2bc_cmds() { _fail2ban_client_commands() {
local cmds=( local cmds=(
'unban:unbans all IP addresses' 'unban:unbans all IP addresses'
'set:set property' 'set:set property'
@ -58,14 +79,14 @@ _complete_f2bc_cmds() {
_describe -V "fail2ban commands" cmds _describe -V "fail2ban commands" cmds
} }
_complete_f2bc_cmdargs() { _fail2ban_client_command_arguments() {
local f2barg="$words[$NORMARG]" local f2barg="$words[$NORMARG]"
case "$f2barg" in case "$f2barg" in
unban) (unban)
local jail local jail
if (( $words[(I)(--all)] == 0 )) ; then if (( $words[(I)(--all)] == 0 )); then
for jail in $(_f2bc_jails) ; do for jail in $(_fail2ban_client_print_jails); do
_complete_f2bc_ips $jail _fail2ban_client_jails "$jail"
done done
local unban_opts=(--all) local unban_opts=(--all)
_describe -o "unban options" unban_opts _describe -o "unban options" unban_opts
@ -73,18 +94,18 @@ _complete_f2bc_cmdargs() {
_nothing _nothing
fi fi
;; ;;
(set|get)) (set|get)
if (( $NORMARG + 1 == $CURRENT )) ; then if (( $NORMARG + 1 == $CURRENT )); then
_complete_f2bc_jails _fail2ban_client_jails
_complete_f2bc_settings _fail2ban_client_settings
else else
_complete_f2bc_jail${f2barg} _fail2ban_client_jail_${f2barg}
fi fi
;; ;;
status) (status)
if (( $NORMARG + 1 == $CURRENT )) ; then if (( $NORMARG + 1 == $CURRENT )); then
_complete_f2bc_jails _fail2ban_client_jails
elif (( $NORMARG + 2 == $CURRENT )) ; then elif (( $NORMARG + 2 == $CURRENT )); then
_values "flavor" basic cymru _values "flavor" basic cymru
else else
_nothing _nothing
@ -93,69 +114,40 @@ _complete_f2bc_cmdargs() {
esac esac
} }
_complete_f2bc_jails() { _fail2ban_client_jail_set() {
local jails=($(_f2bc_jails)) if (( $NORMARG + 2 == $CURRENT )); then
_describe -V "jails" jails
}
_complete_f2bc_ips() {
local ips=("${(@f)$(LANG=C fail2ban-client status $1 2> /dev/null | sed -n -e 's/^.*Banned IP list:\s\+//' -e 'T' -e 's/\s\+/\'$'\n/g' -e 'p')}")
if [[ -n "${ips[@]}" ]] ; then
_describe -t "f2b_jail_$1" -V "banned ips of jail $1" ips
else
_nothing
fi
}
_complete_f2bc_jailset() {
if (( $NORMARG + 2 == $CURRENT )) ; then
case $words[$NORMARG+1] in case $words[$NORMARG+1] in
loglevel) (loglevel)
local loglevel=(CRITICAL ERROR WARNING NOTICE INFO DEBUG TRACEDEBUG HEAVYDEBUG) local loglevel=(CRITICAL ERROR WARNING NOTICE INFO DEBUG TRACEDEBUG HEAVYDEBUG)
_describe -V "loglevel" loglevel ;; _describe -V "loglevel" loglevel
logtarget) ;;
(logtarget)
local logtarget=(STDOUT STDERR SYSLOG) local logtarget=(STDOUT STDERR SYSLOG)
_describe -V "logtarget" logtarget _describe -V "logtarget" logtarget
_files ;; _files
syslogsocket) ;;
(syslogsocket)
local syslogsocket=(auto) local syslogsocket=(auto)
_describe -V "logtarget" syslogsocket _describe -V "logtarget" syslogsocket
_files ;; _files
dbfile) ;;
_files ;; (dbfile)
dbpurgeage) _files
_message "sets the max age in <SECONDS> that history of bans will be kept" ;; ;;
*) (dbpurgeage)
# jail _message "sets the max age in <SECONDS> that history of bans will be kept"
local jailsettings=( ;;
unbanip (*)
banip local jailsettings=(
action unbanip banip action addaction addfailregex addignoreip
addaction addignoreregex addjournalmatch addlogpath bantime
addfailregex datepattern delaction delfailregex delignoreip
addignoreip delignorerexgex deljournalmatch dellogpath findtime idle
addignoreregex ignorecache ignorecommand ignoreself logencoding maxlines
addjournalmatch maxretry usedns
addlogpath )
bantime _describe -t "f2b_jail_setting" -V "jail setting" jailsettings
datepattern ;;
delaction
delfailregex
delignoreip
delignorerexgex
deljournalmatch
dellogpath
findtime
idle
ignorecache
ignorecommand
ignoreself
logencoding
maxlines
maxretry
usedns
)
_describe -t "f2b_jail_setting" -V "jail setting" jailsettings ;;
esac esac
else else
local jail="$words[$NORMARG+1]" local jail="$words[$NORMARG+1]"
@ -163,11 +155,14 @@ _complete_f2bc_jailset() {
if (( $NORMARG + 3 == $CURRENT )) ; then if (( $NORMARG + 3 == $CURRENT )) ; then
case $words[$NORMARG+2] in case $words[$NORMARG+2] in
unbanip) unbanip)
_complete_f2bc_ips "$jail" ;; _fail2ban_client_ips "$jail"
;;
delfailregex) delfailregex)
_complete_f2bc_regex fail "$jail" ;; _fail2ban_client_regexs fail "$jail"
;;
delignorerexgex) delignorerexgex)
_complete_f2bc_regex ignore "$jail" ;; _fail2ban_client_regexs ignore "$jail"
;;
dellogpath) dellogpath)
local filelist=("${(@f)$(LANG=C fail2ban-client status $jail 2> /dev/null | sed -n -e 's/^.*File list:\s\+//' -e 'T' -e 's/\s\+/\'$'\n/g' -e 'p')}") local filelist=("${(@f)$(LANG=C fail2ban-client status $jail 2> /dev/null | sed -n -e 's/^.*File list:\s\+//' -e 'T' -e 's/\s\+/\'$'\n/g' -e 'p')}")
@ -175,45 +170,56 @@ _complete_f2bc_jailset() {
_describe -t "f2b_filelist" -V "filelist of jail $1" filelist _describe -t "f2b_filelist" -V "filelist of jail $1" filelist
else else
_nothing _nothing
fi ;; fi
;;
idle) idle)
_values 'fail2ban idle' on off ;; _values 'fail2ban idle' on off
;;
ignoreself) ignoreself)
_values 'fail2ban ignoreself' true false ;; _values 'fail2ban ignoreself' true false
;;
delignoreip) delignoreip)
local ignoreips=("${(@f)$(fail2ban-client get "$jail" ignoreip 2> /dev/null | sed -e 's/^[|`]-\s\+//p')}") local ignoreips=("${(@f)$(fail2ban-client get "$jail" ignoreip 2> /dev/null | sed -e 's/^[|`]-\s\+//p')}")
if [[ -n "${ignoreips[@]}" ]] ; then if [[ -n "${ignoreips[@]}" ]] ; then
_describe -t "f2b_ignoreip" -V "fail2ban ignored ips" ignoreips _describe -t "f2b_ignoreip" -V "fail2ban ignored ips" ignoreips
else else
_nothing _nothing
fi ;; fi
delaction|action) ;;
_complete_f2bc_action "$jail" ;; delaction|action)
addlogpath) _fail2ban_client_actions "$jail"
_files ;; ;;
*) addlogpath)
_message "No completion for ${words[NORMARG+2]}" ;; _files
esac ;;
elif (( $NORMARG + 4 == $CURRENT )) ; then *)
case $words[$NORMARG+2] in _message "No completion for ${words[NORMARG+2]}"
action) ;;
_complete_f2bc_actionproperties "$jail" $words[$NORMARG+3] ;; esac
addaction) elif (( $NORMARG + 4 == $CURRENT )) ; then
_files ;; case $words[$NORMARG+2] in
*) action)
_nothing ;; _fail2ban_client_actionproperties "$jail" $words[$NORMARG+3]
esac ;;
else addaction)
_files
;;
*)
_nothing _nothing
;;
esac
else
_nothing
fi fi
fi fi
} }
_complete_f2bc_jailget() { _fail2ban_client_jail_get() {
if (( $NORMARG + 2 == $CURRENT )) ; then if (( $NORMARG + 2 == $CURRENT )) ; then
case $words[$NORMARG+1] in case $words[$NORMARG+1] in
(loglevel|logtarget|syslogsocket|dbfile|dbpurgeage)) (loglevel|logtarget|syslogsocket|dbfile|dbpurgeage)
_nothing ;; _nothing
;;
*) *)
# jail # jail
local jailprops=( local jailprops=(
@ -236,24 +242,29 @@ _complete_f2bc_jailget() {
actionproperties actionproperties
actionmethods actionmethods
) )
_describe -t "f2b_jail_props" -V "jail properties" jailprops ;; _describe -t "f2b_jail_props" -V "jail properties" jailprops
;;
esac esac
else else
local jail="$words[$NORMARG+1]" local jail="$words[$NORMARG+1]"
if (( $NORMARG + 3 == $CURRENT )) ; then if (( $NORMARG + 3 == $CURRENT )); then
case $words[$NORMARG+2] in case $words[$NORMARG+2] in
(action|actionproperties|actionmethods)) (action|actionproperties|actionmethods)
_complete_f2bc_action "$jail" ;; _fail2ban_client_actions "$jail"
;;
*) *)
_nothing ;; _nothing
;;
esac esac
elif (( $NORMARG + 4 == $CURRENT )) ; then elif (( $NORMARG + 4 == $CURRENT )); then
case $words[$NORMARG+2] in case $words[$NORMARG+2] in
(action|actionproperties|actionmethods)) (action|actionproperties|actionmethods)
_complete_f2bc_actionproperties "$jail" $words[$NORMARG+3] ;; _fail2ban_client_actionproperties "$jail" $words[$NORMARG+3]
;;
*) *)
_nothing ;; _nothing
;;
esac esac
else else
_nothing _nothing
@ -261,7 +272,21 @@ _complete_f2bc_jailget() {
fi fi
} }
_complete_f2bc_action() { _fail2ban_client_settings() {
local setargs=(loglevel logtarget syslogsocket dbfile dbpurgeage)
_describe -t "f2b_settings" -V "fail2ban-client settings" setargs
}
_fail2ban_client_regexs() {
local regex=("${(@f)$(fail2ban-client get $2 ${1}regex 2> /dev/null | sed -n -e 's/[|`]- \[\([0-9]\+\)\]:\s\+/\1:/p')}")
if [[ -n "${regex[@]}" ]] ; then
_describe -t "f2b_regex" -V "jail $2 ${1}regex" regex
else
_nothing
fi
}
_fail2ban_client_actions() {
local jailactions=("${(@f)$(fail2ban-client get $1 actions 2>/dev/null | sed -e '1d' -e 's/,\s\+/\'$'\n/g')}") local jailactions=("${(@f)$(fail2ban-client get $1 actions 2>/dev/null | sed -e '1d' -e 's/,\s\+/\'$'\n/g')}")
if [[ -n "${jailactions[@]}" ]] ; then if [[ -n "${jailactions[@]}" ]] ; then
@ -271,8 +296,22 @@ _complete_f2bc_action() {
fi fi
} }
_complete_f2bc_actionproperties() { _fail2ban_client_jails() {
local default_actionproperties=( local jails=($(_fail2ban_client_print_jails))
_describe -V "jails" jails
}
_fail2ban_client_ips() {
local ips=("${(@f)$(LANG=C fail2ban-client status $1 2> /dev/null | sed -n -e 's/^.*Banned IP list:\s\+//' -e 'T' -e 's/\s\+/\'$'\n/g' -e 'p')}")
if [[ -n "${ips[@]}" ]]; then
_describe -t "f2b_jail_$1" -V "banned ips of jail $1" ips
else
_nothing
fi
}
_fail2ban_client_actionproperties() {
local default_actionproperties=(
actionstart actionstart
actionstop actionstop
actioncheck actioncheck
@ -292,43 +331,11 @@ _complete_f2bc_actionproperties() {
fi fi
} }
_complete_f2bc_regex() { _fail2ban_client_print_jails() {
local regex=("${(@f)$(fail2ban-client get $2 ${1}regex 2> /dev/null | sed -n -e 's/[|`]- \[\([0-9]\+\)\]:\s\+/\1:/p')}") LANG=C fail2ban-client status 2> /dev/null | sed -n -e 's/.*Jail list:\s\+//' -e 'T' -e 's/,\s\+/\'$'\n/g' -e 'p'
if [[ -n "${regex[@]}" ]] ; then
_describe -t "f2b_regex" -V "jail $2 ${1}regex" regex
else
_nothing
fi
} }
_complete_f2bc_settings() { _fail2ban_client "$@"
local setargs=(loglevel logtarget syslogsocket dbfile dbpurgeage)
_describe -t "f2b_settings" -V "fail2ban-client settings" setargs
}
integer NORMARG
_arguments -A "-*" -n \
'-c[configuration directory]:_files -/' \
'-s[socket path]:_files' \
'-p[pidfile path]:_files' \
'--loglevel[logging level]:(CRITICAL ERROR WARNING, NOTICE INFO, DEBUG, TRACEDEBUG HEAVYDEBUG)' \
'--logtarget[logging target]:(stdout stderr syslog sysout)' \
'--syslogsocket:_files' \
'-d[dump configuration]' \
'(--dp --dump-pretty)'{--dp,--dump-pretty}'[dump the configuration using more human readable representation]' \
'(-t --test)'{-t,--test}'[test configuration]' \
'-i[interactive mode]' \
'-v[increase verbosity]' \
'-q[decrease verbosity]' \
'-x[force execution of the server (remove socket file)]' \
'-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]' \
'(-V --version)'{-V,--version}'[print the version]' \
'1:fail2ban command:_complete_f2bc_cmds' \
'*:fail2ban command argument:_complete_f2bc_cmdargs'
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

57
src/_fail2ban-regex Normal file
View File

@ -0,0 +1,57 @@
#compdef fail2ban-regex
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for fail2ban-regex (https://www.fail2ban.org/).
# Environment:
# Linux 6.14.10-arch1-1 x86_64 GNU/Linux
# zsh 5.9 (x86_64-pc-linux-gnu)
# fail2ban 1.1.0-7
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Jesse Ayala <jesserayala95@gmail.com>
#
# ------------------------------------------------------------------------------
integer NORMARG
_arguments -A "-*" -n \
'--version[show program''s version number]' \
'(-h --help)'{-h,--help}'[display the help message]' \
'(-c --config)'{-c,--config=}'[set alternate config directory]:directory:_files -/' \
'(-d --datepattern)'{-d,--datepattern=}'[set custom pattern used to match date/times]:DATEPATTERN' \
'(--timezone= --TZ=)'{--timezone=,--TZ=}'[set time-zone used by convert time format]:TIMEZONE' \
'(-e --encoding)'{-e,--encoding=}'[use different encoding from system locale]:ENCODING' \
'(-r --raw)'{-r,--raw}'[raw hosts,don''t resolve dns]' \
'--usedns=[DNS specified replacement of tags <HOST> in regexp]::((yes\:matches all form of hosts no\:IP addresses only))' \
'(-L --maxlines)'{-L,--maxlines}'[maxlines for multi-line regex]:MAXLINES' \
'(-m --journalmatch=)'{-m,--journalmatch=}'[journalctl style matches overriding filter file; "systemd-journal" only]:JOURNALMATCH' \
'(-l --log-level)'{-l,--log-level}'[log level for the Fail2Ban logger to use]:LOG_LEVEL' \
'-V[get version in machine-readable short format]' \
'--verbosity=[set numerical level of verbosity]:(0 1 2 3 4)' \
'(--verbose-date --VD)'{--verbose-date,--VD}'[verbose date patterns/regex in output]' \
'(-D --debuggex)'{-D,--debuggex}'[produce debuggex.com urls for debugging there]' \
'--no-check-all[disable check for all regexes]' \
'(-o --out)'{-o,--out}'[set token to print failure information only (row, id, ip, msg, host, ip4, ip6, dns, matches, ...)]:out' \
'--print-no-missed[do not print any missed lines]' \
'--print-no-ignored[do not print any ignored lines]' \
'--print-all-matched[print all matched lines]' \
'--print-all-missed[print all missed lines, no matter how many]' \
'--print-all-ignored[print all ignored lines, no matter how many]' \
'(-t --log-traceback)'{-t,--log-traceback}'[enrich log-messages with compressed tracebacks]' \
'--full-traceback[enrich log-messages with full, uncompressed tracebacks]:' \
'1:file:_files -g \*.log' \
'2:file:_files -W /etc/fail2ban/filter.d -g \*\.\(conf\|local\)' \
'3:file:_files -W /etc/fail2ban/filter.d -g \*\.\(conf\|local\)'
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: set et sw=2 ts=2 ft=zsh:

61
src/_fallocate Normal file
View File

@ -0,0 +1,61 @@
#compdef fallocate
# ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion for fallocate, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# - preallocate or deallocate space to a file
# https://man7.org/linux/man-pages/man1/fallocate.1.html
# ------------------------------------------------------------------------------
# Authors
# -------
# * Aditi Sharma (https://github.com/Aditi76117)
# ------------------------------------------------------------------------------
_arguments \
'(-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' \
'(-o --offset)'{-o+,--offset}'[Specifies the beginning offset of the range, in bytes]:offset' \
'(-v --verbose)'{-v,--verbose}'[Enable verbose mode]' \
'(-x --posix)'{-x,--posix}'[Enable POSIX operation mode]' \
'(- *)'{-h,--help}'[Display help text and exit]' \
'(- *)'{-V,--version}'[Print version and exit]' \
'*:filename:_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

@ -1,6 +1,6 @@
#compdef ffind #compdef ffind
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2017 Github zsh-users - https://github.com/zsh-users
# #
# Permission is hereby granted, free of charge, to any person obtaining # Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the # a copy of this software and associated documentation files (the

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

@ -1,114 +0,0 @@
#compdef flameshot
# ------------------------------------------------------------------------------
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for flameshot (https://flameshot.js.org/)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei YOSHIDA <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
typeset -A opt_args
local context state line
local -a _flameshot_subcommands
_flameshot_subcommands=(
'gui:Start a manual capture in GUI mode'
'screen:Capture a single screen'
'full:Capture the entire desktop'
'launcher:Open the capture launcher'
'config:Configure flameshot'
)
local -a capture_flags
capture_flags=(
'(-p --path)'{-p,--path}'[Path where the capture will be saved]:file:_files'
'(-d --delay)'{-d,--delay}'[Delay time in milliseconds]:milliseconds:'
'(-r --raw)'{-r,--raw}'[Print raw PNG capture]'
'(- 1 *)'{-h,--help}'[enable data race detection]'
)
#_arguments '*:: :->subcmd'
_arguments \
'(- 1 *)'{-h,--help}'[Show this help]' \
'*:: :->subcmd'
if [[ "$state" == "subcmd" ]];then
if (( CURRENT == 1 )); then
_describe -t commands "flameshot command" _flameshot_subcommands -V1
return
else
local opts curcontext
case "$words[1]" in
gui)
opts=(${capture_flags[@]})
;;
screen)
opts=(
${capture_flags[@]}
'(-n --number)'{-n,--number}'[Define the screen to capture]:screen number:'
'(-c --clipboard)'{-c,--clipboard}'[Save the capture to the clipboard]'
)
;;
full)
opts=(
${capture_flags[@]}
'(-c --clipboard)'{-c,--clipboard}'[Save the capture to the clipboard]'
)
;;
config)
opts=(
'(-a --autostart)'{-a,--autostart}'[Enable or disable run at startup]:enabled:(true false)'
'(-f --filename)'{-f,--filename}'[Set the filename pattern]:pattern:'
'(-t --trayicon)'{-t,--trayicon}'[Enable or disable trayicon]:enabled:(true false)'
'(-s --showhelp)'{-s,--showhelp}'[Show the help message in the capture mode]:enabled:(true false)'
'(-m --maincolor)'{-m,--maincolor}'[Define the main UI color]:color code:'
'(-k --contrastcolor)'{-k,--contrastcolor}'[Define the contract UI color]:color code:'
'(- 1 *)'{-h,--help}'[Display help]'
)
;;
*)
opts=(
'(- 1 *)'{-h,--help}'[Display help]'
)
;;
esac
_arguments -s : "$opts[@]"
fi
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

@ -1,123 +0,0 @@
#compdef fleetctl
# ------------------------------------------------------------------------------
# Copyright (c) 2009-2015 Robby Russell and contributors (see
# https://github.com/robbyrussell/oh-my-zsh/contributors)
#
# 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 fleetctl (https://github.com/coreos/fleet).
#
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Remi Paulmier (https://github.com/shtouff)
#
# ------------------------------------------------------------------------------
# fleetctl zsh completion
local -a _1st_arguments
_1st_arguments=(
'cat:Output the contents of a submitted unit'
'destroy:Destroy one or more units in the cluster'
'fd-forward:Proxy stdin and stdout to a unix domain socket'
'help:Show a list of commands or help for one command'
'journal:Print the journal of a unit in the cluster to stdout'
'list-machines:Enumerate the current hosts in the cluster'
'list-unit-files:List the units that exist in the cluster.'
'list-units:List the current state of units in the cluster'
'load:Schedule one or more units in the cluster, first submitting them if necessary.'
'ssh:Open interactive shell on a machine in the cluster'
'start:Instruct systemd to start one or more units in the cluster, first submitting and loading if necessary.'
'status:Output the status of one or more units in the cluster'
'stop:Instruct systemd to stop one or more units in the cluster.'
'submit:Upload one or more units to the cluster without starting them'
'unload:Unschedule one or more units in the cluster.'
'version:Print the version and exit'
)
__task_list ()
{
local expl
declare -a tasks
tasks=(cat destroy fd-forward help journal list-machines list-unit-files \
list-units load ssh start status stop submit unload version)
_wanted tasks expl 'help' compadd $tasks
}
__unit_list ()
{
_wanted application expl 'command' compadd $(command fleetctl list-units | \
tail -n +2 | awk '{print $1}')
}
local expl
local curcontext="$curcontext" state line
local -A opt_args
_arguments -C \
':command:->command' \
'*::options:->options'
case $state in
(command)
_describe -t commands "gem subcommand" _1st_arguments
return
;;
(options)
case $line[1] in
(help)
_arguments ':feature:__task_list'
;;
(destroy|journal|start|status|stop|unload|cat)
_arguments '*:feature:__unit_list'
;;
(load|submit)
_arguments '*:file:_files -g *.service'
;;
(ssh)
_arguments '*:host:_hosts'
;;
(*)
_arguments '*:file:_files'
;;
esac
;;
esac
# 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

File diff suppressed because it is too large Load Diff

View File

@ -1,221 +0,0 @@
#compdef force
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for force CLI 0.22.39 (https://github.com/heroku/force).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Peter Limbach <https://github.com/pelim>
#
# ------------------------------------------------------------------------------
local -a _1st_arguments
_1st_arguments=(
'apiversion:Display/Set current API version'
'login:force login [-i=<instance>] [<-u=username> <-p=password>]'
'logout:Log out from force.com'
'logins:List force.com logins used'
'active:Show or set the active force.com account'
'whoami:Show information about the active account'
'describe:Describe the object or list of available objects'
'sobject:Manage standard & custom objects'
'bigobject:Manage big objects'
'field:Manage sobject fields'
'record:Create, modify, or view records'
'bulk:Load csv file use Bulk API'
'fetch:Export specified artifact(s) to a local directory'
'import:Import metadata from a local directory'
'export:Export metadata to a local directory'
'query:Execute a SOQL statement'
'apex:Execute anonymous Apex code'
'trace:Manage trace flags'
'log:Fetch debug logs'
'eventlogfile:List and fetch event log file'
'oauth:Manage ConnectedApp credentials'
'test:Run apex tests'
'security:Displays the OLS and FLS for a give SObject'
'version:Display current version'
'update:Update to the latest version'
'push:Deploy artifact from a local directory'
'aura:force aura push -f <filepath>'
'password:See password status or reset password'
'notify:Should notifications be used'
'limits:Display current limits'
'help:Show this help'
'datapipe:Manage DataPipes'
)
local -a _field_arguments
_apex_types=(
'string' 'textarea' 'longtextarea' 'richtextarea'
'boolean' 'double' 'number' 'autonumber' 'picklist'
'lookup' 'masterdetail' 'geolocation'
)
_field_arguments=(
'list' 'create' 'delete' 'type'
)
_sobject_arguments=(
'list' 'create' 'delete'
)
_bulk_arguments=(
'insert:upload a .csv file to insert records'
'update:upload a .csv file to update records'
'query:run a SOQL statement to generate a .csv file on the server'
'retrieve:retrieve a query generated .csv file from the server'
'job:get information about a job based on job Id'
'batch:get detailed information about a batch within a job based on job Id and batch Id'
'batches:get a list of batches associated with a job based on job Id'
)
__sobject_list() {
_wanted application expl 'sobjects' compadd $(force sobject list)
}
__log_list() {
_wanted application expl 'logfiles' compadd $(force log | grep -o -e '07\w*')
}
__login_user_list() {
# remove active user string, remove colors & print the username
_wanted application expl 'usernames' compadd $(force logins | sed 's/(active)//' | sed 's,$(printf "\033"")\\[[0-9;]*[a-zA-Z],,g' | awk '{print $1}')
}
__login_instance_list() {
_wanted application expl 'instances' compadd $(force logins | awk '{print $3}' | sed 's/https:\/\///')
}
__sobject_command () {
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments -C \
':command:->command' \
'*::options:->options'
case $state in
(command)
_describe -t commands "sobject commands" _sobject_arguments
return
;;
(options)
case $line[1] in
(delete)
_arguments ':feature:__sobject_list'
;;
esac
;;
esac
}
__field_command () {
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments -C \
':command:->command' \
'*::options:->options'
case $state in
(command)
_describe -t commands "field commands" _field_arguments
return
;;
(options)
case $line[1] in
(list)
_arguments ':feature:__sobject_list'
;;
(type)
_describe -t commands "apex types" _apex_types
return
;;
esac
;;
esac
}
local expl
local -a active logins
local curcontext="$curcontext" state line
local -A opt_args
_arguments -C \
':command:->command' \
'*::options:->options'
case $state in
(command)
_describe -t commands "force commands" _1st_arguments
return
;;
(options)
case $line[1] in
(help)
_describe -t commands "command help" _1st_arguments
return
;;
(login)
_arguments \
'-u[salesforce user]:userame:__login_user_list' \
'-i[salesforce instance]:instance:__login_instance_list' \
'-p[salesforce password]'
;;
(bulk)
_arguments \
'-c[bulk command]:_bulk_arguments'
;;
(log)
_arguments ':feature:__log_list'
;;
(field)
__field_command
;;
(sobject)
__sobject_command
;;
esac
;;
esac

View File

@ -3,84 +3,147 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for fwupdmgr 1.2.9 (https://github.com/hughsie/fwupd). # Completion script for fwupdmgr 1.8.12 (https://github.com/hughsie/fwupd).
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
# ------- # -------
# #
# * Julien Nicoulaud <julien.nicoulaud@gmail.com> # * Julien Nicoulaud <julien.nicoulaud@gmail.com>
# * Shohei Yoshida (https://github.com/syohex)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_fwupdmgr() { _fwupdmgr() {
local context state state_descr line local context state state_descr line
typeset -A opt_args typeset -A opt_args
local ret=1
_arguments -C \ _arguments -C \
'(- : *)'{-h,--help}'[display help information]' \ '(- : *)'{-h,--help}'[display help information]' \
'(- : *)'{-v,--version}'[display version information]' \ '(- : *)--version[display version information]' \
{-v,--verbose}'[show extra debugging information]' \ '(-v --verbose)'{-v,--verbose}'[show extra debugging information]' \
--offline'[schedule installation for next reboot when possible]' \ '--offline[schedule installation for next reboot when possible]' \
--allow-reinstall'[allow re-installing existing firmware versions]' \ '--allow-reinstall[allow re-installing existing firmware versions]' \
--allow-older'[allow downgrading firmware versions]' \ '--allow-older[allow downgrading firmware versions]' \
--force'[override warnings and force the action]' \ '--allow-branch-switch[allow switching firmware branch]' \
'(-y, --assume-yes)'{-y,--assume-yes}'[answer yes to all questions]' \ '--force[override warnings and force the action]' \
--sign'[sign the uploaded data with the client certificate]' \ '(-y --assume-yes)'{-y,--assume-yes}'[answer yes to all questions]' \
--no-unreported-check'[do not check for unreported history]' \ '--sign[sign the uploaded data with the client certificate]' \
--no-metadata-check'[do not check for old metadata]' \ '--no-unreported-check[do not check for unreported history]' \
--no-reboot-check'[do not check for reboot after update]' \ '--no-metadata-check[do not check for old metadata]' \
--no-history'[do not write to the history database]' \ '--no-reboot-check[do not check for reboot after update]' \
--show-all-devices'[show devices that are not updatable]' \ '--no-safety-check[do not perform device safety checks]' \
'--no-device-prompt[do not prompt for devices]' \
'--no-history[do not write to the history database]' \
'--show-all[show all results]' \
'--disable-ssl-strict[ignore SSL strict checks when downloading files]' \
'--ipfs[only use IPFS when downloading files]' \
'--filter[filter with a set of device flags using a ~ prefix to exclude]:filter' \
'--json[output in JSON format]' \
'--no-authenticate[do not prompt for authentication]' \
'(-): :->command' \ '(-): :->command' \
'(-)*:: :->arguments' \ '(-)*:: :->arguments' \
&& ret=0 && ret=0
case $state in case $state in
(command) (command)
_fwupdmgr_commands _fwupdmgr_commands
;; ;;
(arguments) (arguments)
curcontext=${curcontext%:*:*}:fwupdmgr-$words[1]: case $words[1] in
if (( $+functions[_fwupdmgr_${words[1]}_args] )); then (activate|downgrade|emulation-tag|emulation-untag|get-releases|get-updates|reinstall|update|verify|verify-update)
_fwupdmgr_${words[1]}_args _arguments \
else '1::device_id or GUID:_fwupdmgr_device_ids' \
_message "unknown command ${words[1]}" && ret=1 && ret=0
fi ;;
;; (clear-results|get-results|unlock)
(*) _arguments \
_message "unknown state $state" && ret=1 '1:device_id or GUID:_fwupdmgr_device_ids' \
&& ret=0
;;
(device-emulate|device-test|emulation-load|emulation-save|get-details|set-approved-firmware)
_arguments \
'*::files:_files' \
&& ret=0
;;
(disable-remote|modify-remote)
_arguments \
'1:remote ID:_fwupdmgr_remote_ids' \
&& ret=0
;;
(install)
_arguments \
'1:device_id or GUID:_fwupdmgr_device_ids' \
'2:version' \
&& ret=0
;;
(local-install)
_arguments \
'1:file:_files' \
'2:device_id or GUID:_fwupdmgr_device_ids' \
&& ret=0
;;
(refresh)
_arguments \
'1:file or remote ID:_alternative "file\:file\:_files" "remotes\:remote ID\:_fwupdmgr_remote_ids"' \
&& ret=0
;;
(switch-branch)
_arguments \
'1:device_id or GUID:_fwupdmgr_device_ids' \
'2:branch' \
&& ret=0
;;
esac
;; ;;
esac esac
return ret
} }
(( $+functions[_fwupdmgr_commands] )) || (( $+functions[_fwupdmgr_commands] )) ||
_fwupdmgr_commands() { _fwupdmgr_commands() {
local commands=( local -a commands=(
'activate:activate devices' 'activate:activate devices'
'clear-history:erase all firmware update history' 'block-firmware:blocks a specific firmware from being installed'
'clear-offline:clears any updates scheduled to be updated offline'
'clear-results:clears the results from the last update' 'clear-results:clears the results from the last update'
'device-emulate:emulate a device using a JSON manifest'
'device-test:test a device using a JSON manifest'
'disable-remote:disables a given remote' 'disable-remote:disables a given remote'
'downgrade:downgrades the firmware on a device' 'downgrade:downgrades the firmware on a device'
'emulation-load:load device emulation data'
'emulation-save:save device emulation data'
'emulation-tag:adds devices to watch for future emulation'
'emulation-untag:removes devices to watch for future emulation'
'enable-remote:enables a given remote' 'enable-remote:enables a given remote'
'get-approved-firmware:gets the list of approved firmware' 'get-approved-firmware:gets the list of approved firmware'
'get-bios-settings:retrieve BIOS settings'
'get-blocked-firmware:gets the list of blocked firmware'
'get-details:gets details about a firmware file' 'get-details:gets details about a firmware file'
'get-devices:get all devices that support firmware updates' 'get-devices:get all devices that support firmware updates'
'get-history:show history of firmware updates' 'get-history:show history of firmware updates'
'get-plugins:get all enabled plugins registered with the system'
'get-releases:gets the releases for a device' 'get-releases:gets the releases for a device'
'get-remotes:gets the configured remotes' 'get-remotes:gets the configured remotes'
'get-results:gets the results from the last update' 'get-results:gets the results from the last update'
'get-topology:get all devices according to the system topology' 'get-topology:get all devices according to the system topology'
'get-updates:gets the list of updates for connected hardware' 'get-updates:gets the list of updates for connected hardware'
'inhibit:inhibit the system to prevent upgrades'
'install:install a firmware file on this hardware' 'install:install a firmware file on this hardware'
'local-install:install a firmware file on this hardware'
'modify-config:modifies a daemon configuration value' 'modify-config:modifies a daemon configuration value'
'modify-remote:modifies a given remote' 'modify-remote:modifies a given remote'
'quit:asks the daemon to quit'
'refresh:refresh metadata from remote server' 'refresh:refresh metadata from remote server'
'security:gets the host security attributes'
'report-history:share firmware history with the developers' 'report-history:share firmware history with the developers'
'set-approved-firmware:sets the list of approved firmware' 'set-approved-firmware:sets the list of approved firmware'
'set-bios-setting:sets one or more BIOS settings'
'switch-branch:switch the firmware branch on device'
'sync-bkc:sync firmware versions to the host best known configuration '
'unblock-firmware:unblocks a specific firmware from being installed'
'uninhibit:uninhibit the system to allow upgrades'
'unlock:unlocks the device for firmware access' 'unlock:unlocks the device for firmware access'
'update:updates all firmware to latest versions available' 'update:updates all firmware to latest versions available'
'verify:gets the cryptographic hash of the dumped firmware' 'verify:gets the cryptographic hash of the dumped firmware'
@ -89,199 +152,22 @@ _fwupdmgr_commands() {
_describe -t commands commands commands _describe -t commands commands commands
} }
(( $+functions[_fwupdmgr_activate_args] )) ||
_fwupdmgr_activate_args() {
_arguments -C \
'1: :_fwupdmgr_device_ids'
}
(( $+functions[_fwupdmgr_clear-history_args] )) ||
_fwupdmgr_clear-history_args() {
_message 'no more arguments' && ret=0
}
(( $+functions[_fwupdmgr_clear-results_args] )) ||
_fwupdmgr_clear-results_args() {
_arguments -C \
'1: :_fwupdmgr_device_ids'
}
(( $+functions[_fwupdmgr_disable-remote_args] )) ||
_fwupdmgr_disable-remote_args() {
_arguments -C \
'1: :_fwupdmgr_remote_ids'
}
(( $+functions[_fwupdmgr_downgrade_args] )) ||
_fwupdmgr_downgrade_args() {
_arguments -C \
'1: :_fwupdmgr_device_ids'
}
(( $+functions[_fwupdmgr_enable-remote_args] )) ||
_fwupdmgr_enable-remote_args() {
_arguments -C \
'1: :_fwupdmgr_remote_ids'
}
(( $+functions[_fwupdmgr_get-approved-firmware_args] )) ||
_fwupdmgr_get-approved-firmware_args() {
_message 'no more arguments' && ret=0
}
(( $+functions[_fwupdmgr_get-details_args] )) ||
_fwupdmgr_get-details_args() {
_files
}
(( $+functions[_fwupdmgr_get-devices_args] )) ||
_fwupdmgr_get-devices_args() {
_message 'no more arguments' && ret=0
}
(( $+functions[_fwupdmgr_get-history_args] )) ||
_fwupdmgr_get-history_args() {
_message 'no more arguments' && ret=0
}
(( $+functions[_fwupdmgr_get-releases_args] )) ||
_fwupdmgr_get-releases_args() {
_arguments -C \
'1: :_fwupdmgr_device_ids'
}
(( $+functions[_fwupdmgr_get-remotes_args] )) ||
_fwupdmgr_get-remotes_args() {
_message 'no more arguments' && ret=0
}
(( $+functions[_fwupdmgr_get-results_args] )) ||
_fwupdmgr_get-results_args() {
_arguments -C \
'1: :_fwupdmgr_device_ids'
}
(( $+functions[_fwupdmgr_get-topology_args] )) ||
_fwupdmgr_get-topology_args() {
_message 'no more arguments' && ret=0
}
(( $+functions[_fwupdmgr_get-updates_args] )) ||
_fwupdmgr_get-updates_args() {
_message 'no more arguments' && ret=0
}
(( $+functions[_fwupdmgr_install_args] )) ||
_fwupdmgr_install_args() {
_arguments -C \
'1: :_files' \
'2: :_fwupdmgr_device_ids'
}
(( $+functions[_fwupdmgr_TODO_args] )) ||
_fwupdmgr_TODO_args() {
_message 'no more arguments' && ret=0
}
(( $+functions[_fwupdmgr_modify-config_args] )) ||
_fwupdmgr_modify-config_args() {
local ret=1
if compset -P '*,'; then
_wanted config-value expl 'config value' _fwupdmgr_config_values ${IPREFIX%=} && ret=0
else
_wanted config-key expl 'config key' _fwupdmgr_config_keys -qS, && ret=0
fi
return ret
}
(( $+functions[_fwupdmgr_modify-remote_args] )) ||
_fwupdmgr_modify-remote_args() {
_arguments -C \
'1: :_fwupdmgr_remote_ids' \
'2: :_fwupdmgr_remote_keys' \
'3: :_fwupdmgr_remote_values'
}
(( $+functions[_fwupdmgr_refresh_args] )) ||
_fwupdmgr_refresh_args() {
_arguments -C \
'1: :_files' \
'2:file signature:' \
'3: :_fwupdmgr_remote_ids'
}
(( $+functions[_fwupdmgr_report-history_args] )) ||
_fwupdmgr_report-history_args() {
_message 'no more arguments' && ret=0
}
(( $+functions[_fwupdmgr_set-approved-firmware_args] )) ||
_fwupdmgr_set-approved-firmware_args() {
_message 'checksum' && ret=0
}
(( $+functions[_fwupdmgr_unlock_args] )) ||
_fwupdmgr_unlock_args() {
_arguments -C \
'1: :_fwupdmgr_device_ids'
}
(( $+functions[_fwupdmgr_update_args] )) ||
_fwupdmgr_update_args() {
_message 'no more arguments' && ret=0
}
(( $+functions[_fwupdmgr_verify_args] )) ||
_fwupdmgr_verify_args() {
_arguments -C \
'1: :_fwupdmgr_device_ids'
}
(( $+functions[_fwupdmgr_verify-update_args] )) ||
_fwupdmgr_verify-update_args() {
_arguments -C \
'1: :_fwupdmgr_device_ids'
}
(( $+functions[_fwupdmgr_device_ids] )) || (( $+functions[_fwupdmgr_device_ids] )) ||
_fwupdmgr_device_ids() { _fwupdmgr_device_ids() {
# TODO add device name as description # TODO add device name as description
local devices=($(_call_program devices fwupdmgr get-devices | grep -Po 'DeviceId:\s+\K(.*)')) local -a devices
devices=($(_call_program devices fwupdmgr get-devices | awk '/Device ID/||/DeviceId/{print $NF}'))
_describe -t devices 'device ID' devices _describe -t devices 'device ID' devices
} }
(( $+functions[_fwupdmgr_remote_ids] )) || (( $+functions[_fwupdmgr_remote_ids] )) ||
_fwupdmgr_remote_ids() { _fwupdmgr_remote_ids() {
# TODO add remote description # TODO add remote description
local remotes=($(_call_program remotes fwupdmgr get-remotes | grep -Po 'Remote ID:\s+\K(.*)')) local -a remotes
remotes=($(_call_program remotes fwupdmgr get-remotes | awk '/Remote ID/{print $NF}'))
_describe -t remotes 'remote ID' remotes _describe -t remotes 'remote ID' remotes
} }
(( $+functions[_fwupdmgr_checksums] )) ||
_fwupdmgr_checksums() {
_guard '[^\-]#' 'checksum'
}
(( $+functions[_fwupdmgr_config_keys] )) ||
_fwupdmgr_config_keys() {
_guard '[^\-]#' 'config key'
}
(( $+functions[_fwupdmgr_config_values] )) ||
_fwupdmgr_config_values() {
_guard '[^\-]#' 'config value'
}
(( $+functions[_fwupdmgr_remote_keys] )) ||
_fwupdmgr_remote_keys() {
_guard '[^\-]#' 'remote key'
}
(( $+functions[_fwupdmgr_remote_values] )) ||
_fwupdmgr_remote_values() {
_guard '[^\-]#' 'remote value'
}
_fwupdmgr "$@" _fwupdmgr "$@"
# Local Variables: # Local Variables:

View File

@ -1,6 +1,6 @@
#compdef gas #compdef gas
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# #
# Permission is hereby granted, free of charge, to any person obtaining # Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the # a copy of this software and associated documentation files (the
@ -38,7 +38,7 @@ local curcontext="$curcontext" state line cmds ret=1
_arguments -C \ _arguments -C \
'(- 1 *)'{-v,--version}'[display version information]' \ '(- 1 *)'{-v,--version}'[display version information]' \
'(-h|--help)'{-h,--help}'[show help information]' \ '(-h --help)'{-h,--help}'[show help information]' \
'1: :->cmds' \ '1: :->cmds' \
'*: :->args' && ret=0 '*: :->args' && ret=0
@ -67,3 +67,10 @@ esac
return ret 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

1518
src/_ghc

File diff suppressed because it is too large Load Diff

307
src/_gio Normal file
View File

@ -0,0 +1,307 @@
#compdef gio
# ------------------------------------------------------------------------------
# Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for gio 2.86.3 (https://docs.gtk.org/gio/).
#
# Status: Basic (subcommands and common options).
# Origin: Original script.
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Magniquick (https://github.com/Magniquick)
#
# ------------------------------------------------------------------------------
_gio() {
local context state line
typeset -A opt_args
local ret=1
_arguments -C \
'(- : *)'{-h,--help}'[show help information]' \
'(- : *)--version[display version information]' \
'1:command:->command' \
'*::arg:->args' \
&& ret=0
case $state in
(command)
_gio_commands
;;
(args)
local subcmd=$words[1]
if [[ $subcmd == gio ]]; then
subcmd=$words[2]
fi
case $subcmd in
(help)
_arguments \
'1:command:_gio_commands' \
&& ret=0
;;
(version)
_arguments && ret=0
;;
(cat)
_arguments \
'*:location:_gio_location' \
&& ret=0
;;
(copy)
_arguments \
'(-T --no-target-directory)'{-T,--no-target-directory}'[no target directory]' \
'(-p --progress)'{-p,--progress}'[show progress]' \
'(-i --interactive)'{-i,--interactive}'[prompt before overwrite]' \
'--preserve[preserve all attributes]' \
'(-b --backup)'{-b,--backup}'[backup existing destination files]' \
'(-P --no-dereference)'{-P,--no-dereference}'[never follow symbolic links]' \
'--default-permissions[use default permissions for the destination]' \
'--default-modified-time[use default file modification timestamps for the destination]' \
'*:location:_gio_location' \
&& ret=0
;;
(info)
_arguments \
'(-w --query-writable)'{-w,--query-writable}'[list writable attributes]' \
'(-f --filesystem)'{-f,--filesystem}'[get file system info]' \
'(-a --attributes)'{-a,--attributes}'[attributes to get]:attributes' \
'(-n --nofollow-symlinks)'{-n,--nofollow-symlinks}'[do not follow symbolic links]' \
'*:location:_gio_location' \
&& ret=0
;;
(launch)
_arguments \
'1:desktop file:_gio_desktop_files' \
'*::file argument:_gio_location' \
&& ret=0
;;
(list)
_arguments \
'(-a --attributes)'{-a,--attributes}'[attributes to get]:attributes' \
'(-h --hidden)'{-h,--hidden}'[show hidden files]' \
'(-l --long)'{-l,--long}'[use a long listing format]' \
'(-n --nofollow-symlinks)'{-n,--nofollow-symlinks}'[do not follow symbolic links]' \
'(-d --print-display-names)'{-d,--print-display-names}'[print display names]' \
'(-u --print-uris)'{-u,--print-uris}'[print full URIs]' \
'*:location:_gio_location' \
&& ret=0
;;
(mime)
_arguments \
'1:mimetype:_gio_mime_types' \
'2:handler' \
&& ret=0
;;
(mkdir)
_arguments \
'(-p --parent)'{-p,--parent}'[create parent directories]' \
'*:location:_gio_location' \
&& ret=0
;;
(monitor)
_arguments \
'(-d --dir)'{-d,--dir}'[monitor a directory]:location:_gio_location' \
'(-f --file)'{-f,--file}'[monitor a file]:location:_gio_location' \
'(-D --direct)'{-D,--direct}'[monitor a file directly]:location:_gio_location' \
'(-s --silent)'{-s,--silent}'[monitor a file directly without reporting changes]:location:_gio_location' \
'(-n --no-moves)'{-n,--no-moves}'[report moves and renames as simple deleted/created events]' \
'(-m --mounts)'{-m,--mounts}'[watch for mount events]' \
'*:location:_gio_location' \
&& ret=0
;;
(mount)
_arguments \
'(-m --mountable)'{-m,--mountable}'[mount as mountable]' \
'(-d --device)'{-d,--device}'[mount volume with device file or identifier]:device' \
'(-u --unmount)'{-u,--unmount}'[unmount]' \
'(-e --eject)'{-e,--eject}'[eject]' \
'(-t --stop)'{-t,--stop}'[stop drive with device file]:device' \
'(-s --unmount-scheme)'{-s,--unmount-scheme}'[unmount all mounts with scheme]:scheme' \
'(-f --force)'{-f,--force}'[ignore outstanding file operations when unmounting or ejecting]' \
'(-a --anonymous)'{-a,--anonymous}'[use an anonymous user when authenticating]' \
'(-l --list)'{-l,--list}'[list volumes, drives and mounts]' \
'(-o --monitor)'{-o,--monitor}'[monitor volume, drive and mount events]' \
'(-i --detail)'{-i,--detail}'[show extra information]' \
'--tcrypt-pim[unlock VeraCrypt volume with PIM]:pim' \
'--tcrypt-hidden[mount a TCRYPT hidden volume]' \
'--tcrypt-system[mount a TCRYPT system volume]' \
'*:location:_gio_location' \
&& ret=0
;;
(move)
_arguments \
'(-T --no-target-directory)'{-T,--no-target-directory}'[no target directory]' \
'(-p --progress)'{-p,--progress}'[show progress]' \
'(-i --interactive)'{-i,--interactive}'[prompt before overwrite]' \
'(-b --backup)'{-b,--backup}'[backup existing destination files]' \
'(-C --no-copy-fallback)'{-C,--no-copy-fallback}'[do not use copy and delete fallback]' \
'*:location:_gio_location' \
&& ret=0
;;
(open)
_arguments \
'*:location:_gio_location' \
&& ret=0
;;
(rename)
_arguments \
'1:location:_gio_location' \
'2:new name' \
&& ret=0
;;
(remove)
_arguments \
'(-f --force)'{-f,--force}'[ignore nonexistent files, never prompt]' \
'*:location:_gio_location' \
&& ret=0
;;
(save)
_arguments \
'(-b --backup)'{-b,--backup}'[backup existing destination files]' \
'(-c --create)'{-c,--create}'[only create if not existing]' \
'(-a --append)'{-a,--append}'[append to end of file]' \
'(-p --private)'{-p,--private}'[restrict access to current user]' \
'(-u --unlink)'{-u,--unlink}'[replace as if the destination did not exist]' \
'(-v --print-etag)'{-v,--print-etag}'[print new etag at end]' \
'(-e --etag)'{-e,--etag}'[etag of the file being overwritten]:etag' \
'1:destination:_gio_location' \
&& ret=0
;;
(set)
_arguments \
'(-t --type)'{-t,--type}'[type of the attribute]:type' \
'(-n --nofollow-symlinks)'{-n,--nofollow-symlinks}'[do not follow symbolic links]' \
'(-d --delete)'{-d,--delete}'[unset given attribute]' \
'1:location:_gio_location' \
'2:attribute' \
'*::value' \
&& ret=0
;;
(trash)
_arguments \
'(-f --force)'{-f,--force}'[ignore nonexistent files, never prompt]' \
'--empty[empty the trash]' \
'--list[list files in the trash with their original locations]' \
'--restore[restore a file from trash to its original location]' \
'*:location:_gio_location' \
&& ret=0
;;
(tree)
_arguments \
'(-h --hidden)'{-h,--hidden}'[show hidden files]' \
'(-l --follow-symlinks)'{-l,--follow-symlinks}'[follow symbolic links, mounts and shortcuts]' \
'*:location:_gio_location' \
&& ret=0
;;
esac
;;
esac
return ret
}
(( $+functions[_gio_commands] )) ||
_gio_commands() {
local -a commands=(
'help:print help'
'version:print version'
'cat:concatenate files to standard output'
'copy:copy one or more files'
'info:show information about locations'
'launch:launch an application from a desktop file'
'list:list the contents of locations'
'mime:get or set the handler for a mimetype'
'mkdir:create directories'
'monitor:monitor files and directories for changes'
'mount:mount or unmount the locations'
'move:move one or more files'
'open:open files with the default application'
'rename:rename a file'
'remove:delete one or more files'
'save:read from standard input and save'
'set:set a file attribute'
'trash:move or restore files to the trash'
'tree:list the contents of locations in a tree'
)
_describe -t commands 'gio commands' commands
}
(( $+functions[_gio_location] )) ||
_gio_location() {
if (( $+functions[_urls] )); then
_alternative \
'files:files:_files' \
'urls:URL:_urls'
else
_files
fi
}
(( $+functions[_gio_desktop_files] )) ||
_gio_desktop_files() {
local -a search_path data_dirs desktop_files
data_dirs=(${(@s/:/)XDG_DATA_DIRS:-/usr/local/share:/usr/share})
search_path=(
"${XDG_DATA_HOME:-$HOME/.local/share}/applications"
${data_dirs[@]/%/\/applications}
)
desktop_files=()
local dir
for dir in $search_path; do
[[ -d $dir ]] || continue
desktop_files+=($dir/*.desktop(N))
done
compadd -a -- desktop_files
}
(( $+functions[_gio_mime_types] )) ||
_gio_mime_types() {
if (( $+functions[_mime_types] )); then
_mime_types
else
_message 'mime type'
fi
}
_gio "$@"
# 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

106
src/_gist
View File

@ -1,6 +1,6 @@
#compdef gist #compdef gist
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2017 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -36,84 +36,86 @@
# #
# * Akira Maeda <https://github.com/glidenote> # * Akira Maeda <https://github.com/glidenote>
# * Patrick Ziegler <https://github.com/patrick96> # * Patrick Ziegler <https://github.com/patrick96>
# * Shivam Mehta <https://github.com/maniac-en>
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# ------------------------------------------------------------------------------
local curcontext="$curcontext" state line ret=1 _gist() {
typeset -A opt_args local ret=1
_arguments -C \ _arguments \
'(--login)--login[Authenticate gist on this computer.]' \ '(--login)--login[Authenticate gist on this computer.]' \
'(-f --filename)'{-f,--filename}'[Sets the filename and syntax type.]:NAME' \ '(-f --filename)'{-f,--filename}'[Sets the filename and syntax type.]:NAME' \
'(-t --type)'{-t,--type}'[Sets the file extension and syntax type.]:EXT' \ '(-t --type)'{-t,--type}'[Sets the file extension and syntax type.]:EXT' \
'(-p --private)'{-p,--private}'[Makes your gist private.]' \ '(-p --private --no-private)'{-p,--private}'[Makes your gist private.]' \
'(--no-private)'--no-private'[Makes your gist no private.]' \ '(--no-private -p --private)--no-private[Makes your gist no private.]' \
'(-d --description)'{-d,--description}'[Adds a description to your gist.]:DESCRIPTION' \ '(-d --description)'{-d,--description}'[Adds a description to your gist.]:DESCRIPTION' \
'(-s --shorten)'{-s,--shorten}'[Shorten the gist URL using git.io.]' \ '(-s --shorten)'{-s,--shorten}'[Shorten the gist URL using git.io.]' \
'(-u --update)'{-u,--update}'[Update an existing gist.]:URL ID' \ '(-u --update)'{-u,--update}'[Update an existing gist.]:URL ID:_gist_ids' \
'(-a --anonymous)'{-a,--anonymous}'[Create an anonymous gist.]' \ '(-c --copy)'{-c,--copy}'[Copy the resulting URL to the clipboard]' \
'(-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]' \
'(-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]' \
'(-o --open)'{-o,--open}'[Open the resulting URL in a browser]' \ '(--no-open -o --open)--no-open[No open the resulting URL in a browser]' \
'(--no-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]' \ '(-P --paste)'{-P,--paste}'[Paste from the clipboard to gist]' \
'(-h --help)'{-h,--help}'[print options help]' \ '(-R --raw)'{-R,--raw}'[Display raw URL of the new gist]' \
'(-v --version)'{-v,--version}'[print version]' \ '(-l --list)'{-l,--list}'[List all gists for user ]::user' \
'(-r --read)'{-r,--read}'[Read a gist and print out the contents]:user gists:user_gists' \ '--delete[Delete a gist]:id:_gist_ids' \
'*: :_files' && ret=0 '(- *)'{-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_ids' \
'*: :_files' && ret=0
_user_gists_cache_policy() { return ret
}
_gist_cache_policy() {
# rebuild if cache is more than a day old # rebuild if cache is more than a day old
local -a oldp local -a oldp
oldp=( "$1"(mh+1) ) oldp=( "$1"(m+1) )
(( $#oldp )) (( $#oldp ))
} }
user_gists() { _gist_ids() {
local update_policy ret=1 local update_policy ret=1
zstyle -s ":completion:${curcontext}:" cache-policy update_policy zstyle -s ":completion:${curcontext}:" cache-policy update_policy
if [[ -z "$update_policy" ]]; then if [[ -z "$update_policy" ]]; then
zstyle ":completion:${curcontext}:" cache-policy _user_gists_cache_policy zstyle ":completion:${curcontext}:" cache-policy _gist_cache_policy
fi fi
# stores the gists of the logged in user in the format ID[Description] # stores the gists of the logged in user in the format ID[Description]
_list=() local -a gist_list
_cached_gists="user_gists"
# retrieve/Write gists from/to cache # retrieve/Write gists from/to cache
if _cache_invalid $_cached_gists || ! _retrieve_cache $_cached_gists; then if _cache_invalid gist_cached_list || ! _retrieve_cache gist_cached_list; then
_gists=$(gist -l) 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 if [[ $? -eq 0 ]]; then
_store_cache $_cached_gists _gists _store_cache gist_cached_list gist_list
else else
# some error occurred, the user is probably not logged in # some error occurred, the user is probably not logged in
# set _gists to an empty string so that no completion is attempted # set _gists to an empty string so that no completion is attempted
_gists="" gist_list=()
fi fi
else
_retrieve_cache $_cached_gists
fi fi
if [ -n "$_gists" ]; then if [[ $#gist_list ]]; then
echo "$_gists" | while read -r line; do _describe -t gist_ids 'gist_ids' gist_list
# 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
fi fi
return ret return ret
} }
return ret _gist "$@"
# 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

@ -1,4 +1,5 @@
#compdef git-flow #compdef git-flow
#description Git Flow branching model
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2010-2015 Justin Hileman # Copyright (c) 2010-2015 Justin Hileman
# #
@ -23,7 +24,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for git-flow (http://github.com/nvie/gitflow). # Completion script for git-flow (https://github.com/nvie/gitflow).
# #
# Source: https://github.com/bobthecow/git-flow-completion # Source: https://github.com/bobthecow/git-flow-completion
# #
@ -39,397 +40,357 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_git-flow () {
local curcontext="$curcontext" state line
typeset -A opt_args
_git-flow () _arguments -C \
{ ':command:->command' \
local curcontext="$curcontext" state line '*::options:->options'
typeset -A opt_args
_arguments -C \ case $state in
':command:->command' \ (command)
'*::options:->options' local -a subcommands
subcommands=(
'init:Initialize a new git repo with support for the branching model.'
'feature:Manage your feature branches.'
'release:Manage your release branches.'
'hotfix:Manage your hotfix branches.'
'support:Manage your support branches.'
'version:Shows version information.'
)
_describe -t commands 'git flow' subcommands
;;
case $state in (options)
(command) 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
;;
local -a subcommands esac
subcommands=( ;;
'init:Initialize a new git repo with support for the branching model.' esac
'feature:Manage your feature branches.'
'release:Manage your release branches.'
'hotfix:Manage your hotfix branches.'
'support:Manage your support branches.'
'version:Shows version information.'
)
_describe -t commands 'git flow' subcommands
;;
(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
;;
esac
;;
esac
} }
__git-flow-release () __git-flow-release () {
{ local curcontext="$curcontext" state line
local curcontext="$curcontext" state line typeset -A opt_args
typeset -A opt_args
_arguments -C \ _arguments -C \
':command:->command' \ ':command:->command' \
'*::options:->options' '*::options:->options'
case $state in case $state in
(command) (command)
local -a subcommands
subcommands=(
'start:Start a new release branch.'
'finish:Finish a release branch.'
'list:List all your release branches. (Alias to `git flow release`)'
'publish:Publish this release branch to origin.`)'
'track:Track a release branch from origin.`)'
)
_describe -t commands 'git flow release' subcommands
_arguments \
-v'[Verbose (more) output]'
;;
local -a subcommands (options)
subcommands=( case $line[1] in
'start:Start a new release branch.' (start)
'finish:Finish a release branch.' _arguments \
'list:List all your release branches. (Alias to `git flow release`)' -F'[Fetch from origin before performing finish]'\
'publish:Publish this release branch to origin.`)' ':version:__git_flow_version_list'
'track:Track a release branch from origin.`)' ;;
) (finish)
_describe -t commands 'git flow release' subcommands _arguments \
_arguments \ -F'[Fetch from origin before performing finish]' \
-v'[Verbose (more) output]' -s'[Sign the release tag cryptographically]'\
;; -u'[Use the given GPG-key for the digital signature (implies -s)]'\
-m'[Use the given tag message]'\
(options) -n'[Don'\''t tag this release]'\
case $line[1] in -p'[Push to $ORIGIN after performing finish]'\
-k'[Keep branch after performing finish]'\
(start) ':version:__git_flow_version_list'
_arguments \ ;;
-F'[Fetch from origin before performing finish]'\ (publish)
':version:__git_flow_version_list' _arguments \
;; ':version:__git_flow_version_list'
;;
(finish) (track)
_arguments \ _arguments \
-F'[Fetch from origin before performing finish]' \ ':version:__git_flow_version_list'
-s'[Sign the release tag cryptographically]'\ ;;
-u'[Use the given GPG-key for the digital signature (implies -s)]'\ *)
-m'[Use the given tag message]'\ _arguments \
-n'[Don'\''t tag this release]'\ -v'[Verbose (more) output]'
-p'[Push to $ORIGIN after performing finish]'\ ;;
-k'[Keep branch after performing finish]'\ esac
':version:__git_flow_version_list' ;;
;; esac
(publish)
_arguments \
':version:__git_flow_version_list'
;;
(track)
_arguments \
':version:__git_flow_version_list'
;;
*)
_arguments \
-v'[Verbose (more) output]'
;;
esac
;;
esac
} }
__git-flow-hotfix () __git-flow-hotfix () {
{ local curcontext="$curcontext" state line
local curcontext="$curcontext" state line typeset -A opt_args
typeset -A opt_args
_arguments -C \ _arguments -C \
':command:->command' \ ':command:->command' \
'*::options:->options' '*::options:->options'
case $state in case $state in
(command) (command)
local -a subcommands
subcommands=(
'start:Start a new hotfix branch.'
'finish:Finish a hotfix branch.'
'list:List all your hotfix branches. (Alias to `git flow hotfix`)'
'publish:Publish this hotfix branch to origin`)'
)
_describe -t commands 'git flow hotfix' subcommands
_arguments \
-v'[Verbose (more) output]'
;;
local -a subcommands (options)
subcommands=( case $line[1] in
'start:Start a new hotfix branch.' (start)
'finish:Finish a hotfix branch.' _arguments \
'list:List all your hotfix branches. (Alias to `git flow hotfix`)' -F'[Fetch from origin before performing finish]'\
'publish:Publish this hotfix branch to origin`)' ':hotfix:__git_flow_version_list'\
) ':branch-name:__git_flow_branch_names'
_describe -t commands 'git flow hotfix' subcommands ;;
_arguments \
-v'[Verbose (more) output]'
;;
(options) (finish)
case $line[1] in _arguments \
-F'[Fetch from origin before performing finish]' \
-s'[Sign the release tag cryptographically]'\
-u'[Use the given GPG-key for the digital signature (implies -s)]'\
-m'[Use the given tag message]'\
-p'[Push to $ORIGIN after performing finish]'\
':hotfix:__git_flow_hotfix_list'
;;
(start) (publish)
_arguments \ _arguments \
-F'[Fetch from origin before performing finish]'\ ':hotfix:__git_flow_hotfix_list'
':hotfix:__git_flow_version_list'\ ;;
':branch-name:__git_branch_names'
;;
(finish) *)
_arguments \ _arguments \
-F'[Fetch from origin before performing finish]' \ -v'[Verbose (more) output]'
-s'[Sign the release tag cryptographically]'\ ;;
-u'[Use the given GPG-key for the digital signature (implies -s)]'\ esac
-m'[Use the given tag message]'\ ;;
-p'[Push to $ORIGIN after performing finish]'\ esac
':hotfix:__git_flow_hotfix_list'
;;
(publish)
_arguments \
':hotfix:__git_flow_hotfix_list'
;;
*)
_arguments \
-v'[Verbose (more) output]'
;;
esac
;;
esac
} }
__git-flow-feature () __git-flow-feature () {
{ local curcontext="$curcontext" state line
local curcontext="$curcontext" state line typeset -A opt_args
typeset -A opt_args
_arguments -C \ _arguments -C \
':command:->command' \ ':command:->command' \
'*::options:->options' '*::options:->options'
case $state in case $state in
(command) (command)
local -a subcommands
local -a subcommands subcommands=(
subcommands=( 'start:Start a new feature branch.'
'start:Start a new feature branch.' 'finish:Finish a feature branch.'
'finish:Finish a feature branch.' 'list:List all your feature branches. (Alias to `git flow feature`)'
'list:List all your feature branches. (Alias to `git flow feature`)' 'publish:Publish this feature branch to origin.'
'publish:Publish this feature branch to origin.' 'track:Track a feature branch from origin.'
'track:Track a feature branch from origin.' 'diff:Show a diff of changes since this feature branched off.'
'diff:Show a diff of changes since this feature branched off.' 'rebase:Rebase a feature branch on top of develop.'
'rebase:Rebase a feature branch on top of develop.'
'checkout:Check out (switch to) the given feature branch.' 'checkout:Check out (switch to) the given feature branch.'
'pull:Pull a feature branch from a remote peer.' 'pull:Pull a feature branch from a remote peer.'
) )
_describe -t commands 'git flow feature' subcommands _describe -t commands 'git flow feature' subcommands
_arguments \ _arguments \
-v'[Verbose (more) output]' -v'[Verbose (more) output]'
;; ;;
(options) (options)
case $line[1] in case $line[1] in
(start)
_arguments \
-F'[Fetch from origin before performing finish]'\
':feature:__git_flow_feature_list'\
':branch-name:__git_flow_branch_names'
;;
(start) (finish)
_arguments \ _arguments \
-F'[Fetch from origin before performing finish]'\ -F'[Fetch from origin before performing finish]' \
':feature:__git_flow_feature_list'\ -r'[Finish branch by rebasing first]'\
':branch-name:__git_branch_names' -k'[Keep branch after performing finish]'\
;; -D'[Force delete feature branch after finish]'\
':feature:__git_flow_feature_list'
;;
(finish) (publish)
_arguments \ _arguments \
-F'[Fetch from origin before performing finish]' \ ':feature:__git_flow_feature_list'\
-r'[Finish branch by rebasing first]'\ ;;
-k'[Keep branch after performing finish]'\
-D'[Force delete feature branch after finish]'\
':feature:__git_flow_feature_list'
;;
(publish) (track)
_arguments \ _arguments \
':feature:__git_flow_feature_list'\ ':feature:__git_flow_feature_list'\
;; ;;
(track) (diff)
_arguments \ _arguments \
':feature:__git_flow_feature_list'\ ':branch:__git_flow_branch_names'\
;; ;;
(diff) (rebase)
_arguments \ _arguments \
':branch:__git_branch_names'\ -i'[Do an interactive rebase]' \
;; ':branch:__git_flow_branch_names'
;;
(rebase) (checkout)
_arguments \ _arguments \
-i'[Do an interactive rebase]' \ ':branch:__git_flow_feature_list'\
':branch:__git_branch_names' ;;
;;
(checkout) (pull)
_arguments \ _arguments \
':branch:__git_flow_feature_list'\ ':remote:__git_flow_remote'\
;; ':branch:__git_flow_branch_names'
;;
(pull) *)
_arguments \ _arguments \
':remote:__git_remotes'\ -v'[Verbose (more) output]'
':branch:__git_branch_names' ;;
;; esac
;;
*) esac
_arguments \
-v'[Verbose (more) output]'
;;
esac
;;
esac
} }
__git-flow-support () __git-flow-support() {
{ local curcontext="$curcontext" state line
local curcontext="$curcontext" state line typeset -A opt_args
typeset -A opt_args
_arguments -C \ _arguments -C \
':command:->command' \ ':command:->command' \
'*::options:->options' '*::options:->options'
case $state in case $state in
(command) (command)
local -a subcommands local -a subcommands
subcommands=( subcommands=(
'start:Start a new support branch.' 'start:Start a new support branch.'
'list:List all your support branches. (Alias to `git flow support`)' 'list:List all your support branches. (Alias to `git flow support`)'
) )
_describe -t commands 'git flow support' subcommands _describe -t commands 'git flow support' subcommands
_arguments \ _arguments \
-v'[Verbose (more) output]' -v'[Verbose (more) output]'
;; ;;
(options) (options)
case $line[1] in case $line[1] in
(start) (start)
_arguments \ _arguments \
-F'[Fetch from origin before performing finish]'\ -F'[Fetch from origin before performing finish]'\
':feature:__git_flow_support_list'\ ':feature:__git_flow_support_list'\
':branch-name:__git_branch_names' ':branch-name:__git_flow_branch_names'
;; ;;
*) *)
_arguments \ _arguments \
-v'[Verbose (more) output]' -v'[Verbose (more) output]'
;; ;;
esac esac
;; ;;
esac esac
} }
__git_flow_version_list () __git_flow_version_list() {
{ local expl
local expl local -a versions=(${${(f)"$(_call_program versions git flow release list 2> /dev/null | tr -d ' |*')"}})
declare -a versions __git_flow_command_successful || return
versions=(${${(f)"$(_call_program versions git flow release list 2> /dev/null | tr -d ' |*')"}}) _wanted versions expl 'version' compadd $versions
__git_command_successful || return
_wanted versions expl 'version' compadd $versions
} }
__git_flow_feature_list () __git_flow_feature_list() {
{ local expl
local expl local -a features=(${${(f)"$(_call_program features git flow feature list 2> /dev/null | tr -d ' |*')"}})
declare -a features __git_flow_command_successful || return
features=(${${(f)"$(_call_program features git flow feature list 2> /dev/null | tr -d ' |*')"}}) _wanted features expl 'feature' compadd $features
__git_command_successful || return
_wanted features expl 'feature' compadd $features
} }
__git_remotes () { __git_flow_remote() {
local expl gitdir remotes local expl gitdir remotes
gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null) 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]}) 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. # TODO: Should combine the two instead of either or.
if (( $#remotes > 0 )); then if (( $#remotes > 0 )); then
_wanted remotes expl remote compadd $* - $remotes _wanted remotes expl remote compadd $* - $remotes
else else
_wanted remotes expl remote _files $* - -W "($gitdir/remotes)" -g "$gitdir/remotes/*" _wanted remotes expl remote _files $* - -W "($gitdir/remotes)" -g "$gitdir/remotes/*"
fi fi
} }
__git_flow_hotfix_list () __git_flow_hotfix_list() {
{ local expl
local expl local -a hotfixes=(${${(f)"$(_call_program hotfixes git flow hotfix list 2> /dev/null | tr -d ' |*')"}})
declare -a hotfixes __git_flow_command_successful || return
hotfixes=(${${(f)"$(_call_program hotfixes git flow hotfix list 2> /dev/null | tr -d ' |*')"}}) _wanted hotfixes expl 'hotfix' compadd $hotfixes
__git_command_successful || return
_wanted hotfixes expl 'hotfix' compadd $hotfixes
} }
__git_flow_support_list () __git_flow_support_list() {
{ local expl
local expl local -a support=(${${(f)"$(_call_program support git flow support list 2> /dev/null | tr -d ' |*')"}})
declare -a support __git_flow_command_successful || return
support=(${${(f)"$(_call_program support git flow support list 2> /dev/null | tr -d ' |*')"}}) _wanted hotfixes expl 'support' compadd $support
__git_command_successful || return
_wanted hotfixes expl 'support' compadd $support
} }
__git_flow_branch_names() {
local expl
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
__git_branch_names () { _wanted branch-names expl branch-name compadd $* - $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
_wanted branch-names expl branch-name compadd $* - $branch_names
} }
__git_command_successful () { __git_flow_command_successful() {
if (( ${#pipestatus:#0} > 0 )); then if (( ${#pipestatus:#0} > 0 )); then
_message 'not a git repository' _message 'not a git repository'
return 1 return 1
fi fi
return 0 return 0
} }
_git-flow "$@" _git-flow "$@"

View File

@ -1,225 +0,0 @@
#compdef git-journal
# ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
# All rights reserved.
#
# 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 git-journal:
# https://github.com/saschagrunert/git-journal
#
# Authors
# -------
#
# * Sascha Grunert <mail@saschagruenrt.de>
# * Nico Wagner <nico@cryptopone.org>
# ------------------------------------------------------------------------------
_git-journal() {
typeset -A opt_args
local ret=1
local context curcontext="$curcontext" state line
_arguments -s -S -C \
"-p+[Sets a custom working path.]" \
"--path+[Sets a custom working path.]" \
"-n+[The number of tags until the parser stops when a single revision is given.]" \
"--tags-count+[The number of tags until the parser stops when a single revision is given.]" \
"-e+[A pattern to exclude git tags from the processing.]" \
"-t+[Use a custom output template.]" \
"--template+[Use a custom output template.]" \
"-o+[The output file for the changelog.]" \
"--output+[The output file for the changelog.]" \
"-a[Do not stop parsing at the first tag when a single revision is given. Overwrites '-n/--tags-count'.]" \
"--all[Do not stop parsing at the first tag when a single revision is given. Overwrites '-n/--tags-count'.]" \
"-g[Generate a fresh output template from a commit range.]" \
"--generate[Generate a fresh output template from a commit range.]" \
"-s[Print only the shortlog (summary) form.]" \
"--short[Print only the shortlog (summary) form.]" \
"-u[Skip entries without any relation to a git TAG.]" \
"--skip-unreleased[Skip entries without any relation to a git TAG.]" \
"-h[Prints help information]" \
"--help[Prints help information]" \
"-V[Prints version information]" \
"--version[Prints version information]" \
"1:: :_git-journal_commands" \
"*:: :->git-journal" \
&& ret=0
case $state in
(git-journal)
curcontext="${curcontext%:*:*}:git-journal-command-$words[1]:"
case $line[1] in
(p)
_arguments -s -S -C \
"-h[Prints help information]" \
"--help[Prints help information]" \
"-V[Prints version information]" \
"--version[Prints version information]" \
"1:: :_git-journal_prepare_commands" \
&& ret=0
;;
(prepare)
_arguments -s -S -C \
"-h[Prints help information]" \
"--help[Prints help information]" \
"-V[Prints version information]" \
"--version[Prints version information]" \
"1:: :_git-journal_prepare_commands" \
&& ret=0
;;
(s)
_arguments -s -S -C \
"-h[Prints help information]" \
"--help[Prints help information]" \
"-V[Prints version information]" \
"--version[Prints version information]" \
&& ret=0
;;
(setup)
_arguments -s -S -C \
"-h[Prints help information]" \
"--help[Prints help information]" \
"-V[Prints version information]" \
"--version[Prints version information]" \
&& ret=0
;;
(v)
_arguments -s -S -C \
"-h[Prints help information]" \
"--help[Prints help information]" \
"-V[Prints version information]" \
"--version[Prints version information]" \
"1:: :_git-journal_verify_commands" \
&& ret=0
;;
(verify)
_arguments -s -S -C \
"-h[Prints help information]" \
"--help[Prints help information]" \
"-V[Prints version information]" \
"--version[Prints version information]" \
"1:: :_git-journal_verify_commands" \
&& ret=0
;;
(help)
_arguments -s -S -C \
"-h[Prints help information]" \
"--help[Prints help information]" \
"-V[Prints version information]" \
"--version[Prints version information]" \
&& ret=0
;;
esac
;;
esac
}
(( $+functions[_git-journal_commands] )) ||
_git-journal_commands() {
local commands; commands=(
"prepare:Prepare a commit message before the user can edit it." \
"p:Prepare a commit message before the user can edit it." \
"setup:Creates all necessary git hooks and an initial configuration file. Shell completions for bash and fish will be available inside the current working directory." \
"s:Creates all necessary git hooks and an initial configuration file. Shell completions for bash and fish will be available inside the current working directory." \
"verify:Verify the specified commit message." \
"v:Verify the specified commit message." \
"help:Prints this message or the help of the given subcommand(s)" \
"REVISION_RANGE:Specifies the revision range to be processed. If a single revision is specified, the output will stop at the first following git TAG." \
)
_describe -t commands 'git-journal commands' commands "$@"
}
(( $+functions[_git-journal_help_commands] )) ||
_git-journal_help_commands() {
local commands; commands=(
)
_describe -t commands 'git-journal help commands' commands "$@"
}
(( $+functions[_git-journal_p_commands] )) ||
_git-journal_p_commands() {
local commands; commands=(
"MESSAGE:The path to the commit message which should be prepared." \
"TYPE:The type of the commit. For example "message"." \
)
_describe -t commands 'git-journal p commands' commands "$@"
}
(( $+functions[_p_commands] )) ||
_p_commands() {
local commands; commands=(
"MESSAGE:The path to the commit message which should be prepared." \
"TYPE:The type of the commit. For example "message"." \
)
_describe -t commands 'p commands' commands "$@"
}
(( $+functions[_git-journal_prepare_commands] )) ||
_git-journal_prepare_commands() {
local commands; commands=(
"MESSAGE:The path to the commit message which should be prepared." \
"TYPE:The type of the commit. For example "message"." \
)
_describe -t commands 'git-journal prepare commands' commands "$@"
}
(( $+functions[_git-journal_s_commands] )) ||
_git-journal_s_commands() {
local commands; commands=(
)
_describe -t commands 'git-journal s commands' commands "$@"
}
(( $+functions[_s_commands] )) ||
_s_commands() {
local commands; commands=(
)
_describe -t commands 's commands' commands "$@"
}
(( $+functions[_git-journal_setup_commands] )) ||
_git-journal_setup_commands() {
local commands; commands=(
)
_describe -t commands 'git-journal setup commands' commands "$@"
}
(( $+functions[_git-journal_v_commands] )) ||
_git-journal_v_commands() {
local commands; commands=(
"MESSAGE:The path to the commit message which should be prepared." \
)
_describe -t commands 'git-journal v commands' commands "$@"
}
(( $+functions[_v_commands] )) ||
_v_commands() {
local commands; commands=(
"MESSAGE:The path to the commit message which should be prepared." \
)
_describe -t commands 'v commands' commands "$@"
}
(( $+functions[_git-journal_verify_commands] )) ||
_git-journal_verify_commands() {
local commands; commands=(
"MESSAGE:The path to the commit message which should be prepared." \
)
_describe -t commands 'git-journal verify commands' commands "$@"
}
_git-journal "$@"

View File

@ -3,7 +3,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for git-pulls 0.3.1 (https://git-pulls.com/schacon/git-pulls). # Completion script for git-pulls 0.3.1 (https://github.com/schacon/git-pulls).
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors

View File

@ -4,7 +4,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for git-revise 0.5.1 # Completion script for git-revise 0.7.0
# (https://github.com/mystor/git-revise/). # (https://github.com/mystor/git-revise/).
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -17,14 +17,22 @@
__git-revise_commits() { __git-revise_commits() {
local -a commits local -a commits
commits=(${(f)"$(git log -20 --pretty=format:'%h:%d %s' | sed 's/: /:/')"}) if git rev-parse --is-inside-work-tree 1>/dev/null 2>/dev/null; then
_describe -V 'commit' commits commits=(${(f)"$(git log -20 --pretty=format:'%h:%d %s' | sed 's/: /:/')"})
_describe -V 'commit' commits
else
_message 'not a git repository'
fi
} }
__git-revise_branches() { __git-revise_branches() {
local -a branches local -a branches
branches=(${(f)"$(git for-each-ref --format='%(refname:short)' refs/heads/)"}) if git rev-parse --is-inside-work-tree 1>/dev/null 2>/dev/null; then
_describe 'branch' branches branches=(${(f)"$(git for-each-ref --format='%(refname:short)' refs/heads/)"})
_describe 'branch' branches
else
_message 'not a git repository'
fi
} }
_git-revise() { _git-revise() {
@ -32,6 +40,7 @@ _git-revise() {
_arguments -s \ _arguments -s \
'(- :)'{-h,--help}'[show help message and exit]' \ '(- :)'{-h,--help}'[show help message and exit]' \
'--root[revise starting at the root commit]' \
'--ref=[reference to update]: :__git-revise_branches' \ '--ref=[reference to update]: :__git-revise_branches' \
'--reauthor[reset the author of the targeted commit]' \ '--reauthor[reset the author of the targeted commit]' \
'(- :)--version[show version number and exit]' \ '(- :)--version[show version number and exit]' \
@ -40,9 +49,12 @@ _git-revise() {
'(--autosquash)--no-autosquash[force disable revise.autoSquash behaviour]' \ '(--autosquash)--no-autosquash[force disable revise.autoSquash behaviour]' \
'(--all -a)--no-index[ignore the index while rewriting history]' \ '(--all -a)--no-index[ignore the index while rewriting history]' \
'(--no-index --all -a)'{--all,-a}'[stage all tracked files before running]' \ '(--no-index --all -a)'{--all,-a}'[stage all tracked files before running]' \
'(--interactive -i --message -m --cut -c)'{--interactive,-i}'[interactively edit commit stack]' \ '(--interactive -i --message -m --cut -c --patch -p)'{--patch,-p}'[interactively stage hunks before running]' \
'(--interactive -i --message -m --cut -c)'{--message,-m}'[specify commit message on command line]:MESSAGE:()' \ '(--interactive -i --message -m --cut -c --patch -p)'{--interactive,-i}'[interactively edit commit stack]' \
'(--interactive -i --message -m --cut -c)'{--cut,-c}'[interactively cut a commit into two smaller commits]' \ '(--interactive -i --message -m --cut -c --patch -p)'{--message,-m}'[specify commit message on command line]:MESSAGE:()' \
'(--interactive -i --message -m --cut -c --patch -p)'{--cut,-c}'[interactively cut a commit into two smaller commits]' \
'(--gpg-sign -S --no-gpg-sign)'{--gpg-sign,-S}'[GPG sign commits]' \
'(--gpg-sign -S --no-gpg-sign)--no-gpg-sign[do not GPG sign commits]' \
'1: :__git-revise_commits' && ret=0 '1: :__git-revise_commits' && ret=0
return $ret return $ret
@ -50,3 +62,10 @@ _git-revise() {
_git-revise "$@" _git-revise "$@"
# 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

@ -1,6 +1,6 @@
#compdef git-wtf #compdef git-wtf
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2011 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,6 +1,6 @@
#compdef glances #compdef glances
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2011 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,48 +28,102 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for glances (http://nicolargo.github.com/glances/). # Completion script for glances 4.3.3 (https://nicolargo.github.io/glances/).
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
# ------- # -------
# #
# * loranger (https://github.com/loranger) # * loranger (https://github.com/loranger)
# * Shohei Yoshida (https://github.com/syohex)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_glances() { _glances() {
_arguments \
_arguments \ '(- *)'{-h,--help}'[show help message and exit]' \
"-0[Divide task CPU usage by the total number of CPUs]" \ '--print-completion[print shell completion script]:shell:(bash zsh tcsh)' \
"-1[Start Glances in per CPU mode]" \ '(- *)'{-V,--version}"[show program's version number and exit]" \
"-2[Disable left sidebar]" \ '(-d --debug)'{-d,--debug}'[enable debug mode]' \
"-3[Disable quick look module]" \ '(-C --config)'{-C,--config}'[path to the configuration file]: :_files' \
"-4[Disable all but quick look and load]" \ '(--modules-list --module-list)'{--modules-list,--module-list}'[display modules list and exit]' \
"-5[Disable top menu]" \ '(--disable-plugin --disable-plugins)'{--disable-plugin,--disable-plugins}'[disable plugin(comma separated list or all)]:plugin' \
"-6[Start Glances in mean GPU mode]" \ '(--enable-plugin --enable-plugins)'{--enable-plugin,--enable-plugins}'[enable plugin(comma separated list)]:plugin' \
"-b[Display network rate in Byte per second]" \ '--disable-process[disable process module]' \
"-B[Bind server to the given IP or host NAME]:host:_hosts" \ '--disable-webui[disable the Web Interface]' \
"-c[Connect to a Glances server]:host:_hosts" \ '(--light --enable-light)'{--light,--enable-light}'[light mode for Curses UI]' \
"-C[Path to the configuration file]:configuration path:_files -/" \ '(-0 --disable-irix)'{-0,--disable-irix}"[task's cpu usage will be divided by the total number of CPUs]" \
"-d[Enable debug mode]" \ '(-1 --percpu)'{-1,--percpu}'[start Glances in per CPU mode]' \
"-h[Display the syntax and exit]" \ '(-2 --disable-left-sidebar)'{-2,--disable-left-sidebar}'[disable network, disk I/O, FS and sensors modules]' \
"-o[Define additional output (available: HTML or CSV)]:output type:(HTML CSV)" \ '(-3 --disable-quicklook)'{-3,--disable-quicklook}'[disable quick look module]' \
"-p[Define the client or server TCP port (default: 61209)]:port:_ports" \ '(-4 --full-quicklook)'{-4,--full-quicklook}'[disable all but quick look and load]' \
"-q[Disable the curses interface]" \ '(-5 --disable-top)'{-5,--disable-top}'[disable top menu(QL, CPU, MEM, SWAP and LOAD)]' \
"-s[Run Glances in server mode]" \ '(-6 --menugpu)'{-6,--menugpu}'[start Glances in mean GPU mode]' \
"-t[Set the refresh time in seconds (default: 3)]:seconds:" \ '--disable-history[disable stats history]' \
"-V[Display the version and exit]" \ '--disable-bold[disable bold mode in the terminal]' \
"-w[Run Glances in web server mode]" \ '--disable-bg[disable background colors in the terminal]' \
"-z[Do not use the bold color attribute]" \ '--enable-irq[enable IRQ mode]' \
"--browser[Start the client browser]" \ '--enable-process-extended[enable extended stats on top process]' \
"--disable-bg[Disable background colors in the terminal]" \ '--disable-separator[disable separator in the UI]' \
"--disable-bold[Disable bold mode in the terminal]" \ '--disable-cursor[disable cursor in the UI]' \
"--hide-kernel-threads[Hide kernel threads in process list]" \ '--sort-process[sort processes]: :(cpu_percent memory_percent username cpu_times io_counters name)' \
"--password[Define a client/server password]" \ '(--programs --program)'{--programs,--program}'[Accumulate processes by program]' \
"--theme-white[Optimize display colors for white background]" \ '--export[enable export module]:module' \
"--tree[Display processes as tree]" \ '--export-csv-file[file path for CSV exporter]: :_files' \
"--username[Define a client/server username]" \ '--export-csv-overwrite[overwrite existing CSV file]' \
'--export-json-file[file path for JSON exporter]: :_files' \
'--export-graph-path[Folder for Graph exporter]: :_files -/' \
'--export-process-filter[set the export process filter]:filters' \
'(-c --client)'{-c,--client}'[connect to a Glances server]:host:_hosts' \
'(-s --server)'{-s,--server}'[run Glances in server mode]' \
'--browser[start the client browser]' \
'--disable-autodiscover[disable autodiscover feature]' \
'(-p --port)'{-p,--port}'[define the client/server TCP port]:port' \
'(-B --bind)'{-B,--bind}'[bind server to the given IPv4/IPv6 address or hostname]:host:_hosts' \
'--username[define a client/server username]' \
'--password[define a client/server password]' \
'-u[use the given client/server username]:user_name' \
'--snmp-community[SNMP community]:community' \
'--snmp-port[SNMP community]:port' \
'--snmp-version[SNMP version]:version:(1 2c 3)' \
'--snmp-user[SNMP user]:user' \
'--snmp-auth[SNMP auth]:auth' \
'--snmp-force[force SNMP mode]' \
'(-t --time)'{-t,--time}'[set minimum refresh rate in seconds(default: 2 sec)]:seconds' \
'(-w --webserver)'{-w,--webserver}'[run Glances in web server mode]' \
'--cached-time[set the server cache time(default: 1 sec)]:seconds' \
'--stop-after[stop Glances after n fresh]:times' \
'--open-web-browser[try to open the Web UI in the default browser]' \
'(-q --quiet)'{-q,--quiet}'[do not display the curses interface]' \
'(-f --process-filter)'{-f,--process-filter}'[set the process filter pattern]:regexp' \
'--process-short-name[force short name for processes name]' \
'--process-long-name[force long name for processes name]' \
'--stdout[display stats to stdout one stat per line]:stats' \
'--stdout-json[display stats to stdout, JSON format]:stats' \
'--stdout-csv[display stats to CSV, JSON format]:stats' \
'--issue[test all plugins and exit]' \
'--trace-malloc[trace memory allocation and display it at the end of the process]' \
'--memory-leak[test memory leak]' \
'--api-doc[display fields descriptions]'\
'--hide-kernel-threads[hide kernel threads in process list]' \
'(-b --byte)'{-b,--byte}'[display network rate in byte per second]' \
'--diskio-show-ramfs[show RAM Fs in the DiskIO plugin]' \
'--diskio-iops[show IO per second in the DiskIO plugin]' \
'--fahrenheit[display temperature in Fahrenheit]' \
'--fs-free-space[display FS free space instead of used]' \
'--sparkline[display sparklines instead of bar in the curses interface]' \
'--disable-unicode[disable unicode characters in the curses interface]' \
'--theme-white[optimize display colors for white background ]' \
'--disable-check-update[disable online Glances version check]' \
'--strftime[strftime format string for displaying current date in standalone mode]' \
} }
_glances "$@" _glances "$@"
# 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

File diff suppressed because it is too large Load Diff

80
src/_gpgconf Normal file
View File

@ -0,0 +1,80 @@
#compdef gpgconf
# Copyright (c) 2021 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Description:
# Completions for gpgconf (configuration utility provided with GnuPG 2.4.4
# <https://gnupg.org>)
#
# Authors:
# * "score" <seejay.11@gmail.com> https://keybase.io/score_under
_gpgconf_component() {
local values=(
"${(@f)$(gpgconf --list-components | awk -F: '{printf "%s[%s]\n", $1, $2}')}"
)
if [ "${action[2]}" = all ]; then
values+=('all[All daemon components]')
fi
_values 'component' "${(o)values[@]}"
}
_arguments \
'--help[print help text]' \
'--list-components[list all components]' \
'--check-programs[check all programs]' \
'--apply-defaults[apply global default values]' \
'--list-dirs[get the configuration directories for gpgconf]' \
'--list-config[list global configuration file]' \
'--check-config[check global configuration file]' \
'--query-swdb[query the software version database]' \
'--reload[reload all or a given component]:component:_gpgconf_component all' \
'--launch[launch a given component]:component:_gpgconf_component all' \
'--kill[kill a given component]:component:_gpgconf_component all' \
'--create-socketdir[create a directory for sockets below /run/user or /var/run/user]' \
'--remove-socketdir[remove a directory created with command --create-socketdir]' \
'--list-options[list options]:component:_gpgconf_component' \
'--change-options[change options]:component:_gpgconf_component' \
'--check-options[check options]:component:_gpgconf_component' \
'--apply-profile[update configuration files using the specified file]:configuration file:_path_files' \
'--status-fd[write status info to the specified file descriptor]:file descriptor' \
'--homedir[specify an alternative gnupg configuration home directory]:directory:_directories' \
'--chuid[change the current user to uid which may either be a number or a name]:uid' \
'(--lock --unlock)--unlock[remove a stale lock file hold for file]:name' \
'(--lock --unlock)--lock[name of file protected by the lock]:name' \
'(-o --output)'{-o,--output}'[write output to the specified file]:output file:_path_files' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'(-q --quiet)'{-q,--quiet}'[quiet]' \
'(-n --dry-run)'{-n,--dry-run}'[do not make any changes]' \
'(-r --runtime)'{-r,--runtime}'[activate changes at runtime, if possible]'
# 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

78
src/_grpcurl Normal file
View File

@ -0,0 +1,78 @@
#compdef grpcurl
# ------------------------------------------------------------------------------
# Copyright (c) 2023 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 grpcurl v1.8.7. (https://github.com/fullstorydev/grpcurl)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_arguments \
'*-H[Additional headers in "name:value" format]:header' \
'-allow-unknown-fields[If "json" format is used, allows unknown fields to be present]' \
'-authority[The authoritative name of the remote server]:authority' \
'-cacert[File containing trusted root certificates for the server]: :_files' \
'-cert[File containing client certificate(public key) to present to the server]: :_files' \
'-connect-timeout[The maximum time, in seconds, to wait for connection to be established]:seconds' \
'*-d[Data for request contents]:data' \
'-emit-defaults[Emit default values for JSON-encoded responses]' \
'-expand-headers[Headers may use "\${NAME}" syntax to reference environment variables]' \
'-format[The format of request data]: :(json text)' \
'-format-error[When a non-zero status is returned, format the response using the value set by the -format flag]' \
'*-import-path[The path to a directory from which proto sources can be imported]: :_files -/' \
'-insecure[Skip server certificate and domain verification]' \
'-keepalive-time[The maximum idle time in seconds]:seconds' \
'-key[File containing client private key, to present to the server]: :_files' \
'-max-msg-sz[The maximum encoded size of a response message in bytes, that grpcurl will accept]:bytes' \
'-max-time[The maximum total time the operation can take, in seconds]:seconds' \
'-msg-template[When describing messages, show a template of input data]' \
'-plaintext[Use plain-text HTTP/2 when connecting to server(no TLS)]' \
'*-proto[The name of a proto source file]: :_files' \
'*-protoset[The name of a file containing an encoded FileDescriptorSet]: :_files' \
'-protoset-out[The name of a file to be written that will contain a FileDescriptorSet]: :_files' \
'*-reflect-header[Additional reflection headers in "name:value" format]:header' \
'*-rpc-header[Additional RPC headers in "name:value" format]' \
'-servername[Override server name when validating TLS certificate]' \
'-unix[Indicates that the server address is the path to a Unix domain socket]' \
'-use-reflection[Server reflection will be used to determine the RPC schema]' \
'-user-agent[The specified value will be added to the User-Agent header set by the grpc-go library]:user_agent' \
'-v[Enable verbose output]' \
'(- *)-version[Print version]' \
'-vv[Enable very verbose output]' \
'(- *)-h[Show help message]' \
'*:: :_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

@ -1,6 +1,6 @@
#compdef gtk-launch #compdef gtk-launch gtk4-launch
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2011 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,55 +28,52 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for gtk-launch on gtk+-3.14.8 (http://www.gtk.org/). # Completion script for gtk-launch on gtk+-3.24.37, gtk4-launch-4.10.4
# (https://www.gtk.org/).
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
# ------- # -------
# #
# * ncaq <ncaq@ncaq.net> (version 3.14.8) # * ncaq <ncaq@ncaq.net>
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_gtk-launch() { _gtk-launch() {
_arguments \ local ret=1
{-h,--help}'[Show help options]' \
--help-all'[Show all help options]' \ if [[ $service == "gtk-launch" ]]; then
--help-gtk'[Show GTK+ Options]' \ _arguments -S -A "-*" \
--display='[X display to use]' \ '(- *)'{-h,--help}'[Show help options]' \
'1: :_applications' '(- *)'{-v,--version}'[Show program version]' \
'(- *)--help-all[Show all help options]' \
'(- *)--help-gtk[Show GTK+ Options]' \
'(- *)--display=[X display to use]:display:_x_display' \
'--class=[Program class as used by the window manager]:class' \
'--name=[Program name as used by the window manager]:name' \
'--gtk-module=[Load additional GTK+ modules]:module' \
'--g-fatal-warnings[Make all warnings fatal]' \
'1: :_gtk-launch-apps' \
'*:: :_files' && ret=0
else
# gtk4-launch
_arguments -S -A "-*" \
'(- *)'{-h,--help}'[Show help options]' \
'(- *)'{-v,--version}'[Show program version]' \
'1: :_gtk-launch-apps' \
'*:: :_files' && ret=0
fi
return ret
} }
_applications() { (( $+functions[_gtk-launch-apps] )) ||
local -a applications _gtk-launch-apps() {
local -a apps=(/usr/share/applications/*.desktop(:r:t))
for file in /usr/share/applications/*.desktop; do _values 'applications' $apps
applications+=`_format_entry $file`
done
_values -w \
'applications' \
$applications
} }
_format_entry() { _gtk-launch "$@"
echo "`_remove_path_extension $1`[`_get_description $1`]"
}
_remove_path_extension() {
# echo arg
# remove path string
# remove extension string
echo $1 | \
sed 's/.*\///' | \
sed 's/\.desktop//'
}
_get_description() {
# grep --no-messages option is handling of not UTF-8 text
grep --no-messages '^Comment=\|^Exec=' $1 | \
tr '\n' ' '
}
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

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

28
src/_hello Normal file
View File

@ -0,0 +1,28 @@
#compdef hello
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for GNU hello (https://www.gnu.org/software/hello/).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Wu Zhenyu <wuzy01@qq.com>
#
# ------------------------------------------------------------------------------
_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

@ -5,7 +5,7 @@
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # https://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
@ -16,7 +16,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for hledger 1.10 ( http://hledger.org/ ) # Completion script for hledger 1.10 ( https://hledger.org/ )
# Last updated: 07.08.2018 # Last updated: 07.08.2018
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -64,7 +64,7 @@ args=(
'--forecast=[apply periodic transaction rules to generate future transactions]' '--forecast=[apply periodic transaction rules to generate future transactions]'
) )
_arguments -C "$args[@]" -A "-*" \ _arguments -C -A "-*" "$args[@]" \
'(- *)--version[print version information]' \ '(- *)--version[print version information]' \
'--debug[show debug output]' \ '--debug[show debug output]' \
'1: :->cmds' \ '1: :->cmds' \
@ -284,3 +284,11 @@ while (( $#state )); do
done done
return ret 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

@ -1,6 +1,6 @@
#compdef http #compdef http https=http
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2015 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2015 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for httpie 0.7.2 (http://httpie.org) # Completion script for httpie 3.2.2 (https://httpie.io/)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -41,76 +41,72 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_httpie_params () { _httpie_params() {
local ret=1 expl
local ret=1 expl # or a url
if (( CURRENT <= NORMARG+1 )) && [[ $words[NORMARG] != *:* ]] ; then
# or a url _httpie_urls && ret=0
if (( CURRENT <= NORMARG+1 )) && [[ $words[NORMARG] != *:* ]] ; then
_httpie_urls && ret=0
# regular param, if we already have a url # regular param, if we already have a url
elif (( CURRENT > NORMARG )); then elif (( CURRENT > NORMARG )); then
# if the suffix is precisely : this is shorthand for a header
if [[ -prefix ':' ]]; then
PREFIX=
SUFFIX=:
fi
# if we are in front of a : (possibly due to the PREFIX move before)
if [[ -suffix ':' ]]; then
# this is rather buggy with normal tab behavior :\
compstate[insert]=menu
_wanted http_header expl 'HTTP Header' \
compadd -s ':' -S '' -- Content-Type Cookie && return 0
fi
# ignore all prefix stuff
compset -P '(#b)([^:@=]#)'
local name=$match[1]
if compset -P '='; then
_message "$name data field value"
elif compset -P '@'; then
_files
elif compset -P ':=@'; then
_files
elif compset -P ':='; then
_message "$name raw json data"
elif compset -P '=='; then
_message "$name url parameter value"
elif compset -P ':'; then
_message "$name header content"
else
typeset -a ops
ops=(
'=:data field'
'\::header'
'==:request parameter'
'@:data file field'
'\:=:raw json field'
'\:=@:raw json field file path'
)
_describe -t httpparams "parameter types" ops -Q -S ''
fi
ret=0
# if the suffix is precisely : this is shorthand for a header
if [[ -prefix ':' ]]; then
PREFIX=
SUFFIX=:
fi fi
# first arg may be a request method # if we are in front of a : (possibly due to the PREFIX move before)
(( CURRENT == NORMARG )) && if [[ -suffix ':' ]]; then
_wanted http_method expl 'Request Method' \ # this is rather buggy with normal tab behavior :
compstate[insert]=menu
_wanted http_header expl 'HTTP Header' \
compadd -s ':' -S '' -- Content-Type Cookie && return 0
fi
# ignore all prefix stuff
compset -P '(#b)([^:@=]#)'
local name=$match[1]
if compset -P '='; then
_message "$name data field value"
elif compset -P '@'; then
_files
elif compset -P ':=@'; then
_files
elif compset -P ':='; then
_message "$name raw json data"
elif compset -P '=='; then
_message "$name url parameter value"
elif compset -P ':'; then
_message "$name header content"
else
typeset -a ops
ops=(
'=:data field'
'\::header'
'==:request parameter'
'@:data file field'
'\:=:raw json field'
'\:=@:raw json field file path'
)
_describe -t httpparams "parameter types" ops -Q -S ''
fi
ret=0
fi
# first arg may be a request method
(( CURRENT == NORMARG )) &&
_wanted http_method expl 'Request Method' \
compadd GET POST PUT DELETE HEAD OPTIONS TRACE CONNECT PATCH LINK UNLINK && ret=0 compadd GET POST PUT DELETE HEAD OPTIONS TRACE CONNECT PATCH LINK UNLINK && ret=0
return $ret return $ret
} }
_httpie_urls() { _httpie_urls() {
local ret=1 local ret=1
if ! [[ -prefix [-+.a-z0-9]#:// ]]; then if ! [[ -prefix [-+.a-z0-9]#:// ]]; then
@ -125,69 +121,92 @@ _httpie_urls() {
} }
_httpie_printflags () { _httpie_printflags() {
local ret=1
local ret=1 # not sure why this is necessary, but it will complete "-pH" style without it
[[ $IPREFIX == "-p" ]] && IPREFIX+=" "
# not sure why this is necessary, but it will complete "-pH" style without it compset -P '(#b)([a-zA-Z]#)'
[[ $IPREFIX == "-p" ]] && IPREFIX+=" "
compset -P '(#b)([a-zA-Z]#)' local -a flags
[[ $match[1] != *H* ]] && flags+=( "H:request headers" )
[[ $match[1] != *B* ]] && flags+=( "B:request body" )
[[ $match[1] != *h* ]] && flags+=( "h:response headers" )
[[ $match[1] != *b* ]] && flags+=( "b:response body" )
local -a flags _describe -t printflags "print flags" flags -S '' && ret=0
[[ $match[1] != *H* ]] && flags+=( "H:request headers" )
[[ $match[1] != *B* ]] && flags+=( "B:request body" )
[[ $match[1] != *h* ]] && flags+=( "h:response headers" )
[[ $match[1] != *b* ]] && flags+=( "b:response body" )
_describe -t printflags "print flags" flags -S '' && ret=0 return $ret
}
return $ret _httpie_styles() {
local -a styles=(abap algol algol_nu arduino auto autumn borland bw
colorful default dracula emacs friendly
friendly_grayscale fruity github-dark gruvbox-dark gruvbox-light
igor inkpot lilypond lovelace manni material monokai
murphy native nord nord-darker one-dark paraiso-dark paraiso-light
pastie perldoc pie pie-dark pie-light rainbow_dash
rrt sas solarized solarized-dark solarized-light stata
stata-dark stata-light tango trac vim vs xcode zenburn)
_describe -t styles 'style' styles
} }
integer NORMARG integer NORMARG
_arguments -n -C -s \ _arguments -n -C -s \
'(-j --json -f)'{-j,--json}'[Data items from the command line are serialized as a JSON object.]' \ '(-j --json -f)'{-j,--json}'[Data items from the command line are serialized as a JSON object]' \
'(-f --form -j)'{-f,--form}'[Data items from the command line are serialized as form fields.]' \ '(-f --form -j)'{-f,--form}'[Data items from the command line are serialized as form fields]' \
'--multipart[Similar to --form, but always sends a multipart/form-data request]' \
'--boundary=[Specify a custom boundary string for multipart/form-data requests]' \
'--raw=[This option allows you to pass raw request data without extra processing]' \
'(-x --compress)'{-x,--compress}'[Content compressed with Deflate algorithm]' \ '(-x --compress)'{-x,--compress}'[Content compressed with Deflate algorithm]' \
'--pretty=[Controls output processing.]:output format:(all colors format none)' \ '--pretty=[Controls output processing]:output format:(all colors format none)' \
'(-s --style)'{-s,--style}'=[Output coloring style]:STYLE:(autumn borland bw colorful default emacs friendly fruity manni monokai murphy native pastie perldoc ttr solarized tango trac vim vs)' \ '(-s --style)'{-s,--style}'=[Output coloring style]:STYLE:_httpie_styles' \
'--unsorted[Disables all sorting while formatting output]' \
'--sorted[Re-enables all sorting options while formatting output]' \
'--response-charset=[Override the response encoding for terminal display purposes]:encoding' \
'--response-mime=[Override the response mime type for coloring and formatting for the terminal]:mine' \
'--format-options=[Controls output formatting]:format' \
'(-p --print)'{-p,--print}'=[String specifying what the output should contain]:print flags:_httpie_printflags' \ '(-p --print)'{-p,--print}'=[String specifying what the output should contain]:print flags:_httpie_printflags' \
'(-v --verbose)'{-v,--verbose}'[Print the whole request as well as the response.]' \ '(-v --verbose)'{-v,--verbose}'[Print the whole request as well as the response]' \
'(-p -h --headers)'{-h,--headers}'[Print only the response headers.]' \ '(-p -h --headers)'{-h,--headers}'[Print only the response headers]' \
'(-p -b --body)'{-b,--body}'[Print only the response body.]' \ '(-p -m --meta)'{-m,--meta}'[Print only the response metadata]' \
'(-p -b --body)'{-b,--body}'[Print only the response body]' \
'--all[By default, only the final request/response is shown]' \ '--all[By default, only the final request/response is shown]' \
'(--P --history-print)'{-P,--history-print}'=[The same as --print but applies only to intermediary requests/response]:print flags:_httpie_printflags' \ '(-S --stream)'{-S,--stream}'[Always stream the output by line, i.e., behave like `tail -f`]' \
'(-S --stream)'{-S,--stream}'[Always stream the output by line, i.e., behave like `tail -f`.]' \ '(-o --output)'{-o,--output}'=[Save output to FILE]:output file:_files' \
'(-o --output)'{-o,--output}'=[Save output to FILE.]:output file:_files' \ '(-d --download)'{-d,--download}'=[Do not print the response body to stdout]' \
'(-d --download)'{-d,--download}'=[Do not print the response body to stdout.]' \ '(-c --continue)'{-c,--continue}'[Resume an interrupted download]' \
'(-c --continue)'{-c,--continue}'[Resume an interrupted download.]' \ '(-q --quiet)'{-q,--quiet}'[Do not print to stdout or stderr, except for errors and warnings when provided once]' \
'(--session-read-only)--session=[Create, or reuse and update a session.]:session name (or path)' \ '(--session-read-only)--session=[Create, or reuse and update a session]:session name (or path)' \
'(--session)--session-read-only=[Create or read a session without updating it form the request/response exchange.]:session name (or path)' \ '(--session)--session-read-only=[Create or read a session without updating it form the request/response exchange]:session name (or path)' \
'(-a --auth)'{-a,--auth}'=[If only the username is provided (-a username)]:USER\:PASS' \ '(-a --auth)'{-a,--auth}'=[If only the username is provided (-a username)]:USER\:PASS' \
'--auth-type=[The authentication mechanism to be used. Defaults to "basic".]:AUTH-TYPE:(basic digest)' \ '--auth-type=[The authentication mechanism to be used. Defaults to "basic"]:AUTH-TYPE:(basic digest bearer)' \
'--ignore-netrc[Ignore credentials from .netrc]' \ '--ignore-netrc[Ignore credentials from .netrc]' \
'--offline[Build the request and print it but do not actually send it]' \ '--offline[Build the request and print it but do not actually send it]' \
'--proxy=[String mapping protocol to the URL of the proxy.]:PROXY' \ '--proxy=[String mapping protocol to the URL of the proxy]:PROXY' \
'(-F --follow)'{-F,--follow}'[Allow full redirects.]' \ '(-F --follow)'{-F,--follow}'[Allow full redirects]' \
'--max-redirects=[A limit of redirects]:number:' \ '--max-redirects=[A limit of redirects]:number:' \
'--max-headers=[The maximum number of response headers to be read]:number:' \ '--max-headers=[The maximum number of response headers to be read]:number:' \
"--verify=[Enable or disable verification of ssl certificates.]:verify certificate:(yes no)" \ "--verify=[Enable or disable verification of ssl certificates]:verify certificate:(yes no)" \
'--ssl=[The desired protocol version to use]:ssl version:(ssl2.3 tls1 tls1.1 tls1.2)' \ '--ssl=[The desired protocol version to use]:ssl version:(ssl2.3 tls1 tls1.1 tls1.2)' \
'--ciphers=[A string in the OpenSSL cipher list format]:ciphers' \
'--cert=[Specify a local cert to use as client side SSL certificate]:cert:_files' \ '--cert=[Specify a local cert to use as client side SSL certificate]:cert:_files' \
'--cert-key=[Specify the private to key to use with SSL]:cert key:_files' \ '--cert-key=[Specify the private to key to use with SSL]:cert key:_files' \
'--allow-redirects[Set this flag if full redirects are allowed (e.g. re-POST-ing of data at new ``Location``)]' \ '--cert-key-pass=[The passphrase to be used to with the given private key]' \
'--timeout=[Float describes the timeout of the request (Use socket.setdefaulttimeout() as fallback).]:timeout (seconds)' \ '--timeout=[Float describes the timeout of the request (Use socket.setdefaulttimeout() as fallback)]:timeout (seconds)' \
'--check-status[This flag instructs HTTPie to also check the HTTP status code and exit with an error if the status indicates one.]' \ '--check-status[This flag instructs HTTPie to also check the HTTP status code and exit with an error if the status indicates one]' \
'--path-as-is[Bypass dot segment URL squashing]' \ '--path-as-is[Bypass dot segment URL squashing]' \
'(-I --ignore-stdin)'{-I,--ignore-stdin}'[Do not attempt to read stdin.]' \ '--chunked[Enable streaming via chunked transfer encoding]' \
'(- *)--help[show help message.]' \ '(-I --ignore-stdin)'{-I,--ignore-stdin}'[Do not attempt to read stdin]' \
"(- *)--version[show program's version number and exit.]" \ '(- *)--help[show help message]' \
'--traceback[Prints exception traceback should one occur.]' \ '(- *)--manual[show the full manual]' \
"(- *)--version[show program's version number and exit]" \
'--traceback[Prints exception traceback should one occur]' \
'--default-scheme=[The default scheme to use if not specified in the URL]:scheme:' \ '--default-scheme=[The default scheme to use if not specified in the URL]:scheme:' \
'--debug[Prints exception traceback should one occur and other information useful for debugging HTTPie itself.]' \ '--debug[Prints exception traceback should one occur and other information useful for debugging HTTPie itself]' \
'*:args:_httpie_params' && return 0 '*:args:_httpie_params' && return 0
# Local Variables: # Local Variables:

View File

@ -1,6 +1,6 @@
#compdef ibus #compdef ibus
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2017 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for ibus (https://github.com/ibus/ibus). # Completion script for ibus 1.5.27 (https://github.com/ibus/ibus).
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -53,28 +53,45 @@ _arguments -C \
case $state in case $state in
args) args)
case $line[1] in case $line[1] in
engine) (engine)
_arguments \ _arguments \
":engine:(($(ibus list-engine|sed -ne 's/:/\\\\:/g' -e 's/^ \(\S\+\) - \(.*\)$/"\1:\2"/p')))" \ ":engine:(($(ibus list-engine|sed -ne 's/:/\\\\:/g' -e 's/^ \(\S\+\) - \(.*\)$/"\1:\2"/p')))" \
&& return && return
;; ;;
read-cache) (start|restart)
_arguments \
'--type=[start or restart daemon type with direct or systemd type]: :(direct systemd)' \
'--file=[start or restart daemon with SYSTEMD_SERVICE file]: :_files' \
'--verbose[Show debug message]' \
'(- *)--help[Show help message]' \
&& return
;;
(read-cache)
_arguments \ _arguments \
'--system[show the content of the system registry cache]' \ '--system[show the content of the system registry cache]' \
'--file=[custom registry cache to show]:registry cache:_files' \ '--file=[custom registry cache to show]:registry cache:_files' \
'(- *)--help[Show help message]' \
&& return && return
;; ;;
write-cache) (write-cache)
_arguments \ _arguments \
'--system[save the system registry cache]' \ '--system[save the system registry cache]' \
'--file=[custom registry cache to save]:registry cache:_files' \ '--file=[custom registry cache to save]:registry cache:_files' \
'(- *)--help[Show help message]' \
&& return && return
;; ;;
emoji) (emoji)
_arguments \ _arguments \
'--font=[emoji font]:emoji font: ' \ '--font=[emoji font]:emoji font: ' \
'--lang=[language of emoji annotations]:language:_language_codes ISO-639-1' \ '--lang=[language of emoji annotations]:language:_language_codes ISO-639-1' \
'--partial-match[match annotations with a partial string]' \ '--partial-match[match annotations with a partial string]' \
'(- *)--help[Show help message]' \
&& return
;;
(im-module)
_arguments \
'--type=[Set im-module TYPE]: :(gtk2 gtk3 gtk4)' \
'(- *)--help[Show help message]' \
&& return && return
;; ;;
esac esac
@ -82,3 +99,11 @@ case $state in
esac esac
return 1 return 1
# 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

@ -1,34 +1,34 @@
#compdef include-what-you-use #compdef include-what-you-use iwyu
# Copyright 2018 CERN for the benefit of the LHCb Collaboration. # Copyright 2018 CERN for the benefit of the LHCb Collaboration.
# All rights reserved. # All rights reserved.
# #
# Developed by: # Developed by:
# #
# CERN LBC group # CERN LBC group
# #
# CERN # CERN
# #
# http://cern.ch # https://home.web.cern.ch/
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
# with the Software without restriction, including without limitation the # with the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # 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 # sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: # furnished to do so, subject to the following conditions:
# #
# * Redistributions of source code must retain the above copyright notice, # * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimers. # this list of conditions and the following disclaimers.
# #
# * Redistributions in binary form must reproduce the above copyright # * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimers in the # notice, this list of conditions and the following disclaimers in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# #
# * Neither the names of the LBC group, CERN, nor the names of its # * Neither the names of the LBC group, CERN, nor the names of its
# contributors may be used to endorse or promote products derived from # contributors may be used to endorse or promote products derived from
# this Software without specific prior written permission. # this Software without specific prior written permission.
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -40,26 +40,48 @@
# In applying this licence, CERN does not waive the privileges and immunities # In applying this licence, CERN does not waive the privileges and immunities
# granted to it by virtue of its status as an Intergovernmental Organization or # granted to it by virtue of its status as an Intergovernmental Organization or
# submit itself to any jurisdiction. # submit itself to any jurisdiction.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for include-what-you-use 0.19 (https://github.com/include-what-you-use/include-what-you-use).
#
# ------------------------------------------------------------------------------
# TODO: # TODO:
# - prevent _iwyu_opts from running once the first clang option got passed # - prevent _iwyu_opts from running once the first clang option got passed
_iwyu_opts() { _iwyu_opts() {
_arguments '--check_also=[print iwyu-violation info for files matching the given glob pattern]:glob pattern:' \ _arguments \
'--cwd=[specify the current working directory]:current working directory:_path_files -/' \ '--check_also=[print iwyu-violation info for files matching the given glob pattern]:glob pattern:' \
'--howtodebug[print instructions on how to run iwyu under gdb]' \ '--keep=[tells iwyu to always keep these includes]:glob pattern' \
'--howtodebug=[print instructions on how to run iwyu under gdb if file matches argument]:file for debug run:_path_files' \ '*'"--mapping_file=[iwyu mapping file]:iwyu mapping file:_path_files -g '*(/) *.imp'" \
'*'"--mapping_file=[iwyu mapping file]:iwyu mapping file:_path_files -g '*(/) *.imp'" \ "--no_default_mappings[do not add iwyu's default mappings]" \
"--no_default_mappings[do not add iwyu's default mappings]" \ '--pch_in_code[mark the first include in a translation unit as a precompiled header]' \
'--pch_in_code[mark the first include in a translation unit as a precompiled header]' \ '--prefix_header_includes=[what to do with command line includes]:command line include treatment:(add keep remove)' \
'--prefix_header_includes=[what to do with command line includes]:command line include treatment:(add keep remove)' \ "--transitive_includes_only[do not suggest that a file add headers that aren't already visible]" \
"--transitive_includes_only[do not suggest that a file add headers that aren't already visible]" \ '--max_line_length=[maximum line length for includes]:a number:' \
'--max_line_length=[maximum line length for includes]:a number:' \ '--comment_style=[set verbosity of "why" comments to]:comment style:(none short long)' \
'--no_comments[do not add "why" comments]' \ '--no_comments[do not add "why" comments]' \
'--no_fwd_decls[do not use forward declarations]' \ '--no_fwd_decls[do not use forward declarations]' \
'--verbose=[the higher the level, the more output]:a number:' '--verbose=[the higher the level, the more output]:a number:' \
'--quoted_includes_first[when sorting includes, place quoted ones first]' \
'--cxx17ns[suggests the more concise syntax introduced in C++17]' \
'--error=-[exit with N(default: 1) for iwyu violations]::exit code' \
'--error_always=-[always exit with N (default: 1)]::exit code' \
'--debug=[debug flags]:flag' \
'--regex=[use specified regex dialect in iwyu]:dialect:(llvm ecmascript)' \
'*: :_files'
} }
_arguments "*-Xiwyu[include-what-you-use options]:include-what-you-use options:_iwyu_opts" _alternative \
# gcc will also provide --version and --help. Not ideal. 'iwyu:iwyu_option:_iwyu_opts' \
_gcc 'gcc:gcc_option:_gcc' \
# 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

307
src/_inxi
View File

@ -3,7 +3,9 @@
# Description # Description
# ----------- # -----------
# #
# Completion script of inxi - a full featured CLI system information tool # Completion script of inxi 3.3.21-00 (https://smxi.org/docs/inxi.htm)
#
# a full featured CLI system information tool
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -13,134 +15,185 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
local colors=($(seq 0 42)) _inxi() {
local verbosity_levels=( typeset -A opt_args
'0:Short output, same as: inxi' local context state line
'1:Basic verbose, -S + basic CPU' local curcontext="$curcontext"
'2:Adds -N, -M, -B, same as: inxi -b' local ret=1
'3:Adds -C, -n, -x'
'4:Adds -P, -D'
'5:Adds -A, -m, -s, -l, -u'
'6:Adds -p, -o, -d, --usb, -xx'
'7:Adds -i, -xxx'
'8:Adds -r, --slots, -tcm, --admin'
)
local alt_downloaders=(
'40:Perl'
'41:Curl'
'42:Fetch'
'43:Wget'
'44:Curl, Fetch, and Wget'
)
local partition_sort_orders=(
'dev-base:/dev partition identifier'
'fs:partition filesystem'
'id:mount point of partition (default)'
'label:label of partition'
'percent-used:percentage of partition size used'
'size:KiB size of partition'
'uuid:UUID of the partition'
'used:KiB used of partition'
)
_arguments -s \ local -a colors=({0..42})
{-A,--audio}"[Show Audio/sound card(s) information]" \
{-b,--basic}"[Show basic output, short form]" \
{-B,--battery}"[Show system Battery information]" \
{-c+,--color=}"[Set color scheme]:color:(${colors[*]})" \
{-C,--cpu}"[Show full CPU output]" \
{-d,--disk-full,--optical}"[Show hard + optical drive info]" \
{-D,--disk}"[Show hard Disk info]" \
{-f,--flags}"[Show all CPU flags used]" \
{-F,--full}"[Show Full output]" \
{-G,--graphics}"[Show Graphic card(s) information]" \
"(- *)"{-h,--help}"[Show list of command-line options]" \
{-i,--ip}"[Show WAN IP address and local interfaces]" \
{-I,--info}"[Show Information: processes, uptime, etc.]" \
{-l,--label}"[Show partition labels]" \
{-m,--memory}"[Memory (RAM) data]" \
{-M,--machine}"[Show Machine data]" \
{-n,--network-advanced}"[Show Advanced Network card information]" \
{-N,--network}"[Show Network card(s) information]" \
{-o,--unmounted}"[Show unmounted partition information]" \
{-p,--partitions-full}"[Show full Partition information]" \
{-P,--partitions}"[Show basic Partition information]" \
{-r,--repos}"[Show distro repository data]" \
{-R,--raid}"[Show RAID data]" \
"(- *)"--recommends"[Check inxi dependencies + recommends]" \
{-s,--sensors}"[Show output from configured sensors]" \
--slots"[Show PCI slots]" \
{-S,--system}"[Show System information]" \
{-t+,--processes=}"[Show processes]:processes:((c\:'CPU only' m\:'Memory only' cm\:'CPU+memory'))" \
--usb"[Show USB data for attached Hubs and Devices]" \
{-u,--uuid}"[Show partition UUIDs]" \
"(- *)"{-U,--update}"[Auto-update inxi]" \
"(- *)"{-V,--version}"[Show version of inxi]" \
{-v+,--verbosity=}"[Script verbosity levels]:verbosity:->verbosity" \
{-w,--weather}"[Adds weather line]" \
{-W+,--weather-location=}"[Get weather/time for an alternate location]:weather location: " \
--weather-unit="[Set weather unit]:weather unit:((m\:metric i\:imperial mi\:'metric (imperial)' im\:'imperial (metric)'))" \
{-y+,--width=}"[Set width override]:columns (80 minimum): " \
{-z,--filter}"[Adds security filters]" \
{-Z,--filter-override}"[Absolute override for output filters]" \
\*{-x,--extra}"[Extra data options]" \
{-a,--admin}"[Admin extra data options]:admin option:->admin" \
--alt"[Bypass a downloader option]:downloader:->alt" \
--display"[Get display data out of X]:\:<integer>: " \
--dmidecode"[Force use of dmidecode]" \
--downloader"[Force inxi to use a specific downloader]:downloader:(curl fetch perl wget)" \
--host"[Turns on hostname in System line]" \
--indent-min"[Overrides default indent minimum value]:integer: " \
--limit"[Limit max IP addresses for -i]:limit (-1 removes the limit): " \
--man"[Updates / install man page with -U]" \
--no-host"[Turns off hostname in System line]" \
--no-man"[Disables man page install with -U]" \
--no-ssl"[Skip SSL certificate checks]" \
--output"[Change data output type]:type:(json screen xml)" \
--output-file"[Path to output file]:output file:->output_file" \
--partition-sort"[Change default sort order of partition output]:order:->partition_sort" \
--sleep"[Change CPU sleep time]:sleep time (usually in decimals): " \
--tty"[Forces internal IRC flag to off]" \
--usb-sys"[Forces the USB data generator to use /sys as data source]" \
--usb-tool"[Forces the USB data generator to use lsusb as data source]" \
--wan-ip-url"[Force -i to use supplied URL as WAN ip source]:URL: " \
--wm"[Force System item wm to use wmctrl as data source]" \
--dbg"[Debug downloader failures]:level:(1)" \
--debug"[On screen debugger output]:level:(1 2 3 10 11 20 21 22)" \
--ftp"[Set alternate ftp upload location]:FTP URL: " \
--debug-proc"[Force debugger to parse /proc directory data when run as root]" \
--debug-proc-print"[Use this to locate file that /proc debugger hangs on]" \
--debug-no-exit"[Skip exit on error when running debugger]" \
--debug-no-proc"[Skip /proc debugging in case of a hang]" \
--debug-no-sys"[Skip /sys debugging in case of a hang]" \
--debug-sys"[Force PowerPC debugger parsing of /sys as sudo/root]" \
--debug-proc"[Force debugger to parse /proc directory data when run as root]" \
--debug-sys-print"[Use this to locate file that /sys debugger hangs on]"
case "$state" in _arguments -C -s \
admin) '(-A --audio)'{-A,--audio}"[Show Audio/sound card(s) information]" \
_arguments -s \ '(-b --basic)'{-b,--basic}"[Show basic output, short form]" \
-C"[Adds CPU family, model-id, and stepping]" \ '(-B --battery)'{-B,--battery}"[Show system Battery information]" \
-d"[Adds logical and physical block size in bytes]" \ '(-C --cpu)'{-C,--cpu}"[Show full CPU output]" \
{-p,-P}"[Adds raw partition / filesystem block size]" '(-d --disk-full --optical)'{-d,--disk-full,--optical}"[Show hard + optical drive info]" \
;; '(-D --disk)'{-D,--disk}"[Show hard Disk info]" \
alt) '(-E --bluetooth)'{-E,--bluetooth}'[Show bluetooth device data report, if available]' \
_describe 'downloader' alt_downloaders '--edid[Full graphics data, triggers -a -G]' \
;; '(-f --flags)'{-f,--flags}"[Show all CPU flags used]" \
output_file) '(-F --full)'{-F,--full}"[Show Full output]" \
_alternative \ '(-G --graphics)'{-G,--graphics}"[Show Graphic card(s) information]" \
"outputs:output file:((print\:'Print to stdout'))" \ '(- *)'{-h,--help}"[Show list of command-line options]" \
"outputs:output file:_files" '(-i --ip)'{-i,--ip}"[Show WAN IP address and local interfaces]" \
;; '(-I --info)'{-I,--info}"[Show Information: processes, uptime, etc.]" \
partition_sort) '(-j --swap)'{-j,--swap}'[Swap in use]' \
_describe 'sort order' partition_sort_orders '(-J --usb)'{-J,--usb}"[Show USB data for attached Hubs and Devices]" \
;; '(-l --label)'{-l,--label}"[Show partition labels]" \
verbosity) '(-L --logical)'{-L,--logical}'[Logical devices]' \
_describe 'script verbosity level' verbosity_levels '(-m --memory)'{-m,--memory}"[Memory (RAM) data]" \
;; '(--memory-modules --mm)'{--memory-modules,--mm}'[Memory (RAM) data. Exclude empty module slots]' \
esac '(--memory-short --ms)'{--memory-short,--ms}'[Memory (RAM) data. Show only short Memory RAM report]' \
'(-M --machine)'{-M,--machine}"[Show Machine data]" \
'(-n --network-advanced)'{-n,--network-advanced}"[Show Advanced Network card information]" \
'(-N --network)'{-N,--network}"[Show Network card(s) information]" \
'(-o --unmounted)'{-o,--unmounted}"[Show unmounted partition information]" \
'(-p --partitions-full)'{-p,--partitions-full}"[Show full Partition information]" \
'(-P --partitions)'{-P,--partitions}"[Show basic Partition information]" \
'(-r --repos)'{-r,--repos}"[Show distro repository data]" \
'(-R --raid)'{-R,--raid}"[Show RAID data]" \
"(- *)"--recommends"[Check inxi dependencies + recommends]" \
'(-s --sensors)'{-s,--sensors}"[Show output from configured sensors]" \
"--slots[Show PCI slots]" \
'(-S --system)'{-S,--system}"[Show System information]" \
'(-t --processes)'{-t+,--processes=}"[Show processes]:processes:((c\:'CPU only' m\:'Memory only' cm\:'CPU+memory'))" \
'(-u --uuid)'{-u,--uuid}"[Show partition UUIDs]" \
"(- *)"{-U,--update}"[Auto-update inxi]" \
"(- *)"{-V,--version}"[Show version of inxi]" \
'(-v --verbosity)'{-v+,--verbosity=}"[Script verbosity levels]:verbosity:_inxi_verbosity" \
'(-w --weather)'{-w,--weather}"[Adds weather line]" \
'(-W --weather-location)'{-W+,--weather-location=}"[Get weather/time for an alternate location]:weather location: " \
"--weather-source=[Change weather data source]: :(1 2 3 4 5 6 7 8 9)" \
"--weather-unit=[Set weather unit]:weather unit:((m\:metric i\:imperial mi\:'metric (imperial)' im\:'imperial (metric)'))" \
"--host[Turns on hostname in System line]" \
"--no-host[Turns off hostname in System line]" \
{-z,--filter}"[Adds security filters]" \
'(--za --filter-all)'{--za,--filter-all}'[Shortcut triggers, -z, --zl, --zu, --zv]' \
'(--zl --filter-label)'{--zl,--filter-label}'[Filter out partition labels in -j, -o, -p, -P, -Sa]' \
'(--zu --filter-uuid)'{--zu,--filter-uuid}'[Filter out partition UUIDs in -j, -o, -p, -P, -Sa]' \
'(--zv --filter-vulnerabilities)'{--zv,--filter-vulnerabilities}'[Filters out Vulnerabilities report in -Ca]' \
'(-Z --no-filter)'{-Z,--no-filter}"[Disable output filters]" \
'(-c --color)'{-c+,--color=}"[Set color scheme]:color:(${colors[*]})" \
"--indent=[Change default wide mode primary indentation width]:integer:(11 12 13 14 15 16 17 18 19 20)" \
"--indents=[Change wrapped mode primary indentation width]:integer:(0 1 2 3 4 5 6 7 8 9 10)" \
"--limit[Limit max IP addresses for -i]:limit (-1 removes the limit): " \
'(--max-wrap --wrap-max)'{--max-wrap,--wrap-max}='[Set maximum width where inxi autowraps line starters]:width' \
"--output[Change data output type]:type:(json screen xml)" \
"--output-file[Path to output file]:output file:->output_file" \
"--partition-sort[Change default sort order of partition output]:order:_inxi_partition_sort" \
'(-y --width)'{-y+,--width=}"[Set width override]:columns (80 minimum): " \
'(-Y --height)'{-Y+,--height=}"[Output height control]:" \
\*{-x,--extra}"[Extra data options]" \
'(-a --admin)'{-a,--admin}"[Admin extra data options]:admin option:->admin" \
"--alt[Bypass a downloader option]:downloader:_inxi_alt" \
'--bt-tool[Force use of given tool for bluetooth report]' \
'(--no-dig --dig)--dig[Overrides configuration item NO_DIG]' \
"--display[Get display data out of X]:\:<integer>: " \
"--dmidecode[Force use of dmidecode]" \
"--downloader[Force inxi to use a specific downloader]:downloader:(curl fetch perl wget)" \
'--force[Force use items]:' \
'--hddtemp[Force use of hddtemp for disk temps]' \
'(--no-html-wan --html-wan)--html-wan[Overrides configuration item NO_HTML_WAN]' \
'(--dig --no-dig)--no-dig[Skip dig for WAN IP checks]' \
'--no-doas[Skip internal program use of doas features]' \
'(--no-html-wan --html-wan)--no-html-wan[Skip HTML IP sources for WAN IP checks]' \
"--no-ssl[Skip SSL certificate checks]" \
"--no-sudo[Skip internal program use of sudo features]" \
'--rpm[Force use of disabled package manager counts for packages feature with -rx/-Ix ]' \
'--sensors-default[Removes configuration item SENSORS_USE and SENSORS_EXCLUDE]' \
'--sensors-exclude[Exclude supplied sensor array for -s output]' \
'--sensors-use[Use only supplied sensor array for -s output]' \
"--sleep[Change CPU sleep time]:sleep time (usually in decimals): " \
"--tty[Forces internal IRC flag to off]" \
"--usb-sys[Forces the USB data generator to use /sys as data source]" \
"--usb-tool[Forces the USB data generator to use lsusb as data source]" \
"--wan-ip-url[Force -i to use supplied URL as WAN ip source]:URL: " \
"--wm[Force System item wm to use wmctrl as data source]" \
"--dbg[Debug downloader failures]:level:(1)" \
"--debug[On screen debugger output]:level:(1 2 3 10 11 20 21 22)" \
"--debug-proc[Force debugger to parse /proc directory data when run as root]" \
"--debug-proc-print[Use this to locate file that /proc debugger hangs on]" \
"--debug-no-exit[Skip exit on error when running debugger]" \
"--debug-no-proc[Skip /proc debugging in case of a hang]" \
"--debug-no-sys[Skip /sys debugging in case of a hang]" \
"--debug-sys[Force PowerPC debugger parsing of /sys as sudo/root]" \
"--debug-proc[Force debugger to parse /proc directory data when run as root]" \
"--debug-sys-print[Use this to locate file that /sys debugger hangs on]" \
"--ftp[Set alternate ftp upload location]:FTP URL: " \
&& ret=0
case "$state" in
(admin)
_arguments -s \
'-C[Adds CPU family, model-id, and stepping]' \
'-d[Adds logical and physical block size in bytes]' \
{-p,-P}'[Adds raw partition / filesystem block size]' \
&& ret=0
;;
(output_file)
_alternative \
"outputs:output file:((print\:'Print to stdout'))" \
"outputs:output file:_files"
;;
esac
return ret
}
(( $+functions[_inxi_partition_sort] )) ||
_inxi_partition_sort() {
local -a orders=(
'dev-base:/dev partition identifier'
'fs:partition filesystem'
'id:mount point of partition (default)'
'label:label of partition'
'percent-used:percentage of partition size used'
'size:KiB size of partition'
'uuid:UUID of the partition'
'used:KiB used of partition'
)
_describe 'sort order' orders
}
(( $+functions[_inxi_alt] )) ||
_inxi_alt() {
local -a downloaders=(
'40:Perl'
'41:Curl'
'42:Fetch'
'43:Wget'
'44:Curl, Fetch, and Wget'
)
_describe 'downloader' downloaders
}
(( $+functions[_inxi_verbosity] )) ||
_inxi_verbosity() {
local -a levels=(
'0:Short output, same as: inxi'
'1:Basic verbose, -S + basic CPU'
'2:Adds -N, -M, -B, same as: inxi -b'
'3:Adds -C, -n, -x'
'4:Adds -P, -D'
'5:Adds -A, -m, -s, -l, -u'
'6:Adds -p, -o, -d, --usb, -xx'
'7:Adds -i, -xxx'
'8:Adds -r, --slots, -tcm, --admin'
)
_describe 'script verbosity level' levels
}
_inxi "$@"
# Local Variables: # Local Variables:
# mode: shell-script # mode: Shell-Script
# sh-shell: zsh # sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End: # End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -1,6 +1,6 @@
#compdef trash-restore #compdef ipcmk
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,26 +28,20 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for trash-restore a tool from trash management package trash-cli (http://code.google.com/p/trash-cli). # Completion script for ipcmk, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# # - create various IPC resources
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Jindřich Pilař (https://github.com/JindrichPilar)
# #
# Author:
# * Aditi Sharma (https://github.com/Aditi76117)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments -s \
_trash-restore() { '(-M --shmem)'{-M,--shmem}'[Create a shared memory segment of size bytes]:size' \
'(-Q --queue)'{-Q,--queue}'[Create a message queue]' \
_arguments -C \ '(-S --semaphore)'{-S,--semaphore}'[Create a semaphore array with number of elements]:number' \
'--version[Show programs version number and exit]' \ '(-p --mode)'{-p,--mode}'[Access permissions for the resource]:mode' \
'*: :' \ '(- *)'{-h,--help}'[Display help text and exit]' \
'(- *)'{-V,--version}'[Print version and exit]'
}
_trash-restore
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script
@ -56,3 +50,6 @@ _trash-restore
# sh-basic-offset: 2 # sh-basic-offset: 2
# End: # End:
# vim: ft=zsh sw=2 ts=2 et # vim: ft=zsh sw=2 ts=2 et
# Note: This script is useful only on systems with `ipcmk` (typically Linux).
# macOS does not include this command.

View File

@ -1,6 +1,6 @@
#compdef trash-put trash #compdef ipcrm
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,26 +28,25 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for trash-put a tool from trash management package trash-cli (http://code.google.com/p/trash-cli). # Completion script for ipcrm, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# # - remove System V IPC objects
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Jindřich Pilař (https://github.com/JindrichPilar)
# #
# Author:
# * Aditi Sharma (https://github.com/Aditi76117)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments -s \
_arguments -C \ '(-a --all)'{-a,--all}'[Remove all resources]:resource:(shm msg sem)' \
'--version[display version information]' \ '(-M --shmem-key)'{-M,--shmem-key}'[Remove the shared memory segment created with shemkey]:shmkey' \
{-h,--help}'[display usage information]' \ '(-m --shmem-id)'{-m,--shmem-id}'[Remove the shared memory segment identified by shmid]:shmid' \
{-d,--directory}'[remove empty directories - ignored (for GNU rm compatibility)]' \ '(-Q --queue-key)'{-Q,--queue-key}'[Remove the message queue created with msgkey]:msgkey' \
{-f,--force}'[ignore nonexistent arguments and never prompt - ignored (for GNU rm compatibility)]' \ '(-q --queue-id)'{-q,--queue-id}'[Remove the message queue identified by msgid]:msgid' \
{-i,--interactive}'[prompt before every removal - ignored (for GNU rm compatibility)]' \ '(-S --semaphore-key)'{-S,--semaphore-key}'[Remove the semaphore created with semkey]:semkey' \
{-r,-R,--recursive}'[remove directories and their content recursively - ignored (for GNU rm compatibility)]' \ '(-s --semaphore-id)'{-s,--semaphore-id}'[Remove the semaphore identified by semid]' \
{-v,--verbose}'[explain what is being done]' \ '(- *)'{-h,--help}'[Display help text and exit]' \
'*: :_files' '(- *)'{-V,--version}'[Print version and exit]' \
'1:type:(shm msg sem)' \
'*:id'
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -1,6 +1,6 @@
#compdef google #compdef ipcs
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,62 +28,28 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for googlecl (https://code.google.com/p/googlecl/) # Completion script for ipcs, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# # - show information on IPC facilities
# Source: https://raw.github.com/dadrc/zsh-cfg/master/completions/_google
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * dadrc (https://github.com/dadrc)
# * Ben O'Hara (https://github.com/benohara)
# #
# Author:
# * Aditi Sharma (https://github.com/Aditi76117)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_google() { _arguments -s \
# init variables '(-i --id)'{-i,--id}'[Show full details on just one resource element identified by id]:id' \
local curcontext="$curcontext" state line '(- *)'{-h,--help}'[Display help text and exit]' \
typeset -A opt_args '(- *)'{-V,--version}'[Print version and exit]' \
'(-m --shmems)'{-m,--shmems}'[Write information about active shared memory segments]' \
# init state '(-q --queues)'{-q,--queues}'[Write information about active message queues]' \
_arguments \ '(-s --semaphores)'{-s,--semaphores}'[Write information about active semaphore sets]' \
'1: :->service'\ '(-a --all -s --semaphores -q --queues -m --shmems)'{-a,--all}'[Write information about all three resources]' \
'2: :->task' '(-c --creator)'{-c,--creator}'[Show creator and owner]' \
'(-l --limits)'{-l,--limits}'[Show resource limits]' \
case $state in '(-p --pid)'{-p,--pid}'[Show PIDs of creator and last operator]' \
service) '(-t --time)'{-t,--time}'[Write time information]' \
_arguments '1:service:(picasa blogger youtube docs contacts calendar finance)' '(-u --summary)'{-u,--summary}'[Show status summary]' \
;; '(--human -b --bytes)'{-b,--bytes}'[Print the sizes in bytes rather than in a human-readable format]' \
*) '(--human -b --bytes)--human[Print sizes in human-readable format]'
case $words[2] in
picasa)
compadd "$@" get create list list-albums tag post delete
;;
blogger)
compadd "$@" post tag list delete
;;
youtube)
compadd "$@" post tag list delete
;;
docs)
compadd "$@" edit delete list upload get
;;
contacts)
compadd "$@" list list-groups add add-groups delete-groups delete
;;
calendar)
compadd "$@" add list today delete
;;
finance)
compadd "$@" list-txn delete-pos create-pos delete-txn create create-txn list list-pos delete
;;
*)
esac
esac
}
_google "$@"
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

171
src/_jest Normal file
View File

@ -0,0 +1,171 @@
#compdef jest jest.js
# ------------------------------------------------------------------------------
# Copyright (c) 2023 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for Jest 30.1.3 (https://jestjs.io/)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shotaro Aoyama (https://github.com/aoyama-val)
#
# ------------------------------------------------------------------------------
local curcontext=$curcontext state line ret=1
declare -A opt_args
local -a notify_modes=("always" "failure" "success" "change" "success-change" "failure-change")
_arguments -C -s \
'(- : *)'{-h,--help}'[Show help]' \
'(- : *)'--version'[Show version number]' \
'--all[The opposite of "onlyChanged"]' \
'--automock[Automock all files by default]' \
'(-b --bail)'{-b,--bail}'[Exit the test suite immediately after "n" number of failing tests]' \
'(--cache --no-cache)--cache[Use the transform cache]' \
'(--cache --no-cache)--no-cache[Do not use the transform cache]' \
'--cacheDirectory[The directory where Jest should store its cached dependency information]:dir:_files -/' \
'--changedFilesWithAncestor[Run tests related to the current changes and the changes made in the last commit]' \
'--changedSince[Run tests related to the changes since the provided branch]:string' \
'--ci[Run Jest in continuous integration (CI) mode]' \
'--clearCache[Clear the configured Jest cache directory and then exits]' \
'--clearMocks[Automatically clear mock calls, instances, contexts and results before every test]' \
'--collectCoverageFrom[A glob pattern for collecting coverage info]:string' \
'(--color --colors)'{--color,--colors}'[Force test results output color highlighting (even if stdout is not a TTY)]' \
'(-c --config)'{-c,--config}'[The path to a jest config file specifying how to find and execute tests]:files:_files' \
'(--coverage --collectCoverage)'{--coverage,--collectCoverage}'[Indicate that test coverage information should be collected and reported in the output]' \
'--coverageDirectory[The directory where Jest should output its coverage files]:dir:_files -/' \
'--coveragePathIgnorePatterns[An array of regexp pattern strings that are matched against all file paths before executing the test]:array' \
'--coverageProvider[Select between Babel and V8 to collect coverage]:choices:(babel v8)' \
'--coverageReporters[A list of reporter names that Jest uses when writing coverage reports]:array' \
'--coverageThreshold[A JSON string with which will be used to configure minimum threshold enforcement for coverage results]:string' \
'--debug[Print debugging info about your jest config]' \
'--detectLeaks[**EXPERIMENTAL**: Detect memory leaks in tests]' \
'--detectOpenHandles[Print out remaining open handles preventing Jest from exiting at the end of a test run]' \
'(--env --testEnvironment)'{--env,--testEnvironment}'[The test environment used for all tests]:files:_files' \
'--errorOnDeprecated[Make calling deprecated APIs throw helpful error messages]' \
'(-e --expand)'{-e,--expand}'[Use this flag to show full diffs instead of a patch]' \
'--filter[Path to a module exporting a filtering function]:string' \
'--findRelatedTests[Find related tests for a list of source files that were passed in as arguments]' \
'--forceExit[Force Jest to exit after all tests have completed running]' \
'--globalSetup[The path to a module that runs before All Tests]:files:_files' \
'--globalTeardown[The path to a module that runs after All Tests]:files:_files' \
'--globals[A JSON string with map of global variables that need to be available in all test environments]:string' \
'--haste[A JSON string with map of variables for the haste module system]:string' \
'--ignoreProjects[Ignore the tests of the specified projects]:array' \
'--injectGlobals[Should Jest inject global variables or not]' \
'--json[Print the test results in JSON]' \
'--lastCommit[Run all tests affected by file changes in the last commit made]' \
'--listTests[List all tests Jest will run given the arguments and exits]' \
'--logHeapUsage[Log the heap usage after every test]' \
'--maxConcurrency[Specify the maximum number of tests that are allowed to run concurrently]:number' \
'(-w --maxWorkers)'{-w,--maxWorkers}'[Maximum number of workers will spawn for running tests]:string' \
"--moduleDirectories[Directories to be searched from the requiring module's location]:dir:_files -/" \
'--moduleFileExtensions[An array of file extensions your modules use]:array' \
'--moduleNameMapper[A JSON string with a map from regular expressions to module names]:string' \
'--modulePathIgnorePatterns[An array of ignore module pattern]:array' \
'--modulePaths[An array of absolute paths to search modules]:directories:_files -/' \
'--noStackTrace[Disable stack trace in test results output]' \
'--notify[Activate notifications for test results]' \
'--notifyMode[Specify notification mode for test results]:mode:($notify_modes)' \
'(-o --onlyChanged)'{-o,--onlyChanged}'[Attempt to identify which tests to run based on which files have changed in the current repository]' \
'(-f --onlyFailures)'{-f,--onlyFailures}'[Run tests that failed in the previous execution]' \
'--openHandlesTimeout[Timeout msecs for open handle warnings]:number' \
'--outputFile[Output file name of test results]:files:_files' \
'--passWithNoTests[Will not fail if no tests are found]' \
"--preset[A preset that is used as a base for Jest's configuration]:string" \
'--prettierPath[The path to the "prettier" module used for inline snapshots]:string' \
'--projects[Projects that use Jest to run all tests of all projects in a single instance]:array' \
'--randomize[Shuffle the order of the tests within a file]' \
'--reporters[A list of custom reporters for the test suite]:array' \
'--resetMocks[Automatically reset mock state before every test]' \
'--resetModules[The module registry for every test file will be reset before running each test]' \
'--resolver[A JSON string which allows the use of a custom resolver]:string' \
'--restoreMocks[Automatically restore mock state and implementation before every test]' \
'--rootDir[The root directory that Jest should scan for tests and modules]:dir:_files -/' \
'--roots[A list directories that Jest should use to search for files in]:array:_files -/' \
'(-i --runInBand)'{-i,--runInBand}'[Run all tests serially in the current process]' \
'--runTestsByPath[Used when provided patterns are exact file paths]' \
"--runner[Use a custom runner instead of Jest's default test runner]:string" \
'--seed[Set a seed value that can be retrieved in a tests file via "jest.getSeed()"]:number' \
'--selectProjects[Run the tests of the specified projects]:array' \
'--setupFiles[Module paths that configure or set up the testing environment before each test]:files:_files' \
'--setupFilesAfterEnv[Module paths that configure or set up the testing framework before each test]:files:_files' \
'--shard[Shard tests and execute only the selected shard]:shard' \
'--showConfig[Print your jest config and then exits]' \
'--showSeed[Print the seed value in the test report summary]' \
'--silent[Prevent tests from printing messages through the console]' \
'--skipFilter[Disable the filter provided by --filter]' \
'--snapshotSerializers[Paths of snapshot serializer modules for snapshot testing]:files:_files' \
'--testEnvironmentOptions[Options that will be passed to the "testEnvironment"]:string' \
'--testFailureExitCode[Exit code of "jest" command if the test run failed]:string' \
'--testLocationInResults[Add "location" information to the test results]' \
'--testMatch[The glob patterns Jest uses to detect test files]:array' \
'(-t --testNamePattern)'{-t,--testNamePattern}'[Run only tests with a name that matches the regex pattern]:string' \
'--testPathIgnorePatterns[Regexp patterns for ignoring tests]:array' \
'--testPathPatterns[Regexp patterns for executing tests]:array' \
'--testRegex[Regexp patterns that Jest uses to detect test files]:array' \
'--testResultsProcessor[Specify a custom results processor]:string' \
'--testRunner[Specify a custom test runner]:string' \
'--testSequencer[Specify a custom test sequencer]:string' \
'--testTimeout[Default timeout of test cases]:number' \
'--transform[A JSON string which maps from regular expressions to paths to transformers]:string' \
'--transformIgnorePatterns[Ignore regexp patterns for transformation]:array' \
'--unmockedModulePathPatterns[Regexp patterns for unmocked modules]:array' \
'(-u --updateSnapshot)'{-u,--updateSnapshot}'[Re-record snapshots]' \
'--useStderr[Divert all output to stderr]' \
'--verbose[Display individual test results with the test suite hierarchy]' \
'--waitForUnhandledRejections[Give one event loop turn to handle unhandles rejections]' \
'--watch[Watch files for changes and rerun tests related to changed files]' \
'--watchAll[Watch files for changes and rerun all tests]' \
'--watchPathIgnorePatterns[Ignore patterns of watch path]:array' \
'(--watchman --no-watchman)--watchman[Use watchman for file crawling]' \
'(--watchman --no-watchman)--no-watchman[Do not use watchman for file crawling]' \
'--workerThreads[Use worker threads for parallelization]' \
'*: :->file' \
&& ret=0
case $state in
(file)
(( CURRENT > 0 )) && line[CURRENT]=()
line=( ${line//(#m)[\[\]()\\*?#<>~\^\|]/\\$MATCH} )
_files -F line && ret=0
;;
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

@ -3,9 +3,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for JMeter (http://jakarta.apache.org/jmeter). # Completion script for JMeter (https://jmeter.apache.org/).
#
# Status: incomplete
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -15,8 +13,8 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments \ _arguments \
'(- 1 *)--?[print command line options and exit]' \
'(- 1 *)'{-h,--help}'[print usage information and exit]' \ '(- 1 *)'{-h,--help}'[print usage information and exit]' \
'(- 1 *)'{-v,--version}'[print the version information and exit]' \ '(- 1 *)'{-v,--version}'[print the version information and exit]' \
{-p,--propfile}'[the jmeter property file to use]:properties file:_files -g "*.properties"' \ {-p,--propfile}'[the jmeter property file to use]:properties file:_files -g "*.properties"' \
@ -24,21 +22,27 @@ _arguments \
{-t,--testfile}'[the jmeter test plan file to run]:JMeter test plan file:_files -g "*.jmx"' \ {-t,--testfile}'[the jmeter test plan file to run]:JMeter test plan file:_files -g "*.jmx"' \
{-j,--jmeterlogfile}'[the jmeter log file]: :_files -g "*.log"' \ {-j,--jmeterlogfile}'[the jmeter log file]: :_files -g "*.log"' \
{-l,--logfile}'[the file to log samples to]: :_files -g "*.jtl"' \ {-l,--logfile}'[the file to log samples to]: :_files -g "*.jtl"' \
{-i,--jmeterlogconf}'[jmeter logging configuration file]: :_files -g "*.xml"' \
{-n,--nongui}'[run JMeter in nongui mode]' \ {-n,--nongui}'[run JMeter in nongui mode]' \
{-s,--server}'[run the JMeter server]' \ {-s,--server}'[run the JMeter server]' \
{-H,--proxyHost}'[set a proxy server for JMeter to use]: :_hosts' \ {-H,--proxyHost}'[set a proxy server for JMeter to use]: :_hosts' \
{-P,--proxyPort}'[set proxy server port for JMeter to use]:number' \ {-P,--proxyPort}'[set proxy server port for JMeter to use]:number' \
{-N,--nonProxyHosts}'[set non proxy host list]:host' \
{-u,--username}'[set username for proxy server that JMeter is to use]:username:_users' \ {-u,--username}'[set username for proxy server that JMeter is to use]:username:_users' \
{-a,--password}'[set password for proxy server that JMeter is to use]:password' \ {-a,--password}'[set password for proxy server that JMeter is to use]:password' \
{-J-,--jmeterproperty}'[define additional JMeter properties]:argument=value' \ {-J-,--jmeterproperty}'[define additional JMeter properties]:argument=value' \
{-G-,--globalproperty}'[define Global properties (sent to servers)]:argument=value' \ {-G-,--globalproperty}'[define Global properties (sent to servers)]:argument=value' \
{-D-,--systemproperty}'[define additional System properties]:argument=value' \ {-D-,--systemproperty}'[define additional System properties]:argument=value' \
{-S,--systemPropertyFile}'[a property file to be added as System properties]:properties file:_files -g "*.properties"' \ {-S,--systemPropertyFile}'[a property file to be added as System properties]:properties file:_files -g "*.properties"' \
{-f,--forceDeleteResultFile}'[force delete existing results files and web report folder]' \
{-L,--loglevel}'[define loglevel]:[category=]level' \ {-L,--loglevel}'[define loglevel]:[category=]level' \
{-r,--runremote}'[start remote servers (as defined by the jmeter property remote_hosts)]' \ {-r,--runremote}'[start remote servers (as defined by the jmeter property remote_hosts)]' \
{-R,--remotestart}'[start these remote servers (overrides remote_hosts)]:remote servers list' \ {-R,--remotestart}'[start these remote servers (overrides remote_hosts)]:remote servers list' \
{-d,--homedir}'[the JMeter home directory to use]: :_files -/' \ {-d,--homedir}'[the JMeter home directory to use]: :_files -/' \
{-X,--remoteexit}'[exit the remote servers at end of test (non-GUI)]' {-X,--remoteexit}'[exit the remote servers at end of test (non-GUI)]' \
{-g,--reportonly}'[generate report dashboard only, from a test results file]: :_files' \
{-e,--reportatendofloadtests}'[generate report dashboard after load test]' \
{-o,--reportoutputfolder}'[output folder for report dashboard]: :_files -/'
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -4,7 +4,7 @@
# ----------- # -----------
# #
# Completion script for jmeter-plugins command line tool 0.4.2 # Completion script for jmeter-plugins command line tool 0.4.2
# (http://code.google.com/p/jmeter-plugins). # (https://jmeter-plugins.org/).
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors

Some files were not shown because too many files have changed in this diff Show More