aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/_age39
-rw-r--r--src/_bundle637
-rw-r--r--src/_concourse1931
-rw-r--r--src/_console72
-rw-r--r--src/_emacs149
-rw-r--r--src/_emacsclient66
-rw-r--r--src/_emulator371
-rw-r--r--src/_fleetctl123
-rw-r--r--src/_flutter1
-rw-r--r--src/_git-pulls2
-rw-r--r--src/_google94
-rw-r--r--src/_jmeter6
-rw-r--r--src/_knife324
-rw-r--r--src/_l3build91
-rw-r--r--src/_mussh42
-rw-r--r--src/_networkQuality4
-rw-r--r--src/_node360
-rw-r--r--src/_openssl3658
-rw-r--r--src/_pgsql_utils590
-rw-r--r--src/_phing45
-rw-r--r--src/_play190
-rw-r--r--src/_rkt369
-rw-r--r--src/_rslsync41
-rw-r--r--src/_rsvm88
-rw-r--r--src/_screencapture2
-rw-r--r--src/_sfdx935
-rw-r--r--src/_stack134
-rw-r--r--src/_supervisorctl237
-rw-r--r--src/_supervisord245
-rw-r--r--src/_svm204
-rw-r--r--src/_textutil8
-rw-r--r--src/_tsx58
-rw-r--r--src/_zcash-cli273
33 files changed, 4496 insertions, 6893 deletions
diff --git a/src/_age b/src/_age
index c30291f..c30377d 100644
--- a/src/_age
+++ b/src/_age
@@ -1,9 +1,9 @@
-#compdef age
+#compdef age age-keygen
# ------------------------------------------------------------------------------
# Description
# -----------
#
-# Completion script for age 1.1.1 (https://github.com/FiloSottile/age).
+# Completion script for age 1.2.1 (https://github.com/FiloSottile/age).
#
# ------------------------------------------------------------------------------
# Authors
@@ -13,19 +13,28 @@
#
# ------------------------------------------------------------------------------
-_arguments \
- -A '-*' \
- '(- *)'{-h,--help}'[show help message and exit]' \
- '(-e --encrypt -d --decrypt)'{-e,--encrypt}'[Encrypt INPUT to OUTPUT]' \
- '(-e --encrypt -d --decrypt -a --armor -p --passphrase -r --recipient -R --recipients-file)'{-d,--decrypt}'[Decrypt INPUT to OUTPUT]' \
- \*{-i,--identity=}'[Encrypt/Decrypt using the identities at PATH]:IDENTITY:_files' \
- '(-o --output)'{-o,--output=}'[Write encrypted/decrypted file to OUTPUT]:OUTPUT:_files' \
- '(-j --plugin)'{-j,--plugin=}'[Encrypt/Decrypt using the data-less PLUGIN]:PLUGIN:' \
- '(-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' \
- '(-a --armor -d --decrypt)'{-a,--armor}'[Encrypt to an ASCII-only "armored" encoding]' \
- '(-p --passphrase -d --decrypt)'{-p,--passphrase}'[Encrypt with a passphrase]' \
- :INPUT:_files
+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
diff --git a/src/_bundle b/src/_bundle
index 0122fd2..da25c8e 100644
--- a/src/_bundle
+++ b/src/_bundle
@@ -28,7 +28,7 @@
# Description
# -----------
#
-# Completion script for Bundler 2.7.0 (https://bundler.io/).
+# Completion script for Bundler 4.0.0 (https://bundler.io/).
#
# ------------------------------------------------------------------------------
# Authors
@@ -39,7 +39,273 @@
#
# ------------------------------------------------------------------------------
-local curcontext="$curcontext" state line ret=1
+_bundle() {
+ typeset -A opt_args
+ local context state line
+ local curcontext="$curcontext"
+
+ local ret=1
+
+ _arguments -C -A "-v" -A "--version" \
+ '(- 1 *)'{-v,--version}'[display version information]' \
+ '(-r --retry)'{-r,--retry}'[specify the number of times you with to attempt network commands]:number:' \
+ '(-v --verbose)'{-V,--verbose}'[print out additional logging information]' \
+ '--no-color[print all output without color]' \
+ '1: :_bundle_commands' \
+ '*:: :->args' && ret=0
+
+ case $state in
+ (args)
+ case $words[1] in
+ (help)
+ _arguments \
+ '1: :_bundle_commands' \
+ && ret=0
+ ;;
+ (install)
+ local -a policies=('HighSecurity' 'MediumSecurity' 'LowSecurity' 'AlmostNoSecurity' 'NoSecurity')
+ _arguments \
+ '(- *)'{-h,--help}'[show help message]' \
+ '(--force --redownload)'{--force,--redownload}'[force reinstalling every gem]' \
+ '--full-index[download and cache the index file of all gems]' \
+ '--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \
+ '(-j --jobs)'{-j,--jobs}'[the maximum number of parallel download and install jobs]:number' \
+ '--local[do not attempt to connect to rubygems.org]' \
+ '--lockfile=[location of the lockfile which Bundler should use]:path:_files' \
+ '--prefer-local[force using locally installed gems]' \
+ '--no-cache[do not update the cache in vendor/cache with newly installed gems]' \
+ '--no-lock[do not create a lockfile]' \
+ '--quiet[only output warnings and errors]' \
+ '--retry=[retry number when network or git requests failed]:number' \
+ '--standalone=-[create standalone bundles]:groups:_bundle_groups' \
+ "--trust-policy=-[apply the Rubygems security policy]:arg:($policies)" \
+ && ret=0
+ ;;
+ (update)
+ _arguments \
+ '(- *)'{-h,--help}'[show help message]' \
+ '--all[update all gems specified in Gemfile]' \
+ \*{--group,-g}=-'[only update the gems in the specified group]' \
+ '--source=-[the name of a source used in the Gemfile]:url' \
+ '--local[do not attempt to fetch gems remotely and use the gem cached instead]' \
+ '--ruby[update the locked version of Ruby to the current version of Ruby]' \
+ '--bundler[update the locked version of bundler to invoked bundler version]' \
+ '(--force --redownload)'{--force,--redownload}'[force reinstalling every gem]' \
+ '--full-index[fall back to using the single-file index of all gems]' \
+ '(-j --jobs)'{-j,--jobs}'[specify the number of jobs to run in parallel]:number' \
+ '--retry=-[retry failed network or git requests for number times]:number' \
+ '--quiet[only output warnings and errors]' \
+ '--patch[prefer updating only to next patch version]' \
+ '--minor[prefer updating only to next minor version]' \
+ '--major[prefer updating only to next major version (default)]' \
+ '--pre[always choose the highest allowed version]' \
+ '--strict[do not allow any gem to be updated past latest --patch | --minor | --major]' \
+ '--conservative[use bundle install conservative update behavior]' \
+ '*:: :_bundle_gems' \
+ && ret=0
+ ;;
+ (cache)
+ _arguments \
+ '(- *)'{-h,--help}'[show help message]' \
+ '--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 -/' \
+ '--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \
+ "--no-install[don't install the gems, only update the cache]" \
+ '--quite[only output warnings and errors]' \
+ && ret=0
+ ;;
+ (exec)
+ _arguments \
+ '(- *)'{-h,--help}'[show help message]' \
+ '--gemfile=[use the specified gemfile instead of Gemfile]' \
+ '*:: :_normal' \
+ && ret=0
+ ;;
+ (config)
+ _arguments \
+ '(- *)'{-h,--help}'[show help message]' \
+ '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
+}
_bundle_commands() {
local -a commands=(
@@ -58,13 +324,14 @@ _bundle_commands() {
"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"
- "viz:Generate a visual representation of 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 "$@"
@@ -85,8 +352,7 @@ _bundle_groups() {
}
_bundle_config_subcommands() {
- local subcommands;
- 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"
@@ -95,261 +361,118 @@ _bundle_config_subcommands() {
_describe -t subcommands 'subcommand' subcommands "$@"
}
-_arguments -C -A "-v" -A "--version" \
- '(- 1 *)'{-v,--version}'[display version information]' \
- '(-r --retry)'{-r,--retry}'[specify the number of times you with to attempt network commands]:number:' \
- '(-v --verbose)'{-V,--verbose}'[print out additional logging information]' \
- '--no-color[print all output without color]' \
- '1: :_bundle_commands' \
- '*:: :->args' && ret=0
+_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
- args)
- case $words[1] in
- help)
- local -a commands=('install' 'update' 'cache' 'exec' 'config' 'help' 'add' 'binstubs'
- 'check' 'show' 'outdated' 'console' 'open' 'list' 'lock' 'lock' 'viz' 'init'
- 'gem' 'platform' 'clean' 'doctor' 'remove')
- _arguments -C \
- '1: :($commands)' \
- && ret=0
- ;;
- install)
- local -a policies=('HighSecurity' 'MediumSecurity' 'LowSecurity' 'AlmostNoSecurity' 'NoSecurity')
- _arguments \
- '--binstubs=-[generate bin stubs for bundled gems to ./bin]:directory:_files -/' \
- '--clean[remove any gems not present in the current Gemfile]' \
- '--deployment[install using defaults tuned for deployment environments]' \
- '--redownload[force download every gem, even if the required versions are already available locally]' \
- '--frozen[do not allow the Gemfile.lock to be updated after this install]' \
- '--full-index[download and cache the index file of all gems]' \
- '--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \
- '(-j --jobs)'{-j,--jobs}'[the maximum number of parallel download and install jobs]:number' \
- '--local[do not attempt to connect to rubygems.org]' \
- '--no-cache[do not update the cache in vendor/cache with newly installed gems]' \
- '--no-prune[do not remove stale gem from cache after installation]' \
- '--path=-[specify a different path than the system default]:path:_files' \
- '--quiet[only output warnings and errors]' \
- '--shebang=-[specify ruby executable to execute scripts]:ruby:_files' \
- '--standalone=-[create standalone bundles]:groups:_bundle_groups' \
- '--system[install to the system location]' \
- "--trust-policy=-[apply the Rubygems security policy]:arg:($policies)" \
- '--with=-[include gems that are part of the specified named group]:groups:_bundle_groups' \
- '--without=-[exclude gems that are part of the specified named group]:groups:_bundle_groups' \
- && ret=0
- ;;
- update)
- _arguments \
- '--all[update all gems specified in Gemfile]' \
- \*{--group,-g}=-'[only update the gems in the specified group]' \
- '--source=-[the name of a source used in the Gemfile]:url' \
- '--local[do not attempt to fetch gems remotely and use the gem cached instead]' \
- '--ruby[update the locked version of Ruby to the current version of Ruby]' \
- '--bundler[update the locked version of bundler to invoked bundler version]' \
- '--full-index[fall back to using the single-file index of all gems]' \
- '(-j --jobs)'{-j,--jobs}'[specify the number of jobs to run in parallel]:number' \
- '--retry=-[retry failed network or git requests for number times]:number' \
- '--quiet[only output warnings and errors]' \
- '--redownload[force download every gem, even if the required versions are already available locally]' \
- '--patch[prefer updating only to next patch version]' \
- '--minor[prefer updating only to next minor version]' \
- '--major[prefer updating only to next major version (default)]' \
- '--strict[do not allow any gem to be updated past latest --patch | --minor | --major]' \
- '--conservative[use bundle install conservative update behavior]' \
- '*:: :_bundle_gems' \
- && ret=0
- ;;
- cache)
- _arguments \
- '--all[include all sources]' \
- '--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 -/' \
- '--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \
- "--no-install[don't install the gems, only update the cache]" \
- "--no-prune[don't remove stale gems from the cache]" \
- '--path=-[specify a different path than the system default($BUNDLE_PATH or $GEM_HOME)]: :_files' \
- '--quite[only output warnings and errors]' \
- '--frozen[do not allow the Gemfile.lock to be updated after this bundle cache operation]' \
- '--no-color[disable colorization in output]' \
- '(-r --retry)'{-r,--retry}=-'[specify the number of times you with to attempt network commands]:nums' \
- '(-V --verbose)'{-v,--verbose}'[enable verbose output mode]' \
- && ret=0
- ;;
- exec)
- _arguments \
- '--keep-file-descriptors[exec will revert to the 1.9 behavior of passing all file descriptors to the new process]' \
- '*:: :_normal' \
- && ret=0
- ;;
- config)
- _arguments -C \
- '1: :_bundle_config_subcommands' \
- '--local[use local configuration]' \
- '--global[use global configuration]' \
- && ret=0
- ;;
- add)
- _arguments \
- '(-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 starndard 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 \
- '--force[overwrite existing binstubs if they exist]' \
- '--path=-[the location to install the specified binstubs to]: :_files -/' \
- '--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]' \
- '1::gem:' \
- && ret=0
- ;;
- check)
- _arguments \
- '--dry-run[locks the Gemfile before running the command]' \
- '--gemfile=-[use the specified gemfile instead of the Gemfile]: :_files' \
- '--path=-[specify a different path than the system default($BUNDLE_PATH or $GEM_HOME)]: :_files -/' \
- && ret=0
- ;;
- show)
- _arguments \
- '--paths[list the paths of all gems that are required by your Gemfile]' \
- '1:: :_bundle_gems' \
- && ret=0
- ;;
- outdated)
- _arguments \
- '--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]' \
- '--strict[only list newer versions allowed by your Gemfile requirements]' \
- {--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 \
- '--no-color[disable colorization in output]' \
- '(-r --retry)'{-r,--retry}=-'[specify the number of times you with to attempt network commands]:num' \
- '(-v --verbose)'{-v,--verbose}=-'[enable verbose output mode]' \
- '1:: :_bundle_groups' \
- && ret=0
- ;;
- open)
- _arguments \
- '1:: :_bundle_gems' \
- && ret=0
- ;;
- list)
- _arguments \
- '--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' \
- && ret=0
- ;;
- lock)
- _arguments \
- '--update=-[ignores the existing lockfile]' \
- '--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]' \
- '--add-platform=-[add a new platform to the lockfile, re-resolving for the addition of that platform]' \
- '--remove-platform=-[remove a platform from the lockfile]' \
- '--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)]' \
- '--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
- ;;
- viz)
- _arguments \
- '(-f --file)'{-f,--file}=-'[the name to use for the generated file]: :_files' \
- '(-F --format)'{-F,--format}=-'[output format option]: :(png jpg svg dot)' \
- '(-R --requirements)'{-r,--requirements}'[set to show the version of each required dependency]' \
- '(-v --version)'{-v,--version}'[set to show each version]' \
- '(-W --without)'{-W,--without}'[exclude gems that are part of the specified named group]' \
- && ret=0
- ;;
- init)
- _arguments \
- '--gemspec=-[use the specified .gemspec to create the Gemfile]: :_files' \
- '--gemfile=[use the specified name for the gamfile instead of Gemfile]:name' \
- && ret=0
- ;;
- gem)
- _arguments \
- '(--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]' \
- '(--no-ext --ext)--ext=[add boilerplate for C or Rust extension code to the generated project]: :(c rust)' \
- '(--ext --no-ext)--no-ext[do not add extension code]' \
- '(--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]: :(github travis gitlab circle)' \
- '(--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]' \
- '1::gem_name:' \
- && ret=0
- ;;
- platform)
- _arguments \
- '--ruby[it will display the ruby directive information]' \
- && ret=0
- ;;
- clean)
- _arguments \
- '--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)
- _arguments \
- '--quiet[only output warnings and errors]' \
- '--gemfile=-[the location of the Gemfile which Bundler should use]: :_files' \
- && ret=0
- ;;
- remove)
- _arguments \
- '--install[runs bundle install after the given gem have been removed from the Gemfile]' \
- '*:: :_bundle_gems' \
- && ret=0
- ;;
- esac
+ 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
+ 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 "$@"
+}
-return ret
+_bundle "$@"
# Local Variables:
# mode: Shell-Script
diff --git a/src/_concourse b/src/_concourse
index 4d0cbc6..31affcd 100644
--- a/src/_concourse
+++ b/src/_concourse
@@ -1,4 +1,4 @@
-#compdef concourse fly
+#compdef concourse
# ------------------------------------------------------------------------------
# Description
# -----------
@@ -13,1361 +13,699 @@
#
# ------------------------------------------------------------------------------
-local _concourse_fly_target \
- _concourse_fly_pipeline \
- _concourse_fly_pipeline_config \
- _concourse_fly_job \
- _concourse_fly_resource \
- _concourse_fly_resource_type
-
-(( $+functions[_concourse_fly] )) ||
-_concourse_fly() {
-
+(( $+functions[_concourse_server] )) ||
+_concourse_server() {
local context state state_descr line ret=1
typeset -A opt_args
+ local -a concourse_postgres_configurations=(
+ '--postgres-host=[the host to connect to]: :_hosts'
+ '--postgres-port=[the port to connect to]: :_concourse_ports'
+ '--postgres-socket=[path to a UNIX domain socket to connect to]: :_files'
+ '--postgres-user=[the user to sign in as]: :_users'
+ "--postgres-password=[the user's password]:password"
+ '--postgres-sslmode=[whether or not to use SSL(default: disable)]:SSL mode:(disable require verify-ca verify-full)'
+ '--postgres-sslnegotiation=[how SSL encryption is negotiated with the server(default: postgres)]: :(postgres direct)'
+ '--postgres-ca-cert=[CA cert file location, to verify when connecting with SSL]: :_files'
+ '--postgres-client-cert=[client cert file location]: :_files'
+ '--postgres-client-key=[client key file location]: :_files'
+ '--postgres-connect-timeout=[dialing timeout]: :_concourse_durations'
+ '--postgres-database=[the name of the database to use(default: atc)]:database name'
+ )
+
_arguments -C \
'(- : *)'{-h,--help}'[display help information]' \
- '(- : *)'{-v,--version}'[print the version of Fly and exit]' \
- {-t,--target=}'[concourse target name]: :_concourse_fly_targets' \
- --verbose'[print API requests and responses]' \
- --print-table-headers'[print table headers even for redirected output]' \
+ '(- : *)'{-v,--version}'[print the version of Concourse and exit]' \
'(-): :->command' \
'(-)*:: :->arguments' \
&& ret=0
case $state in
(command)
- _concourse_fly_commands
- ;;
+ _concourse_commands && ret=0
+ ;;
(arguments)
- curcontext=${curcontext%:*:*}:concourse-fly-$words[1]:
- if (( $+functions[_concourse_fly_${words[1]}_args] )); then
- _concourse_fly_target=${(v)opt_args[(i)-t|--target]}
- _concourse_fly_${words[1]}_args && ret=0
+ curcontext=${curcontext%:*:*}:concourse-$words[1]:
+
+ if [[ $words[1] == "quickstart" || $words[1] == "web" ]]; then
+ _concourse_quickstart_or_web "${words[1]}" && ret=0
else
- _message "unknown command ${words[1]}" && ret=1
+ if (( $+functions[_concourse_${words[1]}] )); then
+ _concourse_${words[1]} && ret=0
+ else
+ _message "unknown command ${words[1]}" && ret=1
+ fi
fi
- ;;
+ ;;
esac
return ret
}
-(( $+functions[_concourse_fly_commands] )) ||
-_concourse_fly_commands() {
+(( $+functions[_concourse_commands] )) ||
+_concourse_commands() {
local commands=(
- {ab,abort-build}":abort a build"
- {bs,builds}":list builds data"
- {cr,check-resource}":check a resource"
- {crt,check-resource-type}":check a resource-type"
- {cl,checklist}":print a Checkfile of the given pipeline"
- {ctc,clear-task-cache}":clears cache from a task container"
- {cs,containers}":print the active containers"
- {c,curl}":curl the api"
- {dtg,delete-target}":delete target"
- {dp,destroy-pipeline}":destroy a pipeline"
- {dt,destroy-team}":destroy a team and delete all of its data"
- {etg,edit-target}":edit a target"
- {e,execute}":execute a one-off build using local bits"
- {ep,expose-pipeline}":make a pipeline publicly viewable"
- {fp,format-pipeline}":format a pipeline config"
- {gp,get-pipeline}":get a pipeline's current configuration"
- {gt,get-team}":show team configuration"
- "help:print help message"
- {hp,hide-pipeline}":hide a pipeline from the public"
- {i,intercept,hijack}":execute a command in a container"
- {js,jobs}":list the jobs in the pipelines"
- {lw,land-worker}":land a worker"
- {l,login}":authenticate with the target"
- {o,logout}":release authentication with the target"
- {op,order-pipelines}":orders pipelines"
- {pj,pause-job}":pause a job"
- {pp,pause-pipeline}":pause a pipeline"
- {ps,pipelines}":list the configured pipelines"
- {pw,prune-worker}":prune a stalled, landing, landed, or retiring worker"
- {rp,rename-pipeline}":rename a pipeline"
- {rt,rename-team}":rename a team"
- {rvs,resource-versions}":list the versions of a resource"
- {rs,resources}":list the resources in the pipeline"
- {sp,set-pipeline}":create or update a pipeline's configuration"
- {st,set-team}":create or modify a team to have the given credentials"
- "status:login status"
- {s,sync}":download and replace the current fly from the target"
- {ts,targets}":list saved targets"
- {t,teams}":list the configured teams"
- {tj,trigger-job}":start a job in a pipeline"
- {uj,unpause-job}":unpause a job"
- {up,unpause-pipeline}":un-pause a pipeline"
- "userinfo:user information"
- {vp,validate-pipeline}":validate a pipeline config"
- {vs,volumes}":list the active volumes"
- {w,watch}":stream a build's output"
- {ws,workers}":list the registered workers"
+ "generate-key:generate RSA key for use with Concourse components"
+ "land-worker:safely drain a worker's assignments for temporary downtime"
+ "migrate:run database migrations"
+ "quickstart:run both 'web' and 'worker' together, auto-wired"
+ "retire-worker:safely remove a worker from the cluster permanently"
+ "web:run the web UI and build scheduler"
+ "worker:run and register a worker"
)
_describe -t commands commands commands
}
-(( $+functions[_concourse_fly_ab_args] )) ||
-_concourse_fly_ab_args() {
- _concourse_fly_abort-build_args
-}
-
-(( $+functions[_concourse_fly_bs_args] )) ||
-_concourse_fly_bs_args() {
- _concourse_fly_builds_args
-}
-
-(( $+functions[_concourse_fly_cl_args] )) ||
-_concourse_fly_cl_args() {
- _concourse_fly_checklist_args
-}
-
-(( $+functions[_concourse_fly_cr_args] )) ||
-_concourse_fly_cr_args() {
- _concourse_fly_check-resource_args
-}
-
-(( $+functions[_concourse_fly_crt_args] )) ||
-_concourse_fly_crt_args() {
- _concourse_fly_check-resource-type_args
-}
-
-(( $+functions[_concourse_fly_ctc_args] )) ||
-_concourse_fly_ctc_args() {
- _concourse_fly_clear-task-cache_args
-}
-
-(( $+functions[_concourse_fly_cs_args] )) ||
-_concourse_fly_cs_args() {
- _concourse_fly_containers_args
-}
-
-(( $+functions[_concourse_fly_c_args] )) ||
-_concourse_fly_c_args() {
- _concourse_fly_curl_args
-}
-
-(( $+functions[_concourse_fly_dtg_args] )) ||
-_concourse_fly_dtg_args() {
- _concourse_fly_delete-target_args
-}
-
-(( $+functions[_concourse_fly_dp_args] )) ||
-_concourse_fly_dp_args() {
- _concourse_fly_destroy-pipeline_args
-}
-
-(( $+functions[_concourse_fly_dt_args] )) ||
-_concourse_fly_dt_args() {
- _concourse_fly_destroy-team_args
-}
-
-(( $+functions[_concourse_fly_etg_args] )) ||
-_concourse_fly_etg_args() {
- _concourse_fly_edit-target_args
-}
-
-(( $+functions[_concourse_fly_e_args] )) ||
-_concourse_fly_e_args() {
- _concourse_fly_execute_args
-}
-
-(( $+functions[_concourse_fly_ep_args] )) ||
-_concourse_fly_ep_args() {
- _concourse_fly_expose-pipeline_args
-}
-
-(( $+functions[_concourse_fly_fp_args] )) ||
-_concourse_fly_fp_args() {
- _concourse_fly_format-pipeline_args
-}
-
-(( $+functions[_concourse_fly_gp_args] )) ||
-_concourse_fly_gp_args() {
- _concourse_fly_get-pipeline_args
-}
-
-(( $+functions[_concourse_fly_gt_args] )) ||
-_concourse_fly_gt_args() {
- _concourse_fly_get-team_args
-}
-
-(( $+functions[_concourse_fly_hp_args] )) ||
-_concourse_fly_hp_args() {
- _concourse_fly_hide-pipeline_args
-}
-
-(( $+functions[_concourse_fly_hijack_args] )) ||
-_concourse_fly_hijack_args() {
- _concourse_fly_intercept_args
-}
-
-(( $+functions[_concourse_fly_i_args] )) ||
-_concourse_fly_i_args() {
- _concourse_fly_intercept_args
-}
-
-(( $+functions[_concourse_fly_js_args] )) ||
-_concourse_fly_js_args() {
- _concourse_fly_jobs_args
-}
-
-(( $+functions[_concourse_fly_lw_args] )) ||
-_concourse_fly_lw_args() {
- _concourse_fly_land-worker_args
-}
-
-(( $+functions[_concourse_fly_l_args] )) ||
-_concourse_fly_l_args() {
- _concourse_fly_login_args
-}
-
-(( $+functions[_concourse_fly_o_args] )) ||
-_concourse_fly_o_args() {
- _concourse_fly_logout_args
-}
-
-(( $+functions[_concourse_fly_op_args] )) ||
-_concourse_fly_op_args() {
- _concourse_fly_order-pipelines_args
-}
-
-(( $+functions[_concourse_fly_pj_args] )) ||
-_concourse_fly_pj_args() {
- _concourse_fly_pause-job_args
-}
-
-(( $+functions[_concourse_fly_pp_args] )) ||
-_concourse_fly_pp_args() {
- _concourse_fly_pause-pipeline_args
-}
-
-(( $+functions[_concourse_fly_ps_args] )) ||
-_concourse_fly_ps_args() {
- _concourse_fly_pipelines_args
-}
-
-(( $+functions[_concourse_fly_pw_args] )) ||
-_concourse_fly_pw_args() {
- _concourse_fly_prune-worker_args
-}
-
-(( $+functions[_concourse_fly_rp_args] )) ||
-_concourse_fly_rp_args() {
- _concourse_fly_rename-pipeline_args
-}
-
-(( $+functions[_concourse_fly_rt_args] )) ||
-_concourse_fly_rt_args() {
- _concourse_fly_rename-team_args
-}
-
-(( $+functions[_concourse_fly_rs_args] )) ||
-_concourse_fly_rs_args() {
- _concourse_fly_resources_args
-}
-
-(( $+functions[_concourse_fly_rvs_args] )) ||
-_concourse_fly_rvs_args() {
- _concourse_fly_resource-versions_args
-}
-
-(( $+functions[_concourse_fly_sp_args] )) ||
-_concourse_fly_sp_args() {
- _concourse_fly_set-pipeline_args
-}
-
-(( $+functions[_concourse_fly_st_args] )) ||
-_concourse_fly_st_args() {
- _concourse_fly_set-team_args
-}
-
-(( $+functions[_concourse_fly_s_args] )) ||
-_concourse_fly_s_args() {
- _concourse_fly_sync_args
-}
-
-(( $+functions[_concourse_fly_ts_args] )) ||
-_concourse_fly_ts_args() {
- _concourse_fly_targets_args
-}
-
-(( $+functions[_concourse_fly_t_args] )) ||
-_concourse_fly_t_args() {
- _concourse_fly_teams_args
-}
-
-(( $+functions[_concourse_fly_tj_args] )) ||
-_concourse_fly_tj_args() {
- _concourse_fly_trigger-job_args
-}
-
-(( $+functions[_concourse_fly_uj_args] )) ||
-_concourse_fly_uj_args() {
- _concourse_fly_unpause-job_args
-}
-
-(( $+functions[_concourse_fly_up_args] )) ||
-_concourse_fly_up_args() {
- _concourse_fly_unpause-pipeline_args
-}
-
-(( $+functions[_concourse_fly_vp_args] )) ||
-_concourse_fly_vp_args() {
- _concourse_fly_validate-pipeline_args
-}
-
-(( $+functions[_concourse_fly_vs_args] )) ||
-_concourse_fly_vs_args() {
- _concourse_fly_volumes_args
-}
-
-(( $+functions[_concourse_fly_w_args] )) ||
-_concourse_fly_w_args() {
- _concourse_fly_watch_args
-}
-
-(( $+functions[_concourse_fly_ws_args] )) ||
-_concourse_fly_ws_args() {
- _concourse_fly_workers_args
-}
-
-(( $+functions[_concourse_fly_help_args] )) ||
-_concourse_fly_help_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]'
-}
-
-(( $+functions[_concourse_fly_status_args] )) ||
-_concourse_fly_status_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]'
-}
-
-(( $+functions[_concourse_fly_userinfo_args] )) ||
-_concourse_fly_userinfo_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '--json[print command result as JSON]'
-}
-
-(( $+functions[_concourse_fly_abort-build_args] )) ||
-_concourse_fly_abort-build_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-j --job)'{-j,--job=}'[name of a job to cancel]: :_concourse_fly_pipeline_slash_jobs' \
- '(-b --build)'{-b,--build=}'[job build number to cancel, or build id]: :_concourse_fly_builds'
-}
-
-(( $+functions[_concourse_fly_builds_args] )) ||
-_concourse_fly_builds_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-a --all-teams)'{-a,--all-teams}'[show builds for the all teams that user has access to]' \
- '(-c --count)'{-c,--count=}'[number of builds you want to limit the return to]: :number' \
- '--current-team[show builds for the currently targeted team]' \
- '(-j --job -p --pipeline)'{-j,--job=}'[name of a job to get builds for]: :_concourse_fly_pipeline_slash_jobs' \
- '--json[print command result as JSON]' \
- '(-j --job -p --pipeline)'{-p,--pipeline=}'[name of a pipeline to get builds for]: :_concourse_fly_pipelines' \
- '--since=[start of the range to filter builds]: :_concourse_fly_dates' \
- '--until=[end of the range to filter builds]: :_concourse_fly_dates'
-}
-
-(( $+functions[_concourse_fly_checklist_args] )) ||
-_concourse_fly_checklist_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-p --pipeline)'{-p,--pipeline=}'[the pipeline from which to generate the Checkfile]: :_concourse_fly_pipelines'
-}
-
-(( $+functions[_concourse_fly_check-resource_args] )) ||
-_concourse_fly_check-resource_args() {
-
- local context state state_descr line ret=1
- typeset -A opt_args
-
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-r --resource)'{-r,--resource=}'[name of a resource to check]: :_concourse_fly_pipeline_slash_resources' \
- '(-f --from)'{-f,--from=}'[version of the resource to check from]: :->version' \
- && ret=0
-
- case $state in
- (version)
- _concourse_fly_resource=${(v)opt_args[(i)-r|--resource]}
- _concourse_fly_pipeline_resource_versions && ret=0
- ;;
- esac
-
- return ret
-}
-
-(( $+functions[_concourse_fly_check-resource-type_args] )) ||
-_concourse_fly_check-resource-type_args() {
-
- local context state state_descr line ret=1
- typeset -A opt_args
-
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-r --resource-type)'{-r,--resource-type=}'[name of a resource type to check]: :_concourse_fly_pipeline_slash_resource_types' \
- '(-f --from)'{-f,--from=}'[version of the resource type to check from]: :->version' \
- && ret=0
-
- case $state in
- (version)
- _concourse_fly_resource_type=${(v)opt_args[(i)-r|--resource-type]}
- _concourse_fly_pipeline_resource_type_versions && ret=0
- ;;
- esac
-
- return ret
-}
-
-(( $+functions[_concourse_fly_clear-task-cache_args] )) ||
-_concourse_fly_clear-task-cache_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-j --job)'{-j,--job=}'[name of a job to cancel]: :_concourse_fly_pipeline_slash_jobs' \
- '(-s --step)'{-s,--step=}'[step name to clear cache from]:task step' \
- '(-c --cache-path)'{-c,--cache-path=}'[cache directory to clear out]: :_files -/' \
- '(-n --non-interactive)'{-n,--non-interactive=}'[destroy the task cache(s) without confirmation]'
-}
-
-(( $+functions[_concourse_fly_containers_args] )) ||
-_concourse_fly_containers_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '--json[print command result as JSON]'
-}
-
-(( $+functions[_concourse_fly_curl_args] )) ||
-_concourse_fly_curl_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '--print-and-exit[print curl command and exit]'
-}
-
-(( $+functions[_concourse_fly_delete-target_args] )) ||
-_concourse_fly_delete-target_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-a --all)'{-a,--all}'[delete all targets]'
-}
-
-(( $+functions[_concourse_fly_destroy-pipeline_args] )) ||
-_concourse_fly_destroy-pipeline_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-p --pipeline)'{-p,--pipeline=}'[the pipeline to destroy]: :_concourse_fly_pipelines' \
- '(-n --non-interactive)'{-n,--non-interactive}'[destroy the pipeline without confirmation]'
-}
-
-(( $+functions[_concourse_fly_destroy-team_args] )) ||
-_concourse_fly_destroy-team_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-n --team-name)'{-n,--team-name=}'[the team to delete]: :_concourse_fly_teams' \
- '(-n --non-interactive)'{-n,--non-interactive}'[force apply configuration]'
-}
-
-(( $+functions[_concourse_fly_edit-target_args] )) ||
-_concourse_fly_edit-target_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '--target-name=[update target name]: :_concourse_fly_targets' \
- '(-u --concourse-url)'{-u,--concourse-url=}'[update concourse URL]: :_urls' \
- '(-n --team-name)'{-n,--team-name=}'[update concourse URL]: :_concourse_fly_teams'
-}
-
-(( $+functions[_concourse_fly_execute_args] )) ||
-_concourse_fly_execute_args() {
-
- local context state state_descr line ret=1
- typeset -A opt_args
-
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-c --config)'{-c,--config=}'[the task config to execute]: :_concourse_config_files' \
- '(-p --privileged)'{-p,--privileged}'[run the task with full privileges]' \
- '--include-ignored[disregard .gitignore entries and uploads everything]' \
- '*'{-i,--input=}'[an input to provide to the task]: :->input' \
- '*'{-m,--input-mapping=}'[map a resource to a different name as task input]: :->input-mapping' \
- '(-j --inputs-from)'{-j,--inputs-from=}'[a job to base the inputs on]: :_concourse_fly_pipeline_slash_jobs' \
- '*'{-o,--output=}'[an output to fetch from the task]: :->output' \
- '--image=[image resource for the one-off build]: :_concourse_fly_images' \
- '*--tag=[a tag for a specific environment]: :_concourse_fly_tags' \
- '*'{-v,--var=}'[specify a string value to set for a variable in the pipeline]: :->var' \
- '*'{-y,--yaml-var=}'[specify a YAML value to set for a variable in the pipeline]: :->var' \
- '(-l --load-vars-from)'{-l,--load-vars-from=}'[variable flag that can be used for filling in template values in configuration from a YAML file]: :_files' \
- && ret=0
-
- _concourse_fly_pipeline_config=${(v)opt_args[(i)-c|--config]}
-
- case $state in
- (input-mapping)
- # TODO complete --input-mapping
- _message 'input mapping'
- ;;
- (input)
- _concourse_fly_input_equal_paths && ret=0
- ;;
- (output)
- _concourse_fly_output_equal_paths && ret=0
- ;;
- (var)
- _concourse_fly_var_equal_values && ret=0
- ;;
- esac
-
- return ret
-}
-
-(( $+functions[_concourse_fly_expose-pipeline_args] )) ||
-_concourse_fly_expose-pipeline_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-p --pipeline)'{-p,--pipeline=}'[pipeline to expose]: :_concourse_fly_pipelines'
-}
-
-(( $+functions[_concourse_fly_format-pipeline_args] )) ||
-_concourse_fly_format-pipeline_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-c --config)'{-c,--config=}'[pipeline configuration file]: :_concourse_config_files' \
- '(-w --write)'{-w,--write}'[do not print to stdout, overwrite the file in place]'
-}
-
-(( $+functions[_concourse_fly_get-pipeline_args] )) ||
-_concourse_fly_get-pipeline_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-p --pipeline)'{-p,--pipeline=}'[get configuration of this pipeline]: :_concourse_fly_pipelines' \
- '(-j --json)'{-j,--json}'[print config as json instead of yaml]'
-}
-
-(( $+functions[_concourse_fly_get-team_args] )) ||
-_concourse_fly_get-team_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-n --team)'{-n,--team=}'[get configuration of this team]: :_concourse_fly_teams' \
- '(-j --json)'{-j,--json}'[print config as json instead of yaml]'
-}
-
-(( $+functions[_concourse_fly_hide-pipeline_args] )) ||
-_concourse_fly_hide-pipeline_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-p --pipeline)'{-p,--pipeline=}'[pipeline to hide]: :_concourse_fly_pipelines'
-}
-
-(( $+functions[_concourse_fly_intercept_args] )) ||
-_concourse_fly_intercept_args() {
- # TODO complete --handle
- # TODO complete --check
- # TODO complete --step
- # TODO complete --step-type
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-j --job --handle -c --check -u --url)'{-j,--job=}'[name of a job to hijack]: :_concourse_fly_pipeline_slash_jobs' \
- '(-j --job --handle -c --check -u --url)--handle=[handle id of a job to hijack]:job handle' \
- '(-j --job --handle -c --check -u --url)'{-c,--check=}'[name of a resource'\''s checking container to hijack]:name' \
- '(-j --job --handle -c --check -u --url)'{-u,--url=}'[URL for the build, job, or check container to hijack]: :_urls' \
- '(-b --build)'{-b,--build=}'[build number within the job, or global build ID]: :_concourse_fly_builds' \
- '(-s --step)'{-s,--step=}'[name of step to hijack]:step' \
- '--step-type=[type of step to hijack]:step type' \
- '(-a --attempt)'{-a,--attempt=}'[attempt number of step to hijack]: :_values -s, "number" 1 2 3 4 5 6 7 8 9' \
- '(-):command name: _command_names -e' \
- '*::arguments:_normal'
-}
-
-(( $+functions[_concourse_fly_jobs_args] )) ||
-_concourse_fly_jobs_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-p --pipeline)'{-p,--pipeline=}'[get jobs in this pipeline]: :_concourse_fly_pipelines' \
- '--json[print command result as JSON]'
-}
-
-(( $+functions[_concourse_fly_land-worker_args] )) ||
-_concourse_fly_land-worker_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-w --worker)'{-w,--worker=}'[worker to land]: :_concourse_fly_workers'
-}
-
-(( $+functions[_concourse_fly_login_args] )) ||
-_concourse_fly_login_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-c --concourse-url)'{-c,--concourse-url=}'[concourse URL to authenticate with]: :_urls' \
- '(-k --insecure)'{-k,--insecure}'[skip verification of the endpoint'\''s SSL certificate]' \
- '(-u --username)'{-u,--username=}'[username for basic auth]: :_users' \
- '(-p --password)'{-p,--password=}'[password for basic auth]:password' \
- '(-n --team-name)'{-n,--team-name=}'[team to authenticate with]: :_concourse_fly_teams' \
- '--ca-cert=[path to Concourse PEM-encoded CA certificate file]: :_files -g "*.pem"' \
- '(-b --open-browser)'{-b,--open-browser}'[open browser to the auth endpoint]'
-}
-
-(( $+functions[_concourse_fly_logout_args] )) ||
-_concourse_fly_logout_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-a --all)'{-a,--all}'[logout of all targets]'
-}
-
-(( $+functions[_concourse_fly_order-pipelines_args] )) ||
-_concourse_fly_order-pipelines_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-p --pipeline)'{-p,--pipeline=}'[name of pipeline to order]: :_concourse_fly_pipelines'
-}
-
-(( $+functions[_concourse_fly_pause-job_args] )) ||
-_concourse_fly_pause-job_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-j --job)'{-j,--job=}'[name of a job to pause]: :_concourse_fly_pipeline_slash_jobs'
-}
-
-(( $+functions[_concourse_fly_pause-pipeline_args] )) ||
-_concourse_fly_pause-pipeline_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-p --pipeline)'{-p,--pipeline=}'[pipeline to pause]: :_concourse_fly_pipelines'
-}
-
-(( $+functions[_concourse_fly_pipelines_args] )) ||
-_concourse_fly_pipelines_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-a --all)'{-a,--all}'[show all pipelines]' \
- '--json[print command result as JSON]'
-}
-
-(( $+functions[_concourse_fly_prune-worker_args] )) ||
-_concourse_fly_prune-worker_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-w --worker)'{-w,--worker=}'[worker to prune]: :_concourse_fly_workers' \
- '(-a --all-stalled)'{-a,--all-stalled}'[prune all stalled workers]'
-}
-
-(( $+functions[_concourse_fly_rename-pipeline_args] )) ||
-_concourse_fly_rename-pipeline_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-o --old-name)'{-o,--old-name=}'[pipeline to rename]: :_concourse_fly_pipelines' \
- '(-n --new-name)'{-n,--new-name=}'[name to set as pipeline name]: :_concourse_fly_pipelines'
-}
-
-(( $+functions[_concourse_fly_rename-team_args] )) ||
-_concourse_fly_rename-team_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-o --old-name)'{-o,--old-name=}'[current team name]: :_concourse_fly_teams' \
- '(-n --new-name)'{-n,--new-name=}'[new team name]: :_concourse_fly_teams'
-}
-
-(( $+functions[_concourse_fly_resources_args] )) ||
-_concourse_fly_resources_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-p --pipeline)'{-p,--pipeline=}'[get resources in this pipeline]: :_concourse_fly_pipelines' \
- '--json[print command result as JSON]'
-}
-
-(( $+functions[_concourse_fly_resource-versions_args] )) ||
-_concourse_fly_resource-versions_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-c --count)'{-c,--count=}'[number of builds you want to limit the return to]:number' \
- '(-r --resource)'{-r,--resource=}'[name of a resource to get versions for]: :_concourse_fly_pipeline_slash_resources' \
- '--json[print command result as JSON]'
-}
-
-(( $+functions[_concourse_fly_set-pipeline_args] )) ||
-_concourse_fly_set-pipeline_args() {
-
- local context state state_descr line ret=1
- typeset -A opt_args
-
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-n --non-interactive)'{-n,--non-interactive}'[skips interactions, uses default values]' \
- '--no-color[disable color output]' \
- '--check-creds[validate credential variables against credential manager]' \
- '(-p --pipeline)'{-p,--pipeline=}'[pipeline to configure]: :_concourse_fly_pipelines' \
- '(-c --config)'{-c,--config=}'[pipeline configuration file]: :_concourse_config_files' \
- '*'{-v,--var=}'[specify a string value to set for a variable in the pipeline]: :->var' \
- '*'{-y,--yaml-var=}'[specify a YAML value to set for a variable in the pipeline]: :->var' \
- '(-l --load-vars-from)'{-l,--load-vars-from=}'[variable flag that can be used for filling in template values in configuration from a YAML file]: :_files' \
- && ret=0
+(( $+functions[_concourse_quickstart_or_web] )) ||
+_concourse_quickstart_or_web() {
+ local command="$1"
+ local ret=1
- _concourse_fly_pipeline_config=${(v)opt_args[(i)-c|--config]}
+ # define common variables
- case $state in
- (var)
- _concourse_fly_var_equal_values && ret=0
- ;;
- esac
+ local -a concourse_web_configurations=(
+ '--peer-address=[network address of this web node, reachable by other web nodes]: :_concourse_host_colon_ports'
+ '--log-level=[minimum level of logs to see]:level:_concourse_log_levels'
+ '--bind-ip=[IP address on which to listen for web traffic]: :_concourse_ip_addresses'
+ '--bind-port=[port on which to listen for HTTP traffic(default: 8000)]: :_concourse_ports'
+ '--tls-bind-port=[port on which to listen for HTTPS traffic]: :_concourse_ports'
+ '--tls-cert=[file containing an SSL certificate]: :_files'
+ '--tls-key=[file containing an RSA private key, used to encrypt HTTPS traffic]: :_files'
+ '--tls-ca-cert=[file containing the client CA certificate, enables mTLS]: :_files'
+ '--external-url=[URL used to reach any ATC from the outside world]: :_urls'
+ '--concurrent-request-limit=[limit the number of concurrent requests to an API endpoint]:limit'
+ '--api-max-conns=[maximum number of open connections for the api connection pool(default: 10)]:limit'
+ '--backend-max-conns=[maximum number of open connections for the backend connection pool(default: 50)]:limit'
+ '--encryption-key=[a 16 or 32 length key used to encrypt sensitive information before storing it in the database]:encryption key'
+ '--old-encryption-key=[encryption key previously used for encrypting sensitive information]:encryption key'
+ '--debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]: :_concourse_ip_addresses'
+ '--debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports'
+ '--intercept-idle-timeout=[length of time for a intercepted session to be idle before terminating]: :_concourse_durations'
+ '--component-runner-interval=[interval on which runners are kicked off for builds, locks, scans and checks]:interval:_concourse_durations'
+ '--lidar-scanner-interval[interval on which the resource scanner will run to see if new checkes need to be scheduled]:interval:_concourse_durations'
+ '--global-resource-check-timeout=[time limit on checking for new versions of resources]: :_concourse_durations'
+ '--resource-checking-interval=[interval on which to check for new versions of resources]: :_concourse_durations'
+ '--resource-type-checking-interval=[interval on which to check for new versions of resource types]: :_concourse_durations'
+ '--resource-with-webhook-checking-interval=[interval on which to check for new versions of resources that has webhook defined]:interval:_concourse_durations'
+ '--max-checks-per-second=[maximum number of checks that can be started per second]:number'
+ '--pause-pipelines-after=[number of days after which a pipeline will be automatically paused when there are no jobs]:days'
+ '--baggageclaim-response-header-timeout=[how long to wait for Baggageclaim to send the response header]: :_concourse_durations'
+ '--streaming-artifacts-compression=[compression algorithm for internal streaming(default: gzip)]:alg:(gzip zstd raw)'
+ '--streaming-size-limitation=[internal volume streaming size limitation in MB]:size'
+ '--garden-request-timeout=[how long to wait for requests to Garden to complete(default: 5m)]: :_concourse_durations'
+ '--cli-artifacts-dir=[directory containing downloadable CLI binaries]: :_files -/'
+ '--web-public-dir=[Web public/ directory to server live for local development]:dir:_files -/'
+ '--log-db-queries[log database queries]'
+ '--log-cluster-name[log cluster name]'
+ '--build-tracker-interval=[interval on which to run build tracking]: :_concourse_durations'
+ '--default-build-logs-to-retain=[default build logs to retain, 0 means all]:number'
+ '--max-build-logs-to-retain=[maximum build logs to retain, 0 means not specified]:number'
+ '--default-days-to-retain-build-logs=[default days to retain build logs. 0 means unlimited]:number'
+ '--max-days-to-retain-build-logs=[maximum days to retain build logs, 0 means not specified]:number'
+ '--job-scheduling-max-in-flight=[maximum number of jobs to be scheduling at the same time(default: 32)]:number'
+ '--default-task-cpu-limit=[default max number of cpu shares per task, 0 means unlimited]:number'
+ '--default-task-memory-limit=[default maximum memory per task, 0 means unlimited]:number'
+ '--enable-build-auditing[enable auditing for all api requests connected to builds]'
+ '--enable-container-auditing[enable auditing for all api requests connected to containers]'
+ '--enable-job-auditing[enable auditing for all api requests connected to jobs]'
+ '--enable-pipeline-auditing[enable auditing for all api requests connected to pipelines]'
+ '--enable-resource-auditing[enable auditing for all api requests connected to resources]'
+ '--enable-system-auditing[enable auditing for all api requests connected to system transactions]'
+ '--enable-team-auditing[enable auditing for all api requests connected to teams]'
+ '--enable-worker-auditing[enable auditing for all api requests connected to workers]'
+ '--enable-volume-auditing[enable auditing for all api requests connected to volumes]'
+ '--config-rbac=[customize RBAC role-action mapping]:mapping'
+ '--system-claim-key=[token claim key to use when matching system-claim-values(default: aud)]:key'
+ '--system-claim-value=[configure which token requests should be considered "system" requests(default: concourse-worker)]:value'
+ '--base-resource-type-defaults=[base resource type defaults]:type'
+ '--p2p-volume-streaming-timeout=[timeout of p2p volume streaming(default: 15m)]: :_concourse_durations'
+ '--display-user-id-per-connector=[define how to display user ID for each authentication connector]:how'
+ '--default-get-timeout=[default timeout of get steps]: :_concourse_durations'
+ '--default-put-timeout=[default timeout of put steps]: :_concourse_durations'
+ '--default-task-timeout=[default timeout of task steps]: :_concourse_durations'
+ '--num-goroutine-threshold=[when number of goroutines reaches to this threshold, then slow down current ATC]:num'
+ '--db-notification-bus-queue-size=[DB notification bus queue size(default: 10000)]:size' \
+ )
- return ret
-}
+ local -a concourse_credential_manager_configurations=(
+ # Credential Management
+ '--secret-retry-attempts=[the number of attempts secret will be retried to be fetched, in case a retriable error happens]:number'
+ '--secret-retry-interval=[the interval between secret retry retrieval attempts]: :_concourse_durations'
+ '--secret-cache-enabled[enable in-memory cache for secrets]'
+ '--secret-cache-duration=[secret values will be cached for not longer than this duration]: :_concourse_durations'
+ '--secret-cache-duration-notfound=[secret not found responses will be cached for this duration]: :_concourse_durations'
+ '--secret-cache-purge-interval=[if the cache is enabled, expired items will be removed on this internal]: :_concourse_durations'
+ # Vault Credential Management
+ '--vault-url=[vault server address used to access secrets]: :_urls'
+ '--vault-path-prefix=[path under which to namespace credential lookup]:prefix'
+ '--vault-lookup-templates=[path templates for credential lookup]: :_files'
+ '--vault-shared-path=[path under which to lookup shared credentials]:path'
+ '--vault-namespace=[Vault namespace to use for authentication and secret lookup]:namespace'
+ '--vault-login-timeout=[timeout value for Vault login(default: 60s)]: :_concourse_durations'
+ '--vault-query-timeout=[timeout value for Vault queue(default: 60s)]: :_concourse_durations'
+ '--vault-disable-srv-lookup[disable that client will lookup the host through DNS SRV lookup]'
+ '--vault-ca-cert=[path to a PEM-encoded CA cert file to use to verify the vault server SSL cert]: :_files'
+ '--vault-ca-path=[path to a directory of PEM-encoded CA cert files to verify the vault server SSL cert]: :_files -/'
+ '--vault-client-cert=[path to the client certificate for Vault authorization]: :_files'
+ '--vault-client-key=[path to the client private key for Vault authorization]: :_files'
+ '--vault-server-name=[if set, is used to set the SNI host when connecting via TLS]:server name'
+ '--vault-insecure-skip-verify[enable insecure SSL verification]'
+ '--vault-client-token=[client token for accessing secrets within the Vault server]:client token'
+ '--vault-client-token-path=[absolute path to a file containing the Vault client token]: :_files'
+ '--vault-auth-backend=[auth backend to use for logging in to Vault]:auth backend'
+ '--vault-auth-backend-max-ttl=[time after which to force a re-login]: :_concourse_durations'
+ '--vault-retry-max=[the maximum time between retries when logging in or re-authing a secret]: :_concourse_durations'
+ '--vault-retry-initial=[the initial time between retries when logging in or re-authing a secret]: :_concourse_durations'
+ '*--vault-auth-param=[parameter to pass when logging in via the backend]: :_concourse_name_colon_values'
+ # Conjur Credential Management
+ '--conjur-appliance-url=[URL of the conjur instance]: :_urls'
+ '--conjur-account=[Conjur Account]:account'
+ '--conjur-cert-file=[cert file used if conjur instance is using a self signed cert]: :_files'
+ '--conjur-authn-login=[host username for conjur authn login]:host'
+ '--conjur-authn-api-key=[Api key related to the host for conjur authn]:api_key'
+ '--conjur-authn-token-file=[token file used if conjur instance is running in k8s or iam]: :_files'
+ '--conjur-pipeline-secret-template=[Conjur secret identifier template used for pipeline specific parameter]:template'
+ '--conjur-team-secret-template=[Conjur secret identifier template used for team specific parameter]:template'
+ '--conjur-secret-template=[Conjur secret identifier template used for full path conjur secrets]:template'
+ # CredHub Credential Management
+ '--credhub-url=[CredHub server address used to access secrets]: :_urls'
+ '--credhub-path-prefix=[path under which to namespace credential lookup]:path'
+ '--credhub-ca-cert=[path to PEM-encoded CA cert files to use to verify the CredHub server SSL cert]: :_files'
+ '--credhub-client-cert=[path to the client certificate for mutual TLS authorization]: :_files'
+ '--credhub-client-key=[path to the client private key for mutual TLS authorization]: :_files'
+ '--credhub-insecure-skip-verify[enable insecure SSL verification]'
+ '--credhub-client-id=[client ID for CredHub authorization]:client ID'
+ '--credhub-client-secret=[client secret for CredHub authorization]:client secret'
+ # Dummy Credential Management
+ '--dummy-creds-var=[a YAML value to expose via credential management]:key_val'
+ # Kubernetes Credential Management
+ '--kubernetes-in-cluster[enable the Kubernetes in-cluster client]'
+ '--kubernetes-config-path=[path to Kubernetes config]: :_files'
+ '--kubernetes-namespace-prefix=[prefix to use for Kubernetes namespace]:prefix'
+ # AWS SecretsManager Credential Management
+ '--aws-secretsmanager-access-key=[AWS Access key ID]:access key'
+ '--aws-secretsmanager-secret-key=[AWS Secret Access Key]:secret key'
+ '--aws-secretsmanager-session-token=[AWS Session Token]:session token'
+ '--aws-secretsmanager-region=[AWS region to send requests to]:region'
+ '--aws-secretsmanager-pipeline-secret-template=[AWS Secrets Manager secret identifier template used for pipeline specific parameter]:template'
+ '--aws-secretsmanager-team-secret-template=[AWS Secrets Manager secret identifier template used for team specific parameter]:template'
+ '--aws-secretsmanager-shared-secret-template=[AWS Secrets Manager secret identifier templated used for shared parameter]:template'
+ # AWS SSM Credential Management
+ '--aws-ssm-access-key=[AWS Access key ID]:access key'
+ '--aws-ssm-secret-key=[AWS Secret Access Key]:secret key'
+ '--aws-ssm-session-token=[AWS Session Token]:session token'
+ '--aws-ssm-region=[AWS region to send requests to]:region'
+ '--aws-ssm-pipeline-secret-template=[AWS SSM parameter name template used for pipeline specific parameter]:template'
+ '--aws-ssm-team-secret-template=[AWS SSM parameter name template used for team specific parameter]:template'
+ '--aws-ssm-shared-path=[AWS SSM parameter path used for shared parameters]: :_files'
+ )
-(( $+functions[_concourse_fly_set-team_args] )) ||
-_concourse_fly_set-team_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-n --team-name)'{-n,--team-name=}'[the team to create or modify]: :_concourse_fly_teams' \
- '--non-interactive[force apply configuration]' \
- '*--local-user=[list of whitelisted local concourse users]: :_users' \
- '(-c --config)'{-c,--config=}'[configuration file for specifying team params]: :_concourse_config_files' \
- '*--bitbucket-cloud-user=[list of whitelisted Bitbucket Cloud users]:user name' \
- '*--bitbucket-cloud-team=[list of whitelisted Bitbucket Cloud teams]:team name' \
- '*--cf-user=[list of whitelisted CloudFoundry users]:user name' \
- '*--cf-org=[list of whitelisted CloudFoundry orgs]:org name' \
- '*--cf-space=[list of whitelisted CloudFoundry spaces]:space name' \
- '*--github-user=[list of whitelisted GitHub users]:user name' \
- '*--github-org=[list of whitelisted GitHub orgs]:org name' \
- '*--github-team=[list of whitelisted GitHub teams]:team name' \
- '*--gitlab-user=[list of whitelisted GitLab users]:user name' \
- '*--gitlab-group=[list of whitelisted GitLab groups]:group name' \
- '*--ldap-user=[list of whitelisted LDAP users]:user name' \
- '*--ldap-group=[list of whitelisted LDAP groups]:group name' \
- '*--oauth-user=[list of whitelisted OAuth2 users]:user name' \
- '*--oauth-group=[list of whitelisted OAuth2 groups]:group name' \
- '*--oidc-user=[list of whitelisted OIDC users]:user name' \
- '*--oidc-group=[list of whitelisted OIDC groups]:group name'
-}
+ local -a concourse_placement_strategies=(
+ volume-locality random fewest-build-containers limit-active-tasks limit-active-containers
+ limit-active-volumes
+ )
+ local -a concourse_second_placement_strategies=(
+ random fewest-build-containers limit-active-tasks limit-active-containers limit-active-volumes
+ )
-(( $+functions[_concourse_fly_sync_args] )) ||
-_concourse_fly_sync_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-f --force)'{-f,--force}'[sync even if versions already match]'
-}
+ local -a concourse_container_placement_strategy_configurations=(
+ '--container-placement-strategy=[method by which a worker is selected during container placement]: :(($concourse_placement_strategies))'
+ '--no-input-container-placement-strategy=[a second container placement strategy]: :(($concourse_second_placement_strategies))'
+ '--check-container-placement-strategy=[a third container placement strategy]: :(($concourse_second_placement_strategies))'
+ '--max-active-tasks-per-worker=[maximum allowed number of active build tasks per worker]:tasks'
+ '--max-active-containers-per-worker=[maximum allowed number of active containers per worker]:containers'
+ '--max-active-volumes-per-worker=[maximum allowed number of active volumes per worker]:volumes'
+ )
-(( $+functions[_concourse_fly_targets_args] )) ||
-_concourse_fly_targets_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]'
-}
+ local -a concourse_metric_configurations=(
+ # Metrics & Diagnostics
+ '--metrics-host-name=[host string to attach to emitted metrics]: :_hosts'
+ '*--metrics-attribute=[a key-value attribute to attach to emitted metrics]: :_concourse_name_colon_values'
+ '--metrics-buffer-size=[size of the buffer used in emitting event metrics(default: 1000)]:size'
+ '--capture-error-metrics[enable capturing of error log metrics]'
+ # Metric Emitter (Datadog)
+ '--datadog-agent-host=[datadog agent host to expose dogstatsd metrics]: :_hosts'
+ '--datadog-agent-port=[datadog agent port to expose dogstatsd metrics]: :_concourse_ports'
+ '--datadog-agent-uds-filepath=[Datadog agent unix domain socket filepath]: :_files'
+ '--datadog-prefix=[prefix for all metrics to easily find them in Datadog]:prefix'
+ # Metric Emitter (InfluxDB)
+ '--influxdb-url=[influxDB server address to emit points to]: :_urls'
+ '--influxdb-database=[influxDB database to write points to]:database name'
+ '--influxdb-username=[influxDB server username]: :_users'
+ '--influxdb-password=[influxDB server password]:password'
+ '--influxdb-insecure-skip-verify[skip SSL verification when emitting to InfluxDB]'
+ '--influxdb-batch-size=[number of points to batch together when emitting to InfluxDB(default: 5000)]:size'
+ '--influxdb-batch-duration=[duration to wait before emitting a batch of points to InfluxDB(default: 300s)]: :_concourse_durations'
+ # Metric Emitter (Lager)
+ '--emit-to-logs[emit metrics to logs]'
+ # Metric Emitter (NewRelic)
+ '--newrelic-account-id=[new Relic Account ID]:account ID'
+ '--newrelic-api-key=[new Relic Insights API Key]:API key'
+ '--newrelic-insights-api-url=[Base Url for insights Insert API]: :_urls'
+ '--newrelic-service-prefix=[an optional prefix for emitted New Relic events]:prefix'
+ '--newrelic-batch-size=[number of events to batch together before emitting(default: 2000)]:size'
+ '--newrelic-batch-duration=[length of time to wait between emitting(default: 60s)]: :_concourse_durations'
+ '--newrelic-batch-disable-compression=[disable compression of the batch before sending it]'
+ # Metric Emitter (Prometheus)
+ '--prometheus-bind-ip=[IP to listen on to expose Prometheus metrics]: :_concourse_ip_addresses'
+ '--prometheus-bind-port=[port to listen on to expose Prometheus metrics]: :_concourse_ports'
+ )
-(( $+functions[_concourse_fly_teams_args] )) ||
-_concourse_fly_teams_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-d --details)'{-d,--details}'[print authentication configuration]' \
- '--json[print command result as JSON]'
-}
+ local -a concourse_tracing_configurations=(
+ '--tracing-service-name=[service name to attach to traces as metadata(default: concourse-web)]:name'
+ '--tracing-attribute=[attributes to attach to traces as metadata]:attributes'
+ '--tracing-honeycomb-api-key=[honeycomb.io api key]:key'
+ '--tracing-honeycomb-dataset=[honeycomb.io dataset name]:name'
+ '--tracing-jaeger-endpoint=[jaeger http-based thrift collected]:endpoint'
+ '--tracing-jaeger-tags=[tags to add to the components]:tags'
+ '--tracing-jaeger-service=[jaeger process service name(default; web)]:name'
+ "--tracing-stackdriver-projectid=[GCP's project ID]:project_id"
+ '--tracing-otlp-address=[odlp address to send traces to]:address'
+ '--tracing-otlp-header=[headers to attach to each tracing messages]:header'
+ '--tracing-otlp-use-tls[whether to use TLS or not]'
+ )
-(( $+functions[_concourse_fly_trigger-job_args] )) ||
-_concourse_fly_trigger-job_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-j --job)'{-j,--job=}'[name of a job to trigger]: :_concourse_fly_pipeline_slash_jobs' \
- '(-w --watch)'{-w,--watch}'[start watching the build output]'
-}
+ local -a concourse_policy_check_agent_configurations=(
+ # Policy Checking
+ '--policy-check-filter-http-method=[API http method to go through policy check]:method'
+ '--policy-check-filter-action=[actions in the list will go through policy check]:actions'
+ '--policy-check-filter-action-skip=[actions the list will not go through policy check]:actions'
+ # Policy Check Agent (Open Policy Agent):
+ '--opa-url=[OPA policy check endpoint]:url:_urls'
+ '--opa-timeout=[OPA request timeout(default: 5s)]: :_concourse_durations'
+ '--opa-result-allowed-key=[key name of if pass policy check in OPA returned result]:key'
+ '--opa-result-should-block-key=[key name of if should block current action in OPA returned result]:key'
+ '--opa-result-messages-key=[key name of messages in OPA returned result]:key'
+ )
-(( $+functions[_concourse_fly_unpause-job_args] )) ||
-_concourse_fly_unpause-job_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-j --job)'{-j,--job=}'[name of a job to unpause]: :_concourse_fly_pipeline_slash_jobs'
-}
+ local -a concourse_web_server_configurations=(
+ '--x-frame-options=[the value to set for X-Frame-Options]:options'
+ '--content-security-policy=[value to set for Content-Security-Policy header]:value'
+ '--strict-transport-security=[value to set for the Strict-Transport-Security header]:value'
+ '--cluster-name=[a name for this Concourse cluster, to be displayed on the dashboard page]:name'
+ '--client-id=[client ID to use for login flow(default: concourse-web)]:id'
+ '--client-secret=[client secret to use for login flow]:secret'
+ )
-(( $+functions[_concourse_fly_unpause-pipeline_args] )) ||
-_concourse_fly_unpause-pipeline_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-p --pipeline)'{-p,--pipeline=}'[pipeline to unpause]: :_concourse_fly_pipelines'
-}
+ local -a concourse_gc_configurations=(
+ '--gc-interval=[interval on which to perform garbage collection]: :_concourse_durations'
+ '--gc-one-off-grace-period=[period after which one-off build containers will be garbage-collected]: :_concourse_durations'
+ '--gc-missing-grace-period=[period after which to reap containers and volumes that were created but went missing from the worker]: :_concourse_durations'
+ '--gc-hijack-grace-period=[period after which hijacked containers will be garbage collected]: :_concourse_durations'
+ '--gc-failed-grace-period=[period after which failed containers will be garbage collected]: :_concourse_durations'
+ '--gc-check-recycle-period=[period after which to reap checks that are completed]: :_concourse_durations'
+ '--gc-var-source-recycle-period=[period after which to reap var_sources that are not used]: :_concourse_durations'
+ )
-(( $+functions[_concourse_fly_validate-pipeline_args] )) ||
-_concourse_fly_validate-pipeline_args() {
+ local -a concourse_syslog_configurations=(
+ '--syslog-hostname=[client hostname with which the build logs will be sent to the syslog server]: :_hosts'
+ '--syslog-address=[remote syslog server address with port]: :_concourse_host_colon_ports'
+ '--syslog-transport=[transport protocol for syslog messages]:protocol:(tcp udp tls)'
+ '--syslog-drain-interval=[interval over which checking is done for new build logs to send to syslog server]: :_concourse_durations'
+ '--syslog-ca-cert=[paths to PEM-encoded CA cert files to use to verify the Syslog server SSL cert]: :_files'
+ )
- local context state state_descr line ret=1
- typeset -A opt_args
+ local -a concourse_authentication_configurations=(
+ '--cookie-secure[force sending secure flag on http cookies]'
+ '--auth-duration=[length of time for which tokens are valid]: :_concourse_durations'
+ '--session-signing-key=[file containing an RSA private key, used to sign auth tokens]: :_files'
+ '--password-connector=[connector to use when authenticating via "fly login -u .. -p.."]: :(local ldap)'
+ '*--add-local-user=[list of username:password combinations for all your local users]: :_concourse_username_colon_passwords'
+ '*--add-client=[list of client_id:client_secret combinations]:pair'
+ # Authentication Main Team
+ '*--main-team-local-user=[list of whitelisted local concourse users]: :_users'
+ {-c,--main-team-config=}'[configuration file for specifying team params]: :_concourse_config_files'
+ # Authentication Main Team Bitbucket Cloud
+ '*--main-team-bitbucket-cloud-user=[list of whitelisted Bitbucket Cloud users]: :_users'
+ '*--main-team-bitbucket-cloud-team=[list of whitelisted Bitbucket Cloud teams]:team'
+ # Authentication Main Team CloudFoundry
+ '*--main-team-cf-user=[list of whitelisted CloudFoundry users]: :_users'
+ '*--main-team-cf-org=[list of whitelisted CloudFoundry orgs]:org name'
+ '*--main-team-cf-space=[list of whitelisted CloudFoundry spaces]:space name'
+ '*--main-team-cf-space-with-any-role=[a whitelisted CloudFoundry space for users with any role]:space'
+ '*--main-team-cf-space-with-developer-role=[a whitelisted CloudFoundry space for users with the developer role]:space'
+ '*--main-team-cf-space-with-auditor-role=[a whitelisted CloudFoundry space for users with the auditor role]:space'
+ '*--main-team-cf-space-with-manager-role=[a whitelisted CloudFoundry space for users with the manager role]:space'
+ '*--main-team-cf-space-guid=[a whitelisted CloudFoundry space guid]:space_guid'
+ # Authentication Main Team GitHub
+ '*--main-team-github-user=[list of whitelisted GitHub users]: :_users'
+ '*--main-team-github-org=[list of whitelisted GitHub orgs]:org name'
+ '*--main-team-github-team=[list of whitelisted GitHub teams]:team name'
+ # Authentication Main Team GitLab
+ '*--main-team-gitlab-user=[list of whitelisted GitLab users]: :_users'
+ '*--main-team-gitlab-group=[list of whitelisted GitLab groups]:group name'
+ # Authentication Main Team LDAP
+ '*--main-team-ldap-user=[list of whitelisted LDAP users]: :_users'
+ '*--main-team-ldap-group=[list of whitelisted LDAP groups]:group name'
+ # Authentication Main Team Microsoft
+ '*--main-team-microsoft-user=[a whitelisted Microsoft user]: :_users'
+ '*--main-team-microsoft-group=[a whitelisted Microsoft group]:group name'
+ # Authentication Main Team OAuth2
+ '*--main-team-oauth-user=[list of whitelisted OAuth2 users]: :_users'
+ '*--main-team-oauth-group=[list of whitelisted OAuth2 groups]:group name'
+ # Authentication Main Team OIDC
+ '*--main-team-oidc-user=[list of whitelisted OIDC users]: :_users'
+ '*--main-team-oidc-group=[list of whitelisted OIDC groups]:group name'
+ # Authentication Main Team SAML
+ '*--main-team-saml-user=[a whitelisted SAML user]: :_users'
+ '*--main-team-saml-group=[a whitelisted SAML group]:group name'
+ # Authentication Bitbucket Cloud
+ '--bitbucket-cloud-client-id=[client id]:client ID'
+ '--bitbucket-cloud-client-secret=[client secret]:client secret'
+ # Authentication CloudFoundry
+ '--cf-client-id=[client id]:client ID'
+ '--cf-client-secret=[client secret]:client secret'
+ '--cf-api-url=[the base API URL of your CF deployment]: :_urls'
+ '--cf-ca-cert=[CA Certificate]: :_files'
+ '--cf-skip-ssl-validation[skip SSL validation]'
+ # Authentication GitHub
+ '--github-client-id=[client id]:client ID'
+ '--github-client-secret=[client secret]:client secret'
+ '--github-host=[hostname of GitHub Enterprise deployment]: :_hosts'
+ '--github-ca-cert=[CA certificate of GitHub Enterprise deployment]: :_files'
+ # Authentication GitLab
+ '--gitlab-client-id=[client id]:client ID'
+ '--gitlab-client-secret=[client secret]:client secret'
+ '--gitlab-host=[hostname of Gitlab Enterprise deployment]: :_hosts'
+ # Authentication LDAP
+ '--ldap-display-name=[the auth provider name displayed to users on the login page]:display name'
+ '--ldap-host=[the host and optional port of the LDAP server]: :_hosts'
+ '--ldap-bind-dn=[bind DN for searching LDAP users and groups]:bind DN'
+ '--ldap-bind-pw=[bind Password for the user specified by bind-dn]:bind password'
+ '--ldap-insecure-no-ssl[required if LDAP host does not use TLS]'
+ '--ldap-insecure-skip-verify[skip certificate verification]'
+ '--ldap-start-tls[start on insecure port, then negotiate TLS]'
+ '--ldap-ca-cert=[CA certificate]: :_files'
+ '--ldap-username-prompt=[propmt when logging in through the UI]:prompt'
+ '--ldap-user-search-base-dn= [baseDN to start the search from]:baseDN'
+ '--ldap-user-search-filter=[optional filter to apply when searching the directory]:filter'
+ '--ldap-user-search-username=[attribute to match against the inputted username]:attribute'
+ "--ldap-user-search-scope=[can either be: 'sub' - search the whole sub tree or 'one' - only search one level]:scope:((sub one))"
+ '--ldap-user-search-id-attr=[a mapping of attributes on the user entry to claims]:attribute mapping'
+ '--ldap-user-search-email-attr=[a mapping of attributes on the user entry to claims]:attribute mapping'
+ '--ldap-user-search-name-attr=[a mapping of attributes on the user entry to claims]:attribute mapping'
+ '--ldap-group-search-base-dn=[baseDN to start the search from]:baseDN'
+ '--ldap-group-search-filter=[optional filter to apply when searching the directory]:filter'
+ "--ldap-group-search-scope=[can either be: 'sub' - search the whole sub tree or 'one' - only search one level]:scope:(sub one)"
+ "--ldap-group-search-user-attr=[adds an additional requirement to the filter that an attribute in the group match the user's attribute value]:attribute"
+ "--ldap-group-search-group-attr=[adds an additional requirement to the filter that an attribute in the group match the user's attribute value]:attribute"
+ '--ldap-group-search-name-attr=[the attribute of the group that represents its name]:attribute'
+ # Authentication Microsoft
+ '--microsoft-client-id=[Microsoft client ID]:id'
+ '--microsoft-client-secret=[Microsoft client secret]:secret'
+ '--microsoft-tenant=[Microsoft Tenant limitation]:tenant'
+ '--microsoft-groups=[allowed Active Directory Groups]:groups'
+ '--microsoft-only-security-groups[only fetch security groups]'
+ # Authentication OAuth2
+ '--oauth-display-name=[the auth provider name displayed to users on the login page]:display name'
+ '--oauth-client-id=[client id]:client ID'
+ '--oauth-client-secret=[client secret]:client secret'
+ '--oauth-auth-url=[Authorization URL]: :_urls'
+ '--oauth-token-url=[Token URL]: :_urls'
+ '--oauth-userinfo-url=[UserInfo URL]: :_urls'
+ '*--oauth-scope=[any additional scopes that need to be requested during authorization]:scope'
+ '--oauth-groups-key=[the groups key indicates which claim to use to map external groups to Concourse teams]:group key'
+ '--oauth-user-id-key=[the user id key indicates which claim to use to map an external user id to a Concourse user id]:id key'
+ '--oauth-user-name-key=[the user name key indicates which claim to use to map an external user name to a Concourse user name]:name key'
+ '--oauth-ca-cert=[CA Certificate]: :_files'
+ '--oauth-skip-ssl-validation[skip SSL validation]'
+ # Authorization OIDC
+ '--oidc-display-name=[the auth provider name displayed to users on the login page]:display name'
+ '--oidc-issuer=[An OIDC issuer URL that will be used to discover provider configuration]: :_urls'
+ '--oidc-client-id=[client id]:client ID'
+ '--oidc-client-secret=[client secret]:client secret'
+ '*--oidc-scope=[any additional scopes that need to be requested during authorization]:scope'
+ '--oidc-groups-key=[the groups key indicates which claim to use to map external groups to Concourse teams]:group key'
+ '--oidc-user-name-key=[the user name key indicates which claim to use to map an external user name to a Concourse user name]:user name key'
+ '--oidc-ca-cert=[CA Certificate]: :_files'
+ '--oidc-skip-ssl-validation[skip SSL validation]'
+ '--oidc-disable-groups[disable OIDC groups claims]'
+ '--oidc-skip-email-verified-validation[ignore the email_verified claim from the upstream provider]'
+ '--oidc-disable-get-user-info[disable not query the additional claims]'
+ # Authorization SAML
+ '--saml-display-name=[SAML auth provider name displayed to users on the login page]:name'
+ '--saml-sso-url=[SAML SSO URL used for POST value]:url:_urls'
+ '--saml-ca-cert=[SAML CA Certificate]: :_files'
+ "--saml-entity-issuer=[SAML manually specify dex's issuer value]"
+ '--saml-sso-issuer=[issuer value expected in the SAML response]:issuer'
+ '--saml-username-attr=[SAML concourse user name]:name'
+ '--saml-email-attr=[SAML concourse email]:name'
+ '--saml-groups-attr=[SAML concourse teams]:name'
+ '--saml-groups-delim=[groups are returned as string with this delimiter]:delimiter'
+ '--saml-name-id-policy-format=[requested format of the NameID]:format'
+ '--saml-skip-ssl-validation[SAML skip SSL validation]'
+ )
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-c --config)'{-c,--config=}'[pipeline configuration file]: :_concourse_config_files' \
- '(-s --strict)'{-s,--strict}'[fail on warnings]' \
- '(-o --output)'{-o,--output}'[output templated pipeline to stdout]' \
- '*'{-v,--var=}'[specify a string value to set for a variable in the pipeline]: :->var' \
- '*'{-y,--yaml-var=}'[specify a YAML value to set for a variable in the pipeline]: :->var' \
- '(-l --load-vars-from)'{-l,--load-vars-from=}'[variable flag that can be used for filling in template values in configuration from a YAML file]: :_files' \
- && ret=0
+ local -a concourse_feature_flags=(
+ '--enable-global-resources[enable equivalent resources across pipelines and teams to share a single version history]'
+ '--enable-redact-secrets[enable redacting secrets in build logs]'
+ '--enable-rerun-when-worker-disappears[enable automatically build rerun when worker disappears]'
+ '--enable-across-step[enable the experimental across step to be used in jobs]'
+ '--enable-pipeline-auditing[enable pipeline instances]'
+ '--enable-p2p-volume-streaming[enable P2P volume streaming]'
+ '--enable-cache-streamed-volumes[streamed resource volumes will be cached on the destination]'
+ '--enable-resource-causality[enable the resource causality page]'
+ )
- _concourse_fly_pipeline_config=${(v)opt_args[(i)-c|--config]}
+ local -a concourse_tsa_configurations=(
+ '--tsa-log-level=[minimum level of logs to see]: :_concourse_log_levels'
+ '--tsa-bind-ip=[IP address on which to listen for SSH]: :_concourse_ip_addresses'
+ '--tsa-peer-address=[network address of this web node, reachable by other web nodes]: :_urls'
+ '--tsa-bind-port=[port on which to listen for SSH]: :_concourse_ports'
+ '--tsa-debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]: :_concourse_ip_addresses'
+ '--tsa-debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports'
+ '--tsa-host-key=[path to private key to use for the SSH server]: :_files'
+ '--tsa-authorized-keys=[path to file containing keys to authorize, in SSH authorized_keys format]: :_files'
+ '--tsa-team-authorized-keys=[path to file containing keys to authorize, in SSH authorized_keys format]: :_concourse_name_colon_paths'
+ '--tsa-atc-url=[ATC API endpoints to which workers will be registered]: :_urls'
+ '--tsa-client-id=[client used to fetch a token from the auth server]:id'
+ '--tsa-client-secret=[client used to fetch a token from the auth server]:secret'
+ '--tsa-token-url=[token endpoint of the auth server]: :_urls'
+ '*--tsa-scope=[scopes to request from the auth server]'
+ '--tsa-heartbeat-interval=[interval on which to heartbeat workers to the ATC]: :_concourse_durations'
+ '--tsa-garden-request-timeout=[how long to wait for requests to Garden to complete]: :_concourse_durations'
+ '--tsa-cluster-name=[a name for this Concourse cluster]:name'
+ '--tsa-log-cluster-name=[log cluster name]:name'
+ )
- case $state in
- (var)
- _concourse_fly_var_equal_values && ret=0
- ;;
+ case $command in
+ (quickstart)
+ _concourse_quickstart && ret=0
+ ;;
+ (web)
+ _concourse_web && ret=0
+ ;;
esac
return ret
}
-(( $+functions[_concourse_fly_volumes_args] )) ||
-_concourse_fly_volumes_args() {
- _arguments -C \
+(( $+functions[_concourse_generate-key] )) ||
+_concourse_generate-key() {
+ _arguments \
'(- : *)'{-h,--help}'[display help information]' \
- '(-d --details)'{-d,--details}'[print additional information for each volume]' \
- '--json[print command result as JSON]'
+ '(-t --type)'{-t,--type=}'[the type of key to generate]:key type:(rsa ssh)' \
+ '(-f --filename)'{-f,--filename=}'[file path where the key shall be created. When generating ssh keys, the public key will be stored in a file with the same name but with .pub appended]: :_files' \
+ '(-b --bits)'{-b,--bits=}'[the number of bits in the key to create]:integer'
}
-(( $+functions[_concourse_fly_watch_args] )) ||
-_concourse_fly_watch_args() {
- _arguments -C \
+(( $+functions[_concourse_land-worker] )) ||
+_concourse_land-worker() {
+ _arguments \
'(- : *)'{-h,--help}'[display help information]' \
- '(-j --job)'{-j,--job=}'[watches builds of the given job]: :_concourse_fly_pipeline_slash_jobs' \
- '(-b --build)'{-b,--build=}'[watches a specific build]: :_concourse_fly_builds' \
- '(-t --timestamps)'{-t,--timestamps}'[print with local timestamp]'
+ '--name=[the name of the worker you wish to land]:worker name' \
+ '*--tsa-host=[TSA host to forward the worker through]: :_concourse_host_colon_ports' \
+ '--tsa-public-key=[file containing a public key to expect from the TSA]: :_files' \
+ '--tsa-worker-private-key=[file containing a public key to expect from the TSA]: :_files'
}
-(( $+functions[_concourse_fly_workers_args] )) ||
-_concourse_fly_workers_args() {
- _arguments -C \
+(( $+functions[_concourse_migrate] )) ||
+_concourse_migrate() {
+ _arguments \
'(- : *)'{-h,--help}'[display help information]' \
- '(-d --details)'{-d,--details}'[print additional information for each worker]' \
- '--json[print command result as JSON]'
-}
-
-(( $+functions[_concourse_fly_targets] )) ||
-_concourse_fly_targets() {
- local targets=($(_call_program targets $service targets | awk '{print $1}'))
- _describe -t targets 'target' targets $@ || _message 'no target found'
-}
-
-(( $+functions[_concourse_fly_teams] )) ||
-_concourse_fly_teams() {
- if [[ -n ${_concourse_fly_target} ]]; then
- local teams=($(_call_program teams $service -t ${_concourse_fly_target} teams | awk '{print $1}'))
- _describe -t teams 'team' teams $@ || _message 'no team found'
- else
- _message 'team'
- fi
-}
-
-(( $+functions[_concourse_fly_pipelines] )) ||
-_concourse_fly_pipelines() {
- if [[ -n ${_concourse_fly_target} ]]; then
- local pipelines=($(_call_program pipelines $service -t ${_concourse_fly_target} pipelines | awk '{print $1}'))
- _describe -t pipelines 'pipeline' pipelines $@ || _message 'no pipeline found'
- else
- _message 'pipeline'
- fi
-}
-
-(( $+functions[_concourse_fly_pipeline_jobs] )) ||
-_concourse_fly_pipeline_jobs() {
- if [[ -n ${_concourse_fly_target} ]] && [[ -n ${_concourse_fly_pipeline} ]]; then
- local jobs=($(_call_program jobs $service -t ${_concourse_fly_target} jobs -p ${_concourse_fly_pipeline} 2>&1 | awk '{print $1}'))
- _describe -t jobs "${_concourse_fly_pipeline} job" jobs $@ || _message 'no job found'
- else
- _message 'job'
- fi
-}
-
-(( $+functions[_concourse_fly_pipeline_resources] )) ||
-_concourse_fly_pipeline_resources() {
- if [[ -n ${_concourse_fly_target} ]] && [[ -n ${_concourse_fly_pipeline} ]]; then
- local resources=($(_call_program resources $service -t ${_concourse_fly_target} resources -p ${_concourse_fly_pipeline} | awk '{print $1}'))
- _describe -t resources 'resource' resources $@ || _message 'no resource found'
- else
- _message 'resource'
- fi
-}
-
-(( $+functions[_concourse_fly_pipeline_resource_types] )) ||
-_concourse_fly_pipeline_resource_types() {
- if [[ -n ${_concourse_fly_target} ]] && [[ -n ${_concourse_fly_pipeline} ]]; then
- local resource_types=($(_call_program resource-types $service -t ${_concourse_fly_target} resources -p ${_concourse_fly_pipeline} | awk '{print $2}'))
- _describe -t resource-types 'resource type' resource_types $@ || _message 'no resource type found'
- else
- _message 'resource type'
- fi
-}
-
-(( $+functions[_concourse_fly_workers] )) ||
-_concourse_fly_workers() {
- if [[ -n ${_concourse_fly_target} ]]; then
- local workers=($(_call_program workers $service -t ${_concourse_fly_target} workers | awk '{print $1}'))
- _describe -t workers 'worker' workers $@ || _message 'no worker found'
- else
- _message 'worker'
- fi
-}
-
-(( $+functions[_concourse_fly_builds] )) ||
-_concourse_fly_builds() {
- if [[ -n ${_concourse_fly_target} ]]; then
- local builds=($(_call_program builds $service -t ${_concourse_fly_target} builds | awk '{print $1}'))
- _describe -t builds 'build' builds $@ || _message 'no build found'
- else
- _message 'build'
- fi
-}
-
-(( $+functions[_concourse_fly_pipeline_resource_versions] )) ||
-_concourse_fly_pipeline_resource_versions() {
- if [[ -n ${_concourse_fly_target} ]] && [[ -n ${_concourse_fly_resource} ]]; then
- local resource_versions=($(_call_program resource-versions $service -t ${_concourse_fly_target} resource-versions -r ${_concourse_fly_resource} | awk '{print $2}'))
- _describe -t resource-versions 'resource version' resource_versions $@ || _message 'no version found'
- else
- _message 'resource version'
- fi
-}
-
-(( $+functions[_concourse_fly_pipeline_config_vars] )) ||
-_concourse_fly_pipeline_config_vars() {
- if [[ -n ${_concourse_fly_pipeline_config} ]]; then
- local variables=($(grep -Po '(?<=\(\()[^\)]+' ${_concourse_fly_pipeline_config}))
- _describe -t variables 'variables' variables $@ || _message 'no variable found'
- else
- _message 'variable'
- fi
-}
-
-(( $+functions[_concourse_fly_pipeline_config_inputs] )) ||
-_concourse_fly_pipeline_config_inputs() {
- if [[ -n ${_concourse_fly_pipeline_config} ]]; then
- if (( $+commands[yq] )); then
- local inputs=($(yq -r '.. | .inputs? | arrays | .[].name' ${_concourse_fly_pipeline_config} 2>&1))
- _describe -t inputs 'input' inputs $@ || _message 'no input found'
- else
- _message 'install yq (https://github.com/kislyuk/yq) to get completion of inputs'
- fi
- else
- _message 'input'
- fi
-}
-
-(( $+functions[_concourse_fly_pipeline_config_outputs] )) ||
-_concourse_fly_pipeline_config_outputs() {
- if [[ -n ${_concourse_fly_pipeline_config} ]]; then
- if (( $+commands[yq] )); then
- local outputs=($(yq -r '.. | .outputs? | arrays | .[].name' ${_concourse_fly_pipeline_config}))
- _describe -t outputs 'output' outputs $@ || _message 'no output found'
- else
- _message 'install yq (https://github.com/kislyuk/yq) to get completion of outputs'
- fi
- else
- _message 'output'
- fi
-}
-
-(( $+functions[_concourse_fly_pipeline_resource_type_versions] )) ||
-_concourse_fly_pipeline_resource_type_versions() {
- # seems like there is no command for listing resource type versions...
- _message 'resource type version'
-}
-
-(( $+functions[_concourse_fly_tags] )) ||
-_concourse_fly_tags() {
- # seems like there is no command for listing tags...
- _message 'tag'
+ '--encryption-key=[a 16 or 32 length key used to encrypt sensitive information before storing it in the database]:encryption key' \
+ '(- : *)--current-db-version[print the current database version and exit]' \
+ '(- : *)--supported-db-version[print the max supported database version and exit]' \
+ '--migrate-db-to-version=[migrate to the specified database version and exit]:database version' \
+ '--migrate-to-latest-version[migrate to the latest migration version and exit]' \
+ $concourse_postgres_configurations[@] \
}
-(( $+functions[_concourse_fly_dates] )) ||
-_concourse_fly_dates() {
- # _dates completer does not seem to work on zsh 5.7.1
- _dates -f '%Y-%m-%d %H:%M:%S'
-}
+(( $+functions[_concourse_quickstart] )) ||
+_concourse_quickstart() {
+ local -a concourse_worker_configurations=(
+ '--worker-name=[name to set for the worker during registration]:name'
+ '--worker-tag=[tag to set during registration]:tag'
+ '--worker-team=[name of the team that this worker will be assigned to]:team'
+ '--worker-http-proxy=[HTTP proxy endpoint to use for containers]:proxy:_urls'
+ '--worker-https-proxy=[HTTPS proxy endpoint to use for containers]:proxy:_urls'
+ '*--worker-no-proxy=[blacklist of addresses to skip the proxy when reaching]:url:_urls'
+ '--worker-ephemeral[worker will be immediately removed upon stalling]'
+ '--worker-certs-dir=[directory to use when creating the resource certificates volume]:dir:_files -/'
+ '--worker-work-dir=[directory in which to place container data]:dir:_files -/'
+ '--worker-bind-ip=[IP address on which to listen for the Garden server]:ip'
+ '--worker-bind-port=[port on which to listen for the Garden server]:port'
+ '--worker-debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]:ip'
+ '--worker-debug-bind-port=[port on which to listen for the pprof debugger endpoints]:port'
+ '--worker-healthcheck-bind-ip=[IP address on which to listen for health checking requests]:ip'
+ '--worker-healthcheck-bind-port=[port on which to listen for health checking requests]:port'
+ '--worker-healthcheck-timeout=[HTTP timeout for the full duration of health checking]: :_concourse_durations'
+ '--worker-sweep-interval=[interval on which containers and volumes will be garbage collected from the worker]: :_concourse_durations'
+ '--worker-volume-sweeper-max-in-flight=[maximum number of volumes which can be swept in parallel]:number'
+ '--worker-container-sweeper-max-in-flight=[maximum number of containers which can be swept in parallel]:number'
+ '--worker-rebalance-interval=[duration after which the registration should be swapped to another random SSH gateway]: :_concourse_durations'
+ '--worker-connection-drain-timeout=[duration after which a worker should give up draining forwarded connections on shutdown]: :_concourse_durations'
+ '--worker-external-garden-url=[API endpoint of an externally managed Garden server to use instead of running the embedded Garden server]:url:_urls'
+ '--worker-resource-types=[path to directory containing resource types the worker should advertise]:dir:_files -/'
+ '--worker-log-level=[minimum level of logs to see]:level:_concourse_log_levels'
-(( $+functions[_concourse_fly_pipeline_slash_jobs] )) ||
-_concourse_fly_pipeline_slash_jobs() {
- local ret=1
- if compset -P '*/'; then
- _concourse_fly_pipeline="${${IPREFIX%/}##*=}"
- _concourse_fly_pipeline_jobs && ret=0
- else
- _concourse_fly_pipelines -qS/ && ret=0
- fi
- return ret
-}
+ # TSA Configuration:
+ '--worker-tsa-host=[TSA host to forward the worker through]:host'
+ '--worker-tsa-public-key=[file containing a public key to expect from the TSA]:file:_files'
+ '--worker-tsa-worker-private-key=[file containing the private key to use when authenticating to the TSA]:file:_files'
-(( $+functions[_concourse_fly_pipeline_slash_resources] )) ||
-_concourse_fly_pipeline_slash_resources() {
- local ret=1
- if compset -P '*/'; then
- _concourse_fly_pipeline="${${IPREFIX%/}##*=}"
- _concourse_fly_pipeline_resources && ret=0
- else
- _concourse_fly_pipelines -qS/ && ret=0
- fi
- return ret
-}
+ # Tracing:
+ '--worker-tracing-service-name=[service name to attach to traces as metadata]:name'
+ '--worker-tracing-attribute=[attributes to attach to traces as metadata]:attr'
+ '--worker-tracing-honeycomb-api-key=[honeycomb.io api key]:key'
+ '--worker-tracing-honeycomb-dataset=[honeycomb.io dataset name]:dataset'
+ '--worker-tracing-jaeger-endpoint=[jaeger http-based thrift collector]:endpoint'
+ '--worker-tracing-jaeger-tags=[tags to add to the components]:tags'
+ '--worker-tracing-jaeger-service=[jaeger process service name]:service'
+ "--worker-tracing-stackdriver-projectid=[GCP's Project ID]:id"
+ '--worker-tracing-otlp-address=[otlp address to send traces to]:address'
+ '--worker-tracing-otlp-header=[headers to attach to each tracing message]:header'
+ '--worker-tracing-otlp-use-tls[whether to use tls or not]'
-(( $+functions[_concourse_fly_pipeline_slash_resource_types] )) ||
-_concourse_fly_pipeline_slash_resource_types() {
- local ret=1
- if compset -P '*/'; then
- _concourse_fly_pipeline="${${IPREFIX%/}##*=}"
- _concourse_fly_pipeline_resource_types && ret=0
- else
- _concourse_fly_pipelines -qS/ && ret=0
- fi
- return ret
-}
+ # Runtime Configuration
+ '--worker-runtime=[runtime to use with the worker]:runtime:(guardian containerd houdini)'
-(( $+functions[_concourse_fly_var_equal_values] )) ||
-_concourse_fly_var_equal_values() {
- local ret=1
- if compset -P '*='; then
- _message 'value' && ret=0
- else
- _concourse_fly_pipeline_config_vars -qS= && ret=0
- fi
- return ret
-}
+ # Guardian Configuration
+ '--worker-garden-bin=[path to a garden server executable]:bin'
+ '--worker-garden-request-timeout=[how long to wait for requests to the Garden server to complete]:time:_concourse_durations'
+ '--worker-garden-config=[path to a config file to use for the Garden backend]:path:_files'
-(( $+functions[_concourse_fly_input_equal_paths] )) ||
-_concourse_fly_input_equal_paths() {
- local ret=1
- if compset -P '*='; then
- _files && ret=0
- else
- _concourse_fly_pipeline_config_inputs -qS= && ret=0
- fi
- return ret
-}
+ # DNS Proxy Configuration
+ '--worker-garden-dns-proxy-enable[enable proxy DNS server]'
-(( $+functions[_concourse_fly_output_equal_paths] )) ||
-_concourse_fly_output_equal_paths() {
- local ret=1
- if compset -P '*='; then
- _files && ret=0
- else
- _concourse_fly_pipeline_config_outputs -qS= && ret=0
- fi
- return ret
-}
+ # Container Networking
+ '--worker-garden-network-pool=[network range to use for dynamically allocated container subnets]:range'
-(( $+functions[_concourse_server] )) ||
-_concourse_server() {
+ # Limits:
+ '--worker-garden-max-containers=[maximum container capacity]:capacity'
- local context state state_descr line ret=1
- typeset -A opt_args
+ # Containerd Configuration:
+ '--worker-containerd-config=[path to a config file to use for the Containerd daemon]:file:_files'
+ '--worker-containerd-bin=[path to a containerd executable]:file:_files'
+ '--worker-containerd-init-bin=[path to an init executable]:file:_files'
+ '--worker-containerd-seccomp-profile=[path to a seccomp filter override]:file:_files'
+ '--worker-containerd-oci-hooks-dir=[path to the oci hooks dir]:dir:_files -/'
+ '--worker-containerd-cni-plugins-dir=[path to CNI network plugins]:dir:_files -/'
+ '--worker-containerd-request-timeout=[how long to wait for requests to Containerd to complete]: :_concourse_durations'
+ '--worker-containerd-max-containers=[max container capacity]:capacity'
+ '--worker-containerd-privileged-mode=[how many privileges privileged containers get]:type:(full fuse-only ignore)'
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(- : *)'{-v,--version}'[print the version of Concourse and exit]' \
- '(-): :->command' \
- '(-)*:: :->arguments' \
- && ret=0
+ # Containerd Networking
+ "--worker-containerd-external-ip=[IP address to use to reach container's mapped ports]:ip"
+ '--worker-containerd-dns-server=[DNS server IP address to use instead of automatically determined servers]:ip'
+ '--worker-containerd-additional-hosts=[additional entries to add to /etc/hosts in containers]:hosts'
+ '--worker-containerd-restricted-network=[network ranges to which traffic from containers will be restricted]:range'
+ '--worker-containerd-network-pool=[network range to use for dynamically allocated container subnets]:range'
+ '--worker-containerd-mtu=[MTU size for container network interfaces]:size'
+ "--worker-containerd-allow-host-access[allow containers to reach the host's network]"
- case $state in
- (command)
- _concourse_commands && ret=0
- ;;
- (arguments)
- curcontext=${curcontext%:*:*}:concourse-$words[1]:
- if (( $+functions[_concourse_${words[1]}_args] )); then
- _concourse_${words[1]}_args && ret=0
- else
- _message "unknown command ${words[1]}" && ret=1
- fi
- ;;
- esac
+ # DNS Proxy Configuration:
+ '--worker-containerd-dns-proxy-enable[Enable proxy DNS server]'
- return ret
-}
+ # IPv6 Configuration:
+ '--worker-containerd-v6-enable[enable IPv6 networking]'
+ '--worker-containerd-v6-pool=[IPv6 network range to use for dynamically allocated container addresses]:range'
+ '--worker-containerd-v6-disable-masquerade [Masquerade container traffic with worker address]:address'
-(( $+functions[_concourse_commands] )) ||
-_concourse_commands() {
- local commands=(
- "generate-key:generate RSA key for use with Concourse components"
- "land-worker:safely drain a worker's assignments for temporary downtime"
- "migrate:run database migrations"
- "quickstart:run both 'web' and 'worker' together, auto-wired"
- "retire-worker:safely remove a worker from the cluster permanently"
- "web:run the web UI and build scheduler"
- "worker:run and register a worker"
+ # Baggageclaim Configuration:
+ '--worker-baggageclaim-log-level=[minimum level of logs to see]: :_concourse_log_levels'
+ '--worker-baggageclaim-bind-ip=[IP address on which to listen for API traffic]:ip'
+ '--worker-baggageclaim-bind-port=[port on which to listen for API traffic]:port'
+ '--worker-baggageclaim-debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]:ip'
+ '--worker-baggageclaim-debug-bind-port=[port on which to listen for the pprof debugger endpoints]:port'
+ '--worker-baggageclaim-p2p-interface-name-pattern=[regular expression to match a network interface for p2p streaming]:pattern'
+ '--worker-baggageclaim-p2p-interface-family=[4 for IPv4 and 6 for IPv6]:type:(4 6)'
+ '--worker-baggageclaim-volumes=[directory in which to place volume data]:dir:_files -/'
+ '--worker-baggageclaim-driver=[driver to use for managing volumes]:type:(detect naive btrfs overlay)'
+ '--worker-baggageclaim-btrfs-bin=[path to btrfs binary]:path:_files'
+ '--worker-baggageclaim-mkfs-bin=[path to mkfs binary]:path:_files'
+ '--worker-baggageclaim-overlays-dir=[path to directory in which to store overlay data]:dir:_files -/'
+ '--worker-baggageclaim-disable-user-namespaces[disable remapping of user/group IDs in unprivileged volumes]:namespace'
)
- _describe -t commands commands commands
-}
-(( $+functions[_concourse_generate-key_args] )) ||
-_concourse_generate-key_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(-t --type)'{-t,--type=}'[the type of key to generate]:key type:(rsa ssh)' \
- '(-f --filename)'{-f,--filename=}'[file path where the key shall be created. When generating ssh keys, the public key will be stored in a file with the same name but with .pub appended]: :_files' \
- '(-b --bits)'{-b,--bits=}'[the number of bits in the key to create]:integer'
-}
-
-(( $+functions[_concourse_land-worker_args] )) ||
-_concourse_land-worker_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '--name=[the name of the worker you wish to land]:worker name' \
- '*--tsa-host=[TSA host to forward the worker through]: :_concourse_host_colon_ports' \
- '--tsa-public-key=[file containing a public key to expect from the TSA]: :_files' \
- '--tsa-worker-private-key=[file containing a public key to expect from the TSA]: :_files'
-}
-
-(( $+functions[_concourse_migrate_args] )) ||
-_concourse_migrate_args() {
- _arguments -C \
- '(- : *)'{-h,--help}'[display help information]' \
- '(- : *)--current-db-version[print the current database version and exit]' \
- '(- : *)--supported-db-version[print the max supported database version and exit]' \
- '(- : *)--migrate-db-to-version=[migrate to the specified database version and exit]:database version' \
- '--encryption-key=[a 16 or 32 length key used to encrypt sensitive information before storing it in the database]:encryption key' \
- '--postgres-host=[the host to connect to]: :_hosts' \
- '--postgres-port=[the port to connect to]: :_concourse_ports' \
- '--postgres-socket=[path to a UNIX domain socket to connect to]: :_files' \
- '--postgres-user=[the user to sign in as]: :_users' \
- '--postgres-password=[the user'\''s password]:password' \
- '--postgres-sslmode=[whether or not to use SSL]:SSL mode:((disable require verify-ca verify-full))' \
- '--postgres-ca-cert=[CA cert file location, to verify when connecting with SSL]: :_files' \
- '--postgres-client-cert=[client cert file location]: :_files' \
- '--postgres-client-key=[client key file location]: :_files' \
- '--postgres-connect-timeout=[dialing timeout]:duration' \
- '--postgres-database=[the name of the database to use]:database name'
+ _arguments \
+ $concourse_web_configurations[@] \
+ "--enable-lets-encrypt[automatically configure TLS certificate via Let's Encrypt/ACME]" \
+ "--lets-encrypt-acme-url=[URL of ACME CA directory endpoint]:url:_urls" \
+ $concourse_postgres_configurations[@] \
+ $concourse_credential_manager_configurations[@] \
+ '--signing-key-check-interval=[how often to check for outdated or expired signing keys(default: 10m)]: :_concourse_durations' \
+ '--signing-key-rotation-period=[after which time a new signing key for the idtoken secrets provider should be generated]: :_concourse_durations' \
+ '--signing-key-rotation-period=[how long a key should still be published after a new key has been generated]: :_concourse_durations' \
+ $concourse_container_placement_strategy_configurations[@] \
+ $concourse_metric_configurations[@] \
+ $concourse_tracing_configurations[@] \
+ $concourse_policy_check_agent_configurations[@] \
+ $concourse_web_server_configurations[@] \
+ $concourse_gc_configurations[@] \
+ $concourse_syslog_configurations[@] \
+ $concourse_authentication_configurations[@] \
+ $concourse_feature_flags[@] \
+ $concourse_tsa_configurations[@] \
+ $concourse_worker_configurations[@]
}
-(( $+functions[_concourse_retire-worker_args] )) ||
-_concourse_retire-worker_args() {
- _arguments -C \
+(( $+functions[_concourse_retire-worker] )) ||
+_concourse_retire-worker() {
+ _arguments \
'(- : *)'{-h,--help}'[display help information]' \
'--name=[the name of the worker you wish to retire]:worker name' \
+ '--team=[the team name of the worker you with to retire]:team name' \
'*--tsa-host=[TSA host to forward the worker through]: :_concourse_host_colon_ports' \
'--tsa-public-key=[file containing a public key to expect from the TSA]: :_files' \
'--tsa-worker-private-key=[file containing a public key to expect from the TSA]: :_files'
}
-(( $+functions[_concourse_web_args] )) ||
-_concourse_web_args() {
- _arguments -C \
+(( $+functions[_concourse_web] )) ||
+_concourse_web() {
+ local -a placement_strategies=(
+ volume-locality random fewest-build-containers limit-active-tasks limit-active-containers
+ limit-active-volumes
+ )
+ local -a second_placement_strategies=(
+ random fewest-build-containers limit-active-tasks limit-active-containers limit-active-volumes
+ )
+
+ _arguments \
'(- : *)'{-h,--help}'[display help information]' \
- '--peer-address=[network address of this web node, reachable by other web nodes]: :_concourse_host_colon_ports' \
- '--log-level=[minimum level of logs to see]: :_concourse_log_levels' \
- '--bind-ip=[IP address on which to listen for web traffic]: :_concourse_ip_addresses' \
- '--bind-port=[port on which to listen for HTTP traffic]: :_concourse_ports' \
- '--tls-bind-port=[port on which to listen for HTTPS traffic]: :_concourse_ports' \
- '--tls-cert=[file containing an SSL certificate]: :_files' \
- '--tls-key=[file containing an RSA private key, used to encrypt HTTPS traffic]: :_files' \
- '--external-url=[URL used to reach any ATC from the outside world]: :_urls' \
- '--encryption-key=[a 16 or 32 length key used to encrypt sensitive information before storing it in the database]:encryption key' \
- '--old-encryption-key=[encryption key previously used for encrypting sensitive information]:encryption key' \
- '--debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]: :_concourse_ip_addresses' \
- '--debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports' \
- '--intercept-idle-timeout=[length of time for a intercepted session to be idle before terminating]: :_concourse_durations' \
- '--enable-global-resources[enable equivalent resources across pipelines and teams to share a single version history]' \
- '--global-resource-check-timeout=[time limit on checking for new versions of resources]: :_concourse_durations' \
- '--resource-checking-interval=[interval on which to check for new versions of resources]: :_concourse_durations' \
- '--resource-type-checking-interval=[interval on which to check for new versions of resource types]: :_concourse_durations' \
- '--container-placement-strategy=[method by which a worker is selected during container placement]:strategy:((volume-locality random fewest-build-containers))' \
- '--baggageclaim-response-header-timeout=[how long to wait for Baggageclaim to send the response header]: :_concourse_durations' \
- '--cli-artifacts-dir=[directory containing downloadable CLI binaries]: :_files -/' \
- '--log-db-queries[log database queries]' \
- '--build-tracker-interval=[interval on which to run build tracking]: :_concourse_durations' \
- '--default-build-logs-to-retain=[default build logs to retain, 0 means all]:number' \
- '--max-build-logs-to-retain=[maximum build logs to retain, 0 means not specified]:number' \
- '--default-days-to-retain-build-logs=[default days to retain build logs. 0 means unlimited]:number' \
- '--max-days-to-retain-build-logs=[maximum days to retain build logs, 0 means not specified]:number' \
- '--default-task-cpu-limit=[default max number of cpu shares per task, 0 means unlimited]:number' \
- '--default-task-memory-limit=[default maximum memory per task, 0 means unlimited]:number' \
- '--enable-build-auditing[enable auditing for all api requests connected to builds]' \
- '--enable-container-auditing[enable auditing for all api requests connected to containers]' \
- '--enable-job-auditing[enable auditing for all api requests connected to jobs]' \
- '--enable-pipeline-auditing[enable auditing for all api requests connected to pipelines]' \
- '--enable-resource-auditing[enable auditing for all api requests connected to resources]' \
- '--enable-system-auditing[enable auditing for all api requests connected to system transactions]' \
- '--enable-team-auditing[enable auditing for all api requests connected to teams]' \
- '--enable-worker-auditing[enable auditing for all api requests connected to workers]' \
- '--enable-volume-auditing[enable auditing for all api requests connected to volumes]' \
- '--postgres-host=[the host to connect to]: :_hosts' \
- '--postgres-port=[the port to connect to]: :_concourse_ports' \
- '--postgres-socket=[path to a UNIX domain socket to connect to]: :_files' \
- '--postgres-user=[the user to sign in as]: :_users' \
- '--postgres-password=[the user'\''s password]:password' \
- '--postgres-sslmode=[whether or not to use SSL]:SSL mode:((disable require verify-ca verify-full))' \
- '--postgres-ca-cert=[CA cert file location, to verify when connecting with SSL]: :_files' \
- '--postgres-client-cert=[client cert file location]: :_files' \
- '--postgres-client-key=[client key file location]: :_files' \
- '--postgres-connect-timeout=[dialing timeout]: :_concourse_durations' \
- '--postgres-database=[the name of the database to use]:database name' \
- '--secret-retry-attempts=[the number of attempts secret will be retried to be fetched, in case a retriable error happens]:number' \
- '--secret-retry-interval=[the interval between secret retry retrieval attempts]: :_concourse_durations' \
- '--secret-cache-enabled[enable in-memory cache for secrets]' \
- '--secret-cache-duration=[if the cache is enabled, secret values will be cached for not longer than this duration]: :_concourse_durations' \
- '--secret-cache-purge-interval=[if the cache is enabled, expired items will be removed on this internal]: :_concourse_durations' \
- '--credhub-url=[CredHub server address used to access secrets]: :_urls' \
- '--credhub-path-prefix=[path under which to namespace credential lookup]:path' \
- '--credhub-ca-cert=[path to PEM-encoded CA cert files to use to verify the CredHub server SSL cert]: :_files' \
- '--credhub-client-cert=[path to the client certificate for mutual TLS authorization]: :_files' \
- '--credhub-client-key=[path to the client private key for mutual TLS authorization]: :_files' \
- '--credhub-insecure-skip-verify[enable insecure SSL verification]' \
- '--credhub-client-id=[client ID for CredHub authorization]:client ID' \
- '--credhub-client-secret=[client secret for CredHub authorization]:client secret' \
- '--kubernetes-in-cluster[enables the in-cluster client]' \
- '--kubernetes-config-path=[path to Kubernetes config when running ATC outside Kubernetes]: :_files' \
- '--kubernetes-namespace-prefix=[prefix to use for Kubernetes namespaces under which secrets will be looked up]:prefix' \
- '--aws-secretsmanager-access-key=[AWS Access key ID]:access key' \
- '--aws-secretsmanager-secret-key=[AWS Secret Access Key]:secret key' \
- '--aws-secretsmanager-session-token=[AWS Session Token]:session token' \
- '--aws-secretsmanager-region=[AWS region to send requests to]:region' \
- '--aws-secretsmanager-pipeline-secret-template=[AWS Secrets Manager secret identifier template used for pipeline specific parameter]:template' \
- '--aws-secretsmanager-team-secret-template=[AWS Secrets Manager secret identifier template used for team specific parameter]:template' \
- '--aws-ssm-access-key=[AWS Access key ID]:access key' \
- '--aws-ssm-secret-key=[AWS Secret Access Key]:secret key' \
- '--aws-ssm-session-token=[AWS Session Token]:session token' \
- '--aws-ssm-region=[AWS region to send requests to]:region' \
- '--aws-ssm-pipeline-secret-template=[AWS SSM parameter name template used for pipeline specific parameter]:template' \
- '--aws-ssm-team-secret-template=[AWS SSM parameter name template used for team specific parameter]:template' \
- '--vault-url=[vault server address used to access secrets]: :_urls' \
- '--vault-path-prefix=[path under which to namespace credential lookup]:prefix' \
- '--vault-shared-path=[path under which to lookup shared credentials]:path' \
- '--vault-ca-cert=[path to a PEM-encoded CA cert file to use to verify the vault server SSL cert]: :_files' \
- '--vault-ca-path=[path to a directory of PEM-encoded CA cert files to verify the vault server SSL cert]: :_files -/' \
- '--vault-client-cert=[path to the client certificate for Vault authorization]: :_files' \
- '--vault-client-key=[path to the client private key for Vault authorization]: :_files' \
- '--vault-server-name=[if set, is used to set the SNI host when connecting via TLS]:server name' \
- '--vault-insecure-skip-verify[enable insecure SSL verification]' \
- '--vault-client-token=[client token for accessing secrets within the Vault server]:client token' \
- '--vault-auth-backend=[auth backend to use for logging in to Vault]:auth backend' \
- '--vault-auth-backend-max-ttl=[time after which to force a re-login]: :_concourse_durations' \
- '--vault-retry-max=[the maximum time between retries when logging in or re-authing a secret]: :_concourse_durations' \
- '--vault-retry-initial=[the initial time between retries when logging in or re-authing a secret]: :_concourse_durations' \
- '*--vault-auth-param=[parameter to pass when logging in via the backend]: :_concourse_name_colon_values' \
- {-n,--noop}'[don'\''t actually do any automatic scheduling or checking]' \
- '--worker-garden-url=[a Garden API endpoint to register as a worker]: :_urls' \
- '--worker-baggageclaim-url=[a Baggageclaim API endpoint to register with the worker]: :_urls' \
- '*--worker-resource=[a resource type to advertise for the worker]: :_concourse_type_colon_images' \
- '--metrics-host-name=[host string to attach to emitted metrics]: :_hosts' \
- '*--metrics-attribute=[a key-value attribute to attach to emitted metrics]: :_concourse_name_colon_values' \
- '--capture-error-metrics[enable capturing of error log metrics]' \
- '--datadog-agent-host=[datadog agent host to expose dogstatsd metrics]: :_hosts' \
- '--datadog-agent-port=[datadog agent port to expose dogstatsd metrics]: :_concourse_ports' \
- '--datadog-prefix=[prefix for all metrics to easily find them in Datadog]:prefix' \
- '--influxdb-url=[influxDB server address to emit points to]: :_urls' \
- '--influxdb-database=[influxDB database to write points to]:database name' \
- '--influxdb-username=[influxDB server username]: :_users' \
- '--influxdb-password=[influxDB server password]:password' \
- '--influxdb-insecure-skip-verify[skip SSL verification when emitting to InfluxDB]' \
- '--emit-to-logs[emit metrics to logs]' \
- '--newrelic-account-id=[new Relic Account ID]:account ID' \
- '--newrelic-api-key=[new Relic Insights API Key]:API key' \
- '--newrelic-service-prefix=[an optional prefix for emitted New Relic events]:prefix' \
- '--prometheus-bind-ip=[IP to listen on to expose Prometheus metrics]: :_concourse_ip_addresses' \
- '--prometheus-bind-port=[port to listen on to expose Prometheus metrics]: :_concourse_ports' \
- '--riemann-host=[riemann server address to emit metrics to]: :_hosts' \
- '--riemann-port=[port of the Riemann server to emit metrics to]: :_concourse_ports' \
- '--riemann-service-prefix=[an optional prefix for emitted Riemann services]:prefix' \
- '*--riemann-tag=[tag to attach to emitted metrics]:tag' \
- '--x-frame-options=[the value to set for X-Frame-Options]:options' \
- '--cluster-name=[a name for this Concourse cluster, to be displayed on the dashboard page]:name' \
- '--gc-interval=[interval on which to perform garbage collection]: :_concourse_durations' \
- '--gc-one-off-grace-period=[period after which one-off build containers will be garbage-collected]: :_concourse_durations' \
- '--gc-missing-grace-period=[period after which to reap containers and volumes that were created but went missing from the worker]: :_concourse_durations' \
- '--syslog-hostname=[client hostname with which the build logs will be sent to the syslog server]: :_hosts' \
- '--syslog-address=[remote syslog server address with port]: :_concourse_host_colon_ports' \
- '--syslog-transport=[transport protocol for syslog messages]:protocol:((tcp udp tls))' \
- '--syslog-drain-interval=[interval over which checking is done for new build logs to send to syslog server]: :_concourse_durations' \
- '--syslog-ca-cert=[paths to PEM-encoded CA cert files to use to verify the Syslog server SSL cert]: :_files' \
- '--cookie-secure[force sending secure flag on http cookies]' \
- '--auth-duration=[length of time for which tokens are valid]: :_concourse_durations' \
- '--session-signing-key=[file containing an RSA private key, used to sign auth tokens]: :_files' \
- '*--add-local-user=[list of username:password combinations for all your local users]: :_concourse_username_colon_passwords' \
- '*--main-team-local-user=[list of whitelisted local concourse users]: :_users' \
- {-c,--main-team-config=}'[configuration file for specifying team params]: :_concourse_config_files' \
- '*--main-team-bitbucket-cloud-user=[list of whitelisted Bitbucket Cloud users]: :_users' \
- '*--main-team-bitbucket-cloud-team=[list of whitelisted Bitbucket Cloud teams]:team' \
- '*--main-team-cf-user=[list of whitelisted CloudFoundry users]: :_users' \
- '*--main-team-cf-org=[list of whitelisted CloudFoundry orgs]:org name' \
- '*--main-team-cf-space=[list of whitelisted CloudFoundry spaces]:space name' \
- '*--main-team-github-user=[list of whitelisted GitHub users]: :_users' \
- '*--main-team-github-org=[list of whitelisted GitHub orgs]:org name' \
- '*--main-team-github-team=[list of whitelisted GitHub teams]:team name' \
- '*--main-team-gitlab-user=[list of whitelisted GitLab users]: :_users' \
- '*--main-team-gitlab-group=[list of whitelisted GitLab groups]:group name' \
- '*--main-team-ldap-user=[list of whitelisted LDAP users]: :_users' \
- '*--main-team-ldap-group=[list of whitelisted LDAP groups]:group name' \
- '*--main-team-oauth-user=[list of whitelisted OAuth2 users]: :_users' \
- '*--main-team-oauth-group=[list of whitelisted OAuth2 groups]:group name' \
- '*--main-team-oidc-user=[list of whitelisted OIDC users]: :_users' \
- '*--main-team-oidc-group=[list of whitelisted OIDC groups]:group name' \
- '--bitbucket-cloud-client-id=[client id]:client ID' \
- '--bitbucket-cloud-client-secret=[client secret]:client secret' \
- '--cf-client-id=[client id]:client ID' \
- '--cf-client-secret=[client secret]:client secret' \
- '--cf-api-url=[the base API URL of your CF deployment]: :_urls' \
- '--cf-ca-cert=[CA Certificate]: :_files' \
- '--cf-skip-ssl-validation[skip SSL validation]' \
- '--github-client-id=[client id]:client ID' \
- '--github-client-secret=[client secret]:client secret' \
- '--github-host=[hostname of GitHub Enterprise deployment]: :_hosts' \
- '--github-ca-cert=[CA certificate of GitHub Enterprise deployment]: :_files' \
- '--gitlab-client-id=[client id]:client ID' \
- '--gitlab-client-secret=[client secret]:client secret' \
- '--gitlab-host=[hostname of Gitlab Enterprise deployment]: :_hosts' \
- '--ldap-display-name=[the auth provider name displayed to users on the login page]:display name' \
- '--ldap-host=[the host and optional port of the LDAP server]: :_hosts' \
- '--ldap-bind-dn=[bind DN for searching LDAP users and groups]:bind DN' \
- '--ldap-bind-pw=[bind Password for the user specified by bind-dn]:bind password' \
- '--ldap-insecure-no-ssl[required if LDAP host does not use TLS]' \
- '--ldap-insecure-skip-verify[skip certificate verification]' \
- '--ldap-start-tls[start on insecure port, then negotiate TLS]' \
- '--ldap-ca-cert=[CA certificate]: :_files' \
- '--ldap-user-search-base-dn= [baseDN to start the search from]:baseDN' \
- '--ldap-user-search-filter=[optional filter to apply when searching the directory]:filter' \
- '--ldap-user-search-username=[attribute to match against the inputted username]:attribute' \
- '--ldap-user-search-scope=[can either be: '\''sub'\'' - search the whole sub tree or '\''one'\'' - only search one level]:scope:((sub one))' \
- '--ldap-user-search-id-attr=[a mapping of attributes on the user entry to claims]:attribute mapping' \
- '--ldap-user-search-email-attr=[a mapping of attributes on the user entry to claims]:attribute mapping' \
- '--ldap-user-search-name-attr=[a mapping of attributes on the user entry to claims]:attribute mapping' \
- '--ldap-group-search-base-dn=[baseDN to start the search from]:baseDN' \
- '--ldap-group-search-filter=[optional filter to apply when searching the directory]:filter' \
- '--ldap-group-search-scope=[can either be: '\''sub'\'' - search the whole sub tree or '\''one'\'' - only search one level]:scope:((sub one))' \
- '--ldap-group-search-user-attr=[adds an additional requirement to the filter that an attribute in the group match the user'\''s attribute value]:attribute' \
- '--ldap-group-search-group-attr=[adds an additional requirement to the filter that an attribute in the group match the user'\''s attribute value]:attribute' \
- '--ldap-group-search-name-attr=[the attribute of the group that represents its name]:attribute' \
- '--oauth-display-name=[the auth provider name displayed to users on the login page]:display name' \
- '--oauth-client-id=[client id]:client ID' \
- '--oauth-client-secret=[client secret]:client secret' \
- '--oauth-auth-url=[Authorization URL]: :_urls' \
- '--oauth-token-url=[Token URL]: :_urls' \
- '--oauth-userinfo-url=[UserInfo URL]: :_urls' \
- '*--oauth-scope=[any additional scopes that need to be requested during authorization]:scope' \
- '--oauth-groups-key=[the groups key indicates which claim to use to map external groups to Concourse teams]:group key' \
- '--oauth-user-id-key=[the user id key indicates which claim to use to map an external user id to a Concourse user id]:id key' \
- '--oauth-user-name-key=[the user name key indicates which claim to use to map an external user name to a Concourse user name]:name key' \
- '--oauth-ca-cert=[CA Certificate]: :_files' \
- '--oauth-skip-ssl-validation[skip SSL validation]' \
- '--oidc-display-name=[the auth provider name displayed to users on the login page]:display name' \
- '--oidc-issuer=[An OIDC issuer URL that will be used to discover provider configuration]: :_urls' \
- '--oidc-client-id=[client id]:client ID' \
- '--oidc-client-secret=[client secret]:client secret' \
- '*--oidc-scope=[any additional scopes that need to be requested during authorization]:scope' \
- '--oidc-groups-key=[the groups key indicates which claim to use to map external groups to Concourse teams]:group key' \
- '--oidc-user-name-key=[the user name key indicates which claim to use to map an external user name to a Concourse user name]:user name key' \
- '*--oidc-hosted-domains=[list of whitelisted domains when using Google, only users from a listed domain will be allowed to log in]:domain' \
- '--oidc-ca-cert=[CA Certificate]: :_files' \
- '--oidc-skip-ssl-validation[skip SSL validation]' \
- '--tsa-log-level=[minimum level of logs to see]: :_concourse_log_levels' \
- '--tsa-bind-ip=[IP address on which to listen for SSH]: :_concourse_ip_addresses' \
- '--tsa-peer-address=[network address of this web node, reachable by other web nodes]: :_urls' \
- '--tsa-bind-port=[port on which to listen for SSH]: :_concourse_ports' \
- '--tsa-debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]: :_concourse_ip_addresses' \
- '--tsa-debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports' \
- '--tsa-host-key=[path to private key to use for the SSH server]: :_files' \
- '--tsa-authorized-keys=[path to file containing keys to authorize, in SSH authorized_keys format]: :_files' \
- '--tsa-team-authorized-keys=[path to file containing keys to authorize, in SSH authorized_keys format]: :_concourse_name_colon_paths' \
- '--tsa-atc-url=[ATC API endpoints to which workers will be registered]: :_urls' \
- '--tsa-session-signing-key=[path to private key to use when signing tokens in requests to the ATC during registration]: :_files' \
- '--tsa-heartbeat-interval=[interval on which to heartbeat workers to the ATC]: :_concourse_durations' \
+ $concourse_web_configurations[@] \
+ "--enable-lets-encrypt[automatically configure TLS certificate via Let's Encrypt/ACME]" \
+ "--lets-encrypt-acme-url=[URL of ACME CA directory endpoint]:url:_urls" \
+ $concourse_postgres_configurations[@] \
+ $concourse_credential_manager_configurations[@] \
+ '--signing-key-check-interval=[how often to check for outdated or expired signing keys(default: 10m)]: :_concourse_durations' \
+ '--signing-key-rotation-period=[after which time a new signing key for the idtoken secrets provider should be generated]: :_concourse_durations' \
+ '--signing-key-rotation-period=[how long a key should still be published after a new key has been generated]: :_concourse_durations' \
+ $concourse_container_placement_strategy_configurations[@] \
+ $concourse_metric_configurations[@] \
+ $concourse_tracing_configurations[@] \
+ $concourse_policy_check_agent_configurations[@] \
+ $concourse_web_server_configurations[@] \
+ $concourse_gc_configurations[@] \
+ $concourse_syslog_configurations[@] \
+ $concourse_authentication_configurations[@] \
+ $concourse_feature_flags[@] \
+ $concourse_tsa_configurations[@]
}
-(( $+functions[_concourse_worker_args] )) ||
-_concourse_worker_args() {
- _arguments -C \
+(( $+functions[_concourse_worker] )) ||
+_concourse_worker() {
+ _arguments \
'(- : *)'{-h,--help}'[display help information]' \
'--name=[the name to set for the worker during registration]:name' \
'*--tag=[a tag to set during registration]:tag' \
@@ -1396,18 +734,43 @@ _concourse_worker_args() {
'*--tsa-host=[TSA host to forward the worker through]: :_hosts' \
'--tsa-public-key=[file containing a public key to expect from the TSA]: :_files' \
'--tsa-worker-private-key=[file containing the private key to use when authenticating to the TSA]: :_files' \
- '--garden-use-houdini[use the insecure Houdini Garden backend]' \
- '--garden-bin=[path to gdn executable (or leave as gdn to find it in $PATH)]: :_files' \
+ '--runtime=[runtime to use with the worker(default: guardian)]:runtime:(guardian containerd houdini)' \
+ '--garden-bin=[path to gdn executable (or leave as gdn to find it in $PATH)]: :_path_commands' \
+ '--garden-request-timeout=[how long to wait for requests to the Garden server to complete]:time' \
'--garden-config=[path to a config file to use for Garden]: :_files' \
'--garden-dns-proxy-enable[enable proxy DNS server]' \
+ '--garden-network-pool=[network range to use for dynamically allocated container subnets]:range' \
+ '--garden-max-containers=[maximum container capacity for Garden]:limit' \
+ '--containerd-config=[path to a config file to use for the Containerd]:path:_files' \
+ '--containerd-bin=[path to a containerd executable]:command:_path_commands' \
+ '--containerd-init-bin=[path to an init executable]:init:_files' \
+ '--containerd-seccomp-profile=[path to a seccomp filter override]:filter:_files' \
+ '--containerd-oci-hooks-dir=[path to the oci hooks dir]:dir:_files -/' \
+ '--containerd-cni-plugins-dir=[path to CnI network plugins]:dir:_files -/' \
+ '--containerd-request-timeout=[how long to wait for requests to Containerd to complete]:timeout' \
+ '--containerd-max-containers=[max conatiner capacity for containerd]:limit' \
+ '--containerd-privileged-mode=[how many privileges privileged containers get]:type:(full fuse-only ignore)' \
+ "--containerd-external-ip=[IP address to use to reach container's mapped ports]:ip" \
+ '--containerd-dns-server=[DNS server IP address to use instead of automatically determined servers]:ip' \
+ '--containerd-additional-hosts=[additioanl entries to add to /etc/hosts in containers]:hosts' \
+ '--containerd-restricted-network=[network ranges to which traffic from containers will be restricted]:range' \
+ '--containerd-network-pool=[network range to use for dynamically allocated containers subnets]:range' \
+ '--containerd-mtu=[MTU size for container network interfaces]:size' \
+ "--containerd-allow-host-access[allow containers to reach the host's network]" \
+ '--containerd-dns-proxy-enable[enable proxy DNS server]' \
+ '--containerd-v6-enable[enable IPv6 networking]' \
+ '--containerd-v6-pool=[IPv6 network range to use for dynamically allocated container addresses]:range' \
+ '--containerd-v6-disable-masquerade[Masquerade container traffic with worker address]' \
'--baggageclaim-log-level=[minimum level of logs to see]: :_concourse_log_levels' \
'--baggageclaim-bind-ip=[IP address on which to listen for API traffic]: :_concourse_ip_addresses' \
'--baggageclaim-bind-port=[port on which to listen for API traffic]: :_concourse_ports' \
'--baggageclaim-debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]: :_concourse_ip_addresses' \
'--baggageclaim-debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports' \
+ '--baggageclaim-p2p-interface-name-pattern=[regular expression to match a network interface for p2p streaming]:pattern' \
+ '--baggageclaim-p2p-interface-family=[IPv4 or IPv6(default IPv4)]:type:(4 6)' \
'--baggageclaim-volumes=[directory in which to place volume data]: :_files -/' \
- '--baggageclaim-driver=[driver to use for managing volumes]:driver:((detect naive btrfs overlay))' \
- '--baggageclaim-btrfs-bin=[path to btrfs binary]: :_files' \
+ '--baggageclaim-driver=[driver to use for managing volumes]:driver:(detect naive btrfs overlay)' \
+ '--baggageclaim-btrfs-bin=[path to btrfs binary]: :_path_commands' \
'--baggageclaim-mkfs-bin=[path to mkfs.btrfs binary]: :_files' \
'--baggageclaim-overlays-dir=[path to directory in which to store overlay data]: :_files -/' \
'--baggageclaim-disable-user-namespaces[disable remapping of user/group IDs in unprivileged volumes]'
@@ -1502,11 +865,7 @@ _concourse_log_levels() {
_describe -t log-levels 'log level' levels
}
-case $service in
- concourse) _concourse_server "$@" ;;
- fly) _concourse_fly "$@" ;;
- *) _message "unknown command ${service}" && ret=1 ;;
-esac
+_concourse_server "$@"
# Local Variables:
# mode: Shell-Script
diff --git a/src/_console b/src/_console
deleted file mode 100644
index 3ed8dd7..0000000
--- a/src/_console
+++ /dev/null
@@ -1,72 +0,0 @@
-#compdef console
-# ------------------------------------------------------------------------------
-# Copyright (c) 2011 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 symfony console (https://github.com/symfony/Console).
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * loranger (https://github.com/loranger)
-# * Yohan Tamb«² (https://github.com/Cronos87)
-#
-# ------------------------------------------------------------------------------
-
-_console_find_console() {
- echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)"
-}
-
-_console_get_command_list() {
- IFS=" "
- `_console_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
-
-# 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
diff --git a/src/_emacs b/src/_emacs
index cba58eb..8ecd182 100644
--- a/src/_emacs
+++ b/src/_emacs
@@ -1,4 +1,4 @@
-#compdef emacs
+#compdef emacs emacsclient
# ------------------------------------------------------------------------------
# Copyright (c) 2022 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
@@ -35,67 +35,92 @@
#
# ------------------------------------------------------------------------------
-_arguments \
- '--batch[do not do interactive display, implies -q]' \
- '--chdir[change to directory]: :_files -/' \
- '(--daemon --bg-daemon --fg-daemon)--daemon[start a server in the background]' \
- '(--daemon --bg-daemon --fg-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]' \
- '--debug-init[enable Emacs Lisp debugger for init file]' \
- '(-d --display)'{-d,--display}'[use X server DISPLAY]:display' \
- '--module-assertions[assert behavior of dynamic modules]' \
- '--dump-file[read dumped state from 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]: :_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]: :_files' \
- '-x[same as -Q --script]' \
- '(-t --terminal)'{-t,--terminal}'[use DEVICE for terminal IO]: :_files' \
- '(-u --user)'{-u,--user}'[load ~USER/.emacs 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]' \
- '(-bg --border-color)'{-bg,--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'
+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]' \
+ '(-bg --border-color)'{-bg,--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
diff --git a/src/_emacsclient b/src/_emacsclient
deleted file mode 100644
index 47ef577..0000000
--- a/src/_emacsclient
+++ /dev/null
@@ -1,66 +0,0 @@
-#compdef 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 emacsclient 29
-# - https://www.gnu.org/software/emacs/manual/html_node/emacs/Invoking-emacsclient.html
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Shohei YOSHIDA (https://github.com/syohex)
-#
-# ------------------------------------------------------------------------------
-
-_arguments -s -n : \
- '(- *)'{-V,--version}'[Print version information and exit]' \
- '(- *)'{-H,--help}'[Print this usage information message and exit]' \
- '(-nw -t --tty)'{-nw,-t,--tty}'[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'
-
-# 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
diff --git a/src/_emulator b/src/_emulator
index 18ad13b..591ab09 100644
--- a/src/_emulator
+++ b/src/_emulator
@@ -3,7 +3,7 @@
# Description
# -----------
#
-# Completion script for emulator (Android Emulator) 12.0
+# Completion script for emulator (Android Emulator) 35.3.11.0
# (https://developer.android.com/studio/run/emulator-command).
#
# ------------------------------------------------------------------------------
@@ -14,119 +14,274 @@
#
# ------------------------------------------------------------------------------
+_emulator() {
+ typeset -A opt_args
+ local context state line curcontext="$curcontext"
+ local ret=1
-typeset -A opt_args
-local context state line curcontext="$curcontext"
+ local -a option_names=(
+ 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))
echo "${_avds[@]}"
}
-# 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 \
- '(- : *)-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
+_emulator "$@"
# Local Variables:
# mode: Shell-Script
diff --git a/src/_fleetctl b/src/_fleetctl
deleted file mode 100644
index 542d7cf..0000000
--- a/src/_fleetctl
+++ /dev/null
@@ -1,123 +0,0 @@
-#compdef fleetctl
-# ------------------------------------------------------------------------------
-# Copyright (c) 2009-2015 Robby Russell and contributors (see
-# https://github.com/ohmyzsh/ohmyzsh/graphs/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
diff --git a/src/_flutter b/src/_flutter
index 3ea5408..6b721b8 100644
--- a/src/_flutter
+++ b/src/_flutter
@@ -1073,6 +1073,7 @@ _flutter_pub_token() {
_arguments \
'(- *)'{-h,--help}'[Print this usage information]' \
&& ret=0
+ ;;
esac
;;
esac
diff --git a/src/_git-pulls b/src/_git-pulls
index 8dfc117..9778590 100644
--- a/src/_git-pulls
+++ b/src/_git-pulls
@@ -3,7 +3,7 @@
# 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
diff --git a/src/_google b/src/_google
deleted file mode 100644
index 4a5e567..0000000
--- a/src/_google
+++ /dev/null
@@ -1,94 +0,0 @@
-#compdef google
-# ------------------------------------------------------------------------------
-# 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 googlecl (https://code.google.com/p/googlecl/)
-#
-# Source: https://raw.github.com/dadrc/zsh-cfg/master/completions/_google
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * dadrc (https://github.com/dadrc)
-# * Ben O'Hara (https://github.com/benohara)
-#
-# ------------------------------------------------------------------------------
-
-_google() {
- # init variables
- local curcontext="$curcontext" state line
- typeset -A opt_args
-
- # init state
- _arguments \
- '1: :->service'\
- '2: :->task'
-
- case $state in
- service)
- _arguments '1:service:(picasa blogger youtube docs contacts calendar finance)'
- ;;
- *)
- 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:
-# mode: Shell-Script
-# sh-indentation: 2
-# indent-tabs-mode: nil
-# sh-basic-offset: 2
-# End:
-# vim: ft=zsh sw=2 ts=2 et
diff --git a/src/_jmeter b/src/_jmeter
index 4d7b01d..6a60aee 100644
--- a/src/_jmeter
+++ b/src/_jmeter
@@ -5,8 +5,6 @@
#
# Completion script for JMeter (https://jmeter.apache.org/).
#
-# Status: incomplete
-#
# ------------------------------------------------------------------------------
# Authors
# -------
@@ -15,7 +13,6 @@
#
# ------------------------------------------------------------------------------
-
_arguments \
'(- 1 *)--?[print command line options and exit]' \
'(- 1 *)'{-h,--help}'[print usage information and exit]' \
@@ -29,7 +26,6 @@ _arguments \
{-j,--jmeterlogfile}'[jmeter run file]: :_files -g "*.log"' \
{-n,--nongui}'[run JMeter in nongui mode]' \
{-s,--server}'[run the JMeter server]' \
- {-E,--proxyScheme}'[set a proxy scheme to use for the proxy server]:scheme' \
{-H,--proxyHost}'[set a proxy server for JMeter to use]: :_hosts' \
{-P,--proxyPort}'[set proxy server port for JMeter to use]:number' \
{-N,--nonProxyHosts}'[set non proxy host list]:host' \
@@ -45,7 +41,7 @@ _arguments \
{-R,--remotestart}'[start these remote servers (overrides remote_hosts)]:remote servers list' \
{-d,--homedir}'[the JMeter home directory to use]: :_files -/' \
{-X,--remoteexit}'[exit the remote servers at end of test (non-GUI)]' \
- {-g,--removeonly}'[generate report dashboard only, from a test results file]: :_files' \
+ {-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 -/'
diff --git a/src/_knife b/src/_knife
deleted file mode 100644
index 959668e..0000000
--- a/src/_knife
+++ /dev/null
@@ -1,324 +0,0 @@
-#compdef knife
-# ------------------------------------------------------------------------------
-# Copyright (c) 2009-2015 Robby Russell and contributors (see
-# https://github.com/ohmyzsh/ohmyzsh/graphs/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 Chef's knife (https://www.chef.io/).
-#
-# Source: https://github.com/ohmyzsh/ohmyzsh/blob/22fed4f/plugins/knife/_knife
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Frank Louwers (https://github.com/franklouwers)
-# * Mark Cornick (https://github.com/markcornick)
-#
-# ------------------------------------------------------------------------------
-
-
-# You can override the path to knife.rb and your cookbooks by setting
-# KNIFE_CONF_PATH=/path/to/my/.chef/knife.rb
-# KNIFE_COOKBOOK_PATH=/path/to/my/chef/cookbooks
-# If you want your local cookbooks path to be calculated relative to where you are then
-# set the below option
-# KNIFE_RELATIVE_PATH=true
-# Read around where these are used for more detail.
-
-# knife has a very special syntax, some example calls are:
-# knife status
-# knife cookbook list
-# knife role show ROLENAME
-# knife data bag show DATABAGNAME
-# knife role show ROLENAME --attribute ATTRIBUTENAME
-# knife cookbook show COOKBOOKNAME COOKBOOKVERSION recipes
-
-# The -Q switch in compadd allow for completions of things like "data bag" without having to go through two rounds of completion and avoids zsh inserting a \ for escaping spaces
-_knife() {
- # These flags should be available everywhere according to man knife
- local -a knife_general_flags; knife_general_flags=(--help --server-url --key --config --editor --format --log_level --logfile --no-editor --user --print-after --version --yes)
-
- local curcontext="$curcontext" state line
- typeset -A opt_args
- local -a cloudproviders; cloudproviders=(bluebox ec2 rackspace slicehost terremark)
- _arguments \
- '1: :->knifecmd' \
- '2: :->knifesubcmd' \
- '3: :->knifesubcmd2' \
- '4: :->knifesubcmd3' \
- '5: :->knifesubcmd4' \
- '6: :->knifesubcmd5'
-
- case $state in
- knifecmd)
- compadd -Q "$@" bootstrap client configure cookbook "cookbook site" "data bag" diff exec environment user index node recipe role search solo ssh status upload vault windows "$cloudproviders[@]"
- ;;
- knifesubcmd)
- case $words[2] in
- bluebox|ec2|rackspace|slicehost|terremark)
- compadd "$@" server images
- ;;
- client)
- compadd -Q "$@" "bulk delete" list create show delete edit reregister
- ;;
- configure)
- compadd "$@" client
- ;;
- cookbook)
- compadd -Q "$@" test list create download delete "metadata from" show "bulk delete" metadata upload
- ;;
- diff)
- _arguments '*:file or directory:_files -g "*"'
- ;;
- environment)
- compadd -Q "$@" list create delete edit show "from file"
- ;;
- user)
- compadd -Q "$@" create delete edit list reregister show
- ;;
- node)
- compadd -Q "$@" "from file" create show edit delete list run_list "bulk delete"
- ;;
- recipe)
- compadd "$@" list
- ;;
- role)
- compadd -Q "$@" "bulk delete" create delete edit "from file" list show
- ;;
- solo)
- compadd "$@" bootstrap clean cook init prepare
- ;;
- upload)
- _arguments '*:file or directory:_files -g "*"'
- ;;
- vault)
- compadd -Q "$@" create decrypt delete edit remove "rotate all keys" "rotate keys" show update
- ;;
- windows)
- compadd "$@" bootstrap
- ;;
- *)
- _arguments '2:Subsubcommands:($(_knife_options1))'
- ;;
- esac
- ;;
- knifesubcmd2)
- case $words[3] in
- server)
- compadd "$@" list create delete
- ;;
- images)
- compadd "$@" list
- ;;
- site)
- compadd "$@" vendor show share search download list unshare
- ;;
- show|delete|edit|update)
- _arguments '3:Subsubcommands:($(_knife_list_remote "$words[2]"))'
- ;;
- upload|test)
- _arguments '3:Subsubcommands:($(_call_function - "_knife_list_local_$words[2]s") --all)'
- ;;
- list)
- compadd -a "$@" knife_general_flags
- ;;
- bag)
- compadd -Q "$@" show edit list "from file" create delete
- ;;
- bootstrap|clean|cook|prepare)
- compadd "$@" nodes/*.json(N:t:r)
- ;;
- init)
- compadd "$@" ./*(/N:t)
- ;;
- *)
- _arguments '3:Subsubcommands:($(_knife_options2))'
- ;;
- esac
- ;;
- knifesubcmd3)
- case "$words[3]" in
- show)
- case "$words[2]" in
- cookbook)
- versioncomp=1
- _arguments '4:Cookbookversions:($(_knife_cookbook_versions) latest)'
- ;;
- node|client|role)
- compadd "$@" --attribute
- ;;
- vault)
- _arguments '4:Keys:($(_knife_list_remote "$words[2]" "$words[4]"))'
- ;;
- esac
- ;;
- update)
- case "$words[2]" in
- vault)
- _arguments '4:Keys:($(_knife_list_remote "$words[2]" "$words[4]"))'
- ;;
- esac
- ;;
- esac
- case "$words[4]" in
- show|edit)
- _arguments '4:Subsubsubcommands:($(_knife_list_remote "$words[2]" "$words[3]"))'
- ;;
- file)
- case "$words[2]" in
- environment)
- _arguments '*:files:_path_files -g "*.(rb|json)" -W "$(_knife_root)/environments"'
- ;;
- node)
- _arguments '*:files:_path_files -g "*.(rb|json)" -W "$(_knife_root)/nodes"'
- ;;
- role)
- _arguments '*:files:_path_files -g "*.(rb|json)" -W "$(_knife_root)/roles"'
- ;;
- *)
- _arguments '*:Subsubcommands:($(_knife_options3))'
- ;;
- esac
- ;;
- list)
- compadd -a "$@" knife_general_flags
- ;;
- *)
- _arguments '*:Subsubcommands:($(_knife_options3))'
- ;;
- esac
- ;;
- knifesubcmd4)
- if ((versioncomp > 0)); then
- compadd "$@" attributes definitions files libraries providers recipes resources templates
- else
- case "$words[5]" in
- file)
- _arguments '*:directory:_path_files -/ -W "$(_knife_root)/data_bags" -qS \ '
- ;;
- *) _arguments '*:Subsubcommands:($(_knife_options2))' ;;
- esac
- fi
- ;;
- knifesubcmd5)
- case "$words[5]" in
- file)
- _arguments '*:files:_path_files -g "*.json" -W "$(_knife_root)/data_bags/$words[6]"'
- ;;
- *)
- _arguments '*:Subsubcommands:($(_knife_options3))'
- ;;
- esac
- ;;
- esac
-}
-
-# Helper functions to provide the argument completion for several depths of commands
-_knife_options1() {
- local line
- for line in $(_call_program commands knife "$words[2]" --help | grep -v "^knife"); do
- echo $line | grep "\-\-"
- done
-}
-
-_knife_options2() {
- local line
- for line in $(_call_program commands knife "$words[2]" "$words[3]" --help | grep -v "^knife"); do
- echo $line | grep "\-\-"
- done
-}
-
-_knife_options3() {
- local line
- for line in $(_call_program commands knife "$words[2]" "$words[3]" "$words[4]" --help | grep -v "^knife"); do
- echo $line | grep "\-\-"
- done
-}
-
-# get a list of objects of type x on the server
-_knife_list_remote() {
- case "$*" in
- role|client|node|cookbook|"cookbook site"|"data bag"|environment|user|vault)
- _call_program commands knife "$@" list --format json \
- | grep \" \
- | awk '{print $1}' \
- | awk -F"," '{print $1}' \
- | awk -F"\"" '{print $2}'
- ;;
- "vault "*)
- _call_program commands knife vault show "$2" --format json \
- | grep \" \
- | awk '{print $1}' \
- | awk -F"," '{print $1}' \
- | awk -F"\"" '{print $2}'
- ;;
- esac
-}
-
-# The chef_x_local functions use the knife config to find the paths of relevant objects x to be uploaded to the server
-_knife_list_local_cookbooks() {
- if [ $KNIFE_RELATIVE_PATH ]; then
- local cookbook_path="$(_knife_root)/cookbooks"
- else
- local knife_rb="${KNIFE_CONF_PATH:-${HOME}/.chef/knife.rb}"
- if [ -f ./.chef/knife.rb ]; then
- knife_rb="./.chef/knife.rb"
- fi
- local cookbook_path="${KNIFE_COOKBOOK_PATH:-$(grep -s cookbook_path "$knife_rb" | awk 'BEGIN {FS = "[" }; {print $2}' | sed 's/\,//g' | sed "s/'//g" | sed 's/\(.*\)]/\1/' | cut -d '"' -f2)}"
- fi
-
- local i
- for i in $cookbook_path; do
- ls $i
- done
-}
-
-# This function extracts the available cookbook versions on the chef server
-_knife_cookbook_versions() {
- _call_program commands knife cookbook show "$words[4]" \
- | grep -v "$words[4]" \
- | grep -v -E '\]|\[|\{|\}' \
- | sed 's/ //g' \
- | sed 's/"//g'
-}
-
-# Searches up from current directory to find the closest folder that has a .chef folder
-# Useful for the knife upload/from file commands
-_knife_root() {
- local directory="$PWD"
- while [ $directory != '/' ]; do
- test -e "$directory/.chef" && echo "$directory" && return
- directory="${directory:h}"
- done
-}
-
-_knife "$@"
-
-# 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
diff --git a/src/_l3build b/src/_l3build
index 29d2d60..eb311e7 100644
--- a/src/_l3build
+++ b/src/_l3build
@@ -3,7 +3,7 @@
# Description
# -----------
#
-# Completion script for l3build (https://github.com/latex3/l3build/).
+# Completion script for l3build 2025-09-03 (https://github.com/latex3/l3build/).
# Modified from rejected https://github.com/latex3/l3build/pull/267
#
# ------------------------------------------------------------------------------
@@ -14,49 +14,60 @@
#
# ------------------------------------------------------------------------------
-__l3build() {
+_l3build_targets() {
local targets=(
- 'check:Run\ all\ automated\ tests'
- 'clean:Clean\ out\ directory\ tree'
- 'ctan:Create\ CTAN-ready\ archive'
- 'doc:Typesets\ all\ documentation\ files'
- 'install:Installs\ files\ into\ the\ local\ texmf\ tree'
- 'manifest:Creates\ a\ manifest\ file'
- 'save:Saves\ test\ validation\ log'
- 'tag:Updates\ release\ tags\ in\ files'
- 'uninstall:Uninstalls\ files\ from\ the\ local\ texmf\ tree'
- 'unpack:Unpacks\ the\ source\ files\ into\ the\ build\ tree'
- 'upload:Send\ archive\ to\ CTAN\ for\ public\ release'
+ 'check:Run all automated tests'
+ 'clean:Clean out directory tree'
+ 'ctan:Create CTAN-ready archive'
+ 'doc:Typesets all documentation files'
+ 'install:Installs files into the local texmf tree'
+ 'manifest:Creates a manifest file'
+ 'save:Saves test validation log'
+ 'tag:Updates release tags in files'
+ 'uninstall:Uninstalls files from the local texmf tree'
+ 'unpack:Unpacks the source files into the build tree'
+ 'upload:Send archive to CTAN for public release'
)
- local options=(
- {--config,-c}'[Sets the config(s) used for running tests]':lua_file:'_files -g "*.lua"'
- --date'[Sets the date to insert into sources]':
- --debug'[Runs target in debug mode]'
- --dirty'[Skip cleaning up the test area]'
- --dry-run'[Dry run for install or upload]'
- --email'[Email address of CTAN uploader]':
- {--engine,-e}'[Sets the engine(s) to use for running test]':engine:'(pdftex xetex luatex ptex uptex)'
- --epoch'[Sets the epoch for tests and typesetting]':
- {--file,-F}'[Take the upload announcement from the given file]':file:_files
- --first'[Name of first test to run]':
- {--force,-f}'[Force tests to run if engine is not set up]'
- --full'[Install all files]'
- {--halt-on-error,-H}'[Stops running tests after the first failure]'
- '(- : *)'{--help,-h}'[Print this message and exit]'
- --last'[Name of last test to run]':
- {--message,-m}'[Text for upload announcement message]':
- {--quiet,-q}'[Suppresses TeX output when unpacking]'
- --rerun'[Skip setup\: simply rerun tests]'
- --show-log-on-error'[Show the full log of the failure with '\''halt-on-error'\'']'
- {--show-saves,-S}'[Show the invocation to update failing .tlg files]'
- --shuffle'[Shuffle order of tests]'
- --texmfhome'[Location of user texmf tree]':
- '(- : *)'--version'[Print version information and exit]'
- )
- _arguments -s -S $options "1:target:(($targets))"
+
+ _describe -t targets 'target' targets "$@"
+}
+
+_l3build() {
+ local ret=1
+ local -a engines=(pdftex xetex luatex ptex uptex)
+
+ _arguments -s -S \
+ '(-c --config)'\*{-c,--config}'[Set the config(s) used for running tests]:lua_file:_files -g "*.(lua|tlg)"' \
+ '(-d --date)'{-d,--date}'[Set the date to insert into sources]:date' \
+ '--debug[Run target in debug mode]' \
+ '--dev[Use the development LaTex format]' \
+ '--dirty[Skip cleaning up the test area]' \
+ '--dry-run[Dry run for install or upload]' \
+ '--email[Email address of CTAN uploader]:email' \
+ '(-e --engine)'{--engine,-e}'[Set the engine(s) to use for running test]:engine:(($engines))' \
+ '--epoch[Sets the epoch for tests and typesetting]:epoch' \
+ '(-F --file)'{--file,-F}'[Take the upload announcement from the given file]:file:_files' \
+ '--first[Name of first test to run]:name' \
+ '--full[Install all files]' \
+ '(-H --halt-on-error)'{-H,--halt-on-error}'[Stops running tests after the first failure]' \
+ '(- : *)'{-h,--help}'[Print this message and exit]' \
+ '--last[Name of last test to run]:name' \
+ '(-m --message)'{-m,--message}'[Text for upload announcement message]:message' \
+ '(-q --quiet)'{-q,--quiet}'[Suppresses TeX output when unpacking]' \
+ '--rerun[Skip setup\: simply rerun tests]' \
+ '--show-log-on-error[Show the full log of the failure with "halt-on-error"]' \
+ '(-S --show-saves)'{-S,--show-saves}'[Show the invocation to update failing .tlg files]' \
+ '--shuffle[Shuffle order of tests]' \
+ '(-s --stdengine)'{-s,--stdengine}'[Run tests only with the standard engine]' \
+ '--texmfhome[Location of user texmf tree]:location:_files' \
+ '(- : *)--version[Print version information and exit]' \
+ "1:target:_l3build_targets" \
+ && ret=0
+
+ return ret
}
-__l3build
+_l3build "$@"
# Local Variables:
# mode: Shell-Script
diff --git a/src/_mussh b/src/_mussh
index d52cb40..2fe47b1 100644
--- a/src/_mussh
+++ b/src/_mussh
@@ -38,44 +38,32 @@
#
# ------------------------------------------------------------------------------
-local curcontext="$curcontext" state line ret=1
-typeset -A opt_args
-
-# TODO:
-# -i: admit more than one use
-# -d, -v, -t: control input
-# -m: Accept number (but also empty)
-# -h: Accept multiple hosts, also more than one use
-# -H: Accept multiple files, also more than one use
-
-_arguments -C \
- '--help[display this help message]' \
- '-V[print version info and exit]' \
- '-d[Verbose debug]:level (from 0 to 2)' \
- '-v[SSH debug level]:level (from 0 to 3)' \
- '-m[Run concurrently]' \
- '(-b -B)-b[Print each hosts output in a block without mingling with other hosts output]' \
- '(-b -B)-B[Allow hosts output to mingle. (default)]' \
+_arguments \
+ '(- *)--help[display this help message]' \
+ '-d-[Verbose debug]:level:(0 1 2)' \
+ '-v-[SSH debug levels]:level:(0 1 2 3)' \
+ '-m-[Run concurrently on the specified hosts at a time. "0" is used for infinite]:count' \
+ '-q[No output unless necessary]' \
+ '*-i[Load an identity file. May be used more than once]:identity:_files' \
+ '-o[Args to pass to ssh with -o option]:ssh-args' \
'(-a -A)-a[Force loading ssh-agent]' \
'(-a -A)-A[Do NOT load ssh-agent]' \
+ '(-b -B)-b[Print each hosts output in a block without mingling with other hosts output]' \
+ '(-b -B)-B[Allow hosts output to mingle. (default)]' \
'(-u -U)-u[Unique. Eliminate duplicate hosts. (default)]' \
'(-u -U)-U[Do NOT make host list unique]' \
'-P[Do NOT fall back to passwords on any host. This will skip hosts where keys fail]' \
- '-i[Load an identity file. May be used more than once]:identity' \
- '-o[Args to pass to ssh with -o option]:ssh-args' \
'(-l -L)-l[Use _login_ when no other is specified with the hostname]:login' \
'(-l -L)-L[Force use of _login_ on all hosts]:login' \
'-s[Path to shell on remote host]:shell' \
'-t[Timeout setting for each session]:timeout' \
- '-p[Host to use as proxy]:[user@]host' \
+ '(- *)-V[print version info and exit]' \
+ '-p[Host to use as proxy]:[user@]host:_hosts' \
'-po[Args to pass to ssh on proxy with -o option]:ssh-args' \
- '(-h -H)-h[Add a host to list of hosts]:[user@]host' \
- '(-h -H)-H[Add contents of file to list of hosts]:host file:_files' \
+ '*-h[Add a host to list of hosts]:user@host' \
+ '*-H[Add contents of file to list of hosts]:host file:_files' \
'(-c -C)-c[Add a command or quoted list of commands to list of commands to be executed on each host]:command' \
- '(-c -C)-C[Add file contents to list of commands to be executed on each host]:commands file:_files' \
- '(-q)-q[No output unless necessary]' && ret=0
-
-return ret
+ '(-c -C)-C[Add file contents to list of commands to be executed on each host]:commands file:_files'
# Local Variables:
# mode: Shell-Script
diff --git a/src/_networkQuality b/src/_networkQuality
index 136edd0..e278b3c 100644
--- a/src/_networkQuality
+++ b/src/_networkQuality
@@ -34,10 +34,10 @@
#
# ------------------------------------------------------------------------------
-_arguments \
+_arguments -s \
'-b[Show Bonjour advertised networkQuality servers]' \
'-B[Run against specified Bonjour instance]:name' \
- '-C[Use custom configuration URL or path]:url_or_path' \
+ '-C[Use custom configuration URL or path]:url_or_path:_urls' \
'-f[Force usage of a specific protocol selection]:option:(h1 h2 h3 L4S noL4S)' \
'-I[Bind test to interface]:interface:_net_interfaces' \
'-M[Maximum runtime in seconds]:seconds' \
diff --git a/src/_node b/src/_node
index b67807b..21a2ab8 100644
--- a/src/_node
+++ b/src/_node
@@ -69,182 +69,190 @@ _node_scripts() {
_describe 'scripts' scripts
}
-_arguments \
- '-[script read from stdin (default; interactive mode if a tty)]' \
- '--[indicate the end of node options]' \
- '--abort-on-uncaught-exception[aborting instead of exiting causes a core file to be generated for analysis]' \
- '--allow-addons[allow use of addons when any permissions are set]' \
- '--allow-child-process[allow use of child process when any permissions are set]' \
- '--allow-fs-read=[allow permissions to read the filesystem]: :_files' \
- '--allow-fs-write=[allow permissions to write in the filesystem]:_files' \
- '--allow-inspector[allow use of inspector when any permissions are set]' \
- '--allow-net[allow use of network when any permissions are set]' \
- '--allow-wasi[allow wasi when any permissions are set]' \
- '--allow-worker[allow worker threads when any permissions are set]' \
- '--build-snapshot[generate a snapshot blob when the process exits]' \
- '--build-snapshot-config=[generate a snapshot blob when the process exits using a JSON configuration in the specified path]:path:_files' \
- {-c,--check}'[syntax check script without executing]' \
- '--completion-bash[print source-able bash completion script]' \
- '*'{-C,--conditions=}'[additional user conditions for conditional exports and imports]:condition' \
- '--cpu-prof[Start the V8 CPU profiler on start up]' \
- '--cpu-prof-dir=[directory where the V8 profiles generated by --cpu-prof]:dir:_files -/' \
- '--cpu-prof-interval=[sampling interval in microseconds for the V8 CPU profiler]:number' \
- '--cpu-prof-name=[file name of the V8 profile generated with --cpu-prof]: :_files' \
- '--diagnostic-dir=[set dir for all output files(default: current working directory)]:dir:_files -/' \
- '--disable-proto=[disable Object.prototype.__proto__]:mode:(delete throw)' \
- '--disable-sigusr1[disable inspector thread to be listening for SIGUSR1 signal]' \
- '*--disable-warning=[silence specific process warnings]:warn type' \
- '--disable-wasm-trap-handler[disable trap-handler-based WebAssembly bound checks]' \
- '--disallow-code-generation-from-strings[disallow eval and friends]' \
- '--dns-result-order=[set default value of verbatim in dns.lookup]: :(ipv4first verbatim)' \
- '--enable-etw-stack-walking[provides heap data to ETW Windows native tracing]' \
- '--enable-fips[enable FIPS crypto at startup]' \
- '--enable-source-maps[source map support for stack traces]' \
- '--entry-url[treat the entrypoint as a URL]' \
- '*--env-file=[set environment variables from supplied file]:envfile:_files' \
- '*--env-file-if-exists=[set environment variables from supplied file if exists]:envfile:_files' \
- '(- 1 *)'{-e,--eval}'[evaluate script]:inline JavaScript' \
- '--experimental-addon-modules[enable experimental import support for addons]' \
- '--experimental-config-file=[set config file from supplied file]:file:_files' \
- '--experimental-default-config-file[set config file from default config file]' \
- '--experimental-eventsource[enable experimental EventSource API]' \
- '--experimental-import-meta-resolve[experimental ES Module import.meta.resolve() support]' \
- '--experimental-inspector-network-resource[experimental load network resources via the inspector]' \
- '(--loader --experimental-loader)'{--loader,--experimental-loader}'=[Specify the module of a custom ECMAScript Module loader]: :_files' \
- '--experimental-network-inspection[enable experimental network inspection support]' \
- '--experimental-print-required-tla[print pending top-level await]' \
- '--experimental-quic[experimental QUIC support]' \
- '--experimental-sea-config=[generate a blob that can be embedded into the single executable application]: :_files' \
- '--experimental-test-coverage[enable code coverage in the test runner]' \
- '--experimental-test-module-mocks[enable module mocking in the test runner]' \
- '--experimental-transform-types[enable transformation of TypeScript-onlysyntax into JavaScript code]' \
- '--experimental-vm-modules[experimental ES Module support in vm module]' \
- '--experimental-worker-inspection[experimental worker inspection support]' \
- '--expose-gc[expose gc extension]' \
- '--force-context-aware[disable loading non-context-aware addons]' \
- '--force-fips[force FIPS crypto]' \
- '--force-node-api-uncaught-exceptions-policy[enforces "uncaughtException" event on Node API asynchronous callbacks]' \
- '--frozen-intrinsics[experimental frozen intrinsics support]' \
- '--heap-prof[Start the V8 heap profiler on start up]' \
- '--heap-prof-dir=[Directory where the V8 profiles generated by --heap-prof]: :_files -/' \
- '--heap-prof-interval=[sampling interval in bytes for the V8 heap profile]: :number' \
- '--heap-prof-name=[file name of the V8 heap profile generated]: :_files' \
- '--heapsnapshot-near-heap-limit=[Generate heapsnapshots whenever V8 is approaching the heap limit]:limit' \
- '--heapsnapshot-signal=[Generate heap snapshot on specified signal]:signals:_signals -s' \
- '--icu-data-dir=[set ICU data load path to dir (overrides NODE_ICU_DATA) note: linked-in ICU data is present]: :_directories' \
- '--import=[ES module to preload]:module:_node_files' \
- '--input-type=[set module type for string input]:module type :(commonjs module)' \
- '--insecure-http-parser[Use an insecure HTTP parser that accepts invalid HTTP headers]' \
- '--inspect=-[activate inspector on host:port (default: 127.0.0.1:9229)]:host_port' \
- '--inspect-brk=-[activate inspector on host:port and break at start of user script]:host_port' \
- '(--debug-port --inspect-port)'{--debug-port,--inspect-port}'=[set host:port for inspector]:host_port' \
- '--inspect-publish-uid=[comma separated list of destinations for inspector uid]' \
- '--inspect-wait=-[activate inspector on host:port and wait for debugger to be attached]::host_port' \
- {-i,--interactive}'[always enter the REPL even if stdin does not appear to be a terminal]' \
- '--interpreted-frames-native-stack[help system profilers to translate JavaScript interpreted frames]' \
- '--jitless[Disable runtime allocation of executable memory]' \
- '--localstorage-file=[file used to persist localStorage data]:file:_files' \
- '--max-http-header-size=[set the maximum size of HTTP headers]: :number' \
- "--max-old-space-size-percentage=[set V8's max old space size as a percentage of available memory]:memory" \
- '--network-family-autoselection-attempt-timeout=[sets the default value for the network family autoselection attempt timeout]:timeout' \
- '--no-addons[disable loading native addons]' \
- '--no-async-context-frame[improve AsyncLocalStorage performance with AsyncContextFrame]' \
- '--no-deprecation[silence deprecation warnings]' \
- '--no-experimental-detect-module[when ambiguous modules fail to evaluate, try again to evaluate them as ES modules]' \
- '--no-experimental-global-navigator[expose experimental Navigator API on the global scope]' \
- '--no-experimental-repl-await[disable experimental await keyword support in REPL]' \
- '--no-experimental-require-module[allow loading synchronous ES Modules in require()]' \
- '--no-experimental-sqlite[disable experimental node sqlite module]' \
- '--no-experimental-strip-types[disable experimental type-stripping for TypeScript files]' \
- '--no-experimental-websocket[experimental WebSocket API (currently set)]' \
- '--no-extra-info-on-fatal-exception[hide extra information on fatal exception that causes exit]' \
- '--no-force-async-hooks-checks[disable checks for async_hooks]' \
- '--no-global-search-paths[disable global module search paths]' \
- '--no-network-family-autoselection[disable network address family autodetection algorithm]' \
- '--no-warnings[silence all process warnings]' \
- '--no-webstorage[disable Web Storage API]' \
- '--node-memory-debug[run with extra debug checks for memory leaks in Node.js itself]' \
- '--openssl-config=[load OpenSSL configuration from the specified file (overrides OPENSSL_CONF)]:file:_files' \
- '--openssl-legacy-provider[enable OpenSSL 3.0 legacy provider]' \
- '--openssl-shared-config[enable OpenSSL shared configuration]' \
- '--pending-deprecation[emit pending deprecation warnings]' \
- '--preserve-symlinks[preserve symbolic links when resolving]' \
- '--preserve-symlinks-main[preserve symbolic links when resolving the main module]' \
- '(- 1 *)'{-p,--print}'[evaluate script and print result]:inline JavaScript' \
- '--prof[generate V8 profiler output]' \
- '--prof-process[process V8 profiler output generated using --prof]' \
- '--redirect-warnings=[write warnings to file instead of stderr]: :_files' \
- '--report-compact[output compact single-line JSON]' \
- '--report-directory=[custom report path]: :_files -/' \
- '--report-exclude-network[exclude network interface diagnostics(default: false)]' \
- '--report-filename=[custom report file name]: :_files' \
- '--report-on-fatalerror[generate diagnostic report on fatal (internal) errors]' \
- '--report-on-signal=[generate diagnostic report upon receiving signals]' \
- '--report-signal=[causes diagnostic report to be produced on provided signal]:signals:_signals -s' \
- '--report-uncaught-exception[generate diagnostic report on uncaught exceptions]' \
- '*'{-r,--require}'[module to preload (option can be repeated)]: :_node_files' \
- '--run=[run a script specified in package.json]:script:_node_scripts' \
- '--secure-heap=[total size of the OpenSSL secure heap]: :number' \
- '--secure-heap-min=[minimum allocation size from the OpenSSL secure heap]' \
- '--snapshot-blob=[path to the snapshot blob that is used to restore the application state]:snapshot:_files' \
- '--test[launch test runner on startup]' \
- '--test-concurrency=[specify test runner concurrency]:concurrency' \
- '--test-coverage-branches=[the branch coverage minimum threshold]:threshold' \
- '--test-coverage-exclude=[exclude files from coverage report that match this glob pattern]:pattern' \
- '--test-coverage-functions=[the function coverage minimum threshold]:threshold' \
- '--test-coverage-include=[include files from coverage report that match this glob pattern]:pattern' \
- '--test-coverage-lines=[the line coverage minimum threshold]:threshold' \
- '--test-force-exit[force test runner to exit upon completion]' \
- '--test-global-setup=[specify the path to the global setup file]:file:_files' \
- '--test-isolation=[configurations the type of test isolation used in the test runner]:isolation' \
- '--test-name-pattern=[run tests whose name matches this regular expression]:pattern' \
- '--test-only[run tests with "only" option set]' \
- '*--test-reporter=[report test output using the given reporter]:reporter:(tap spec dot)' \
- '*--test-reporter-destination=[report given reporter to the given destination]:destination:_files' \
- '--test-rerun-failures=[specify the path to the rerun state file]:state file:_files' \
- '--test-shard=[run test at specific shard]:shard' \
- '--test-skip-pattern=[run tests whose name do not match this regular expression]' \
- '--test-timeout=[specify test runner timeout]' \
- '--test-update-snapshots[regenerate test snapshots]' \
- '--throw-deprecation[throw an exception on deprecations]' \
- '--title=[the process title to use on startup]:process title' \
- '--tls-cipher-list=[use an alternative default TLS cipher list]:cipher list string' \
- '--tls-keylog=[log TLS decryption keys to named file for traffic analysis]: :_files' \
- '(--tls-max-v1.3)--tls-max-v1.2[set default TLS maximum to TLSv1.2]' \
- '(--tls-max-v1.2)--tls-max-v1.3[set default TLS maximum to TLSv1.3]' \
- '(--tls-min-v1.1 --tls-min-v1.2 --tls-min-v1.3)--tls-min-v1.0[set default TLS minimum to TLSv1.0]' \
- '(--tls-min-v1.0 --tls-min-v1.2 --tls-min-v1.3)--tls-min-v1.1[set default TLS minimum to TLSv1.1]' \
- '(--tls-min-v1.0 --tls-min-v1.1 --tls-min-v1.3)--tls-min-v1.2[set default TLS minimum to TLSv1.2]' \
- '(--tls-max-v1.2 --tls-min-v1.0 --tls-min-v1.1 --tls-min-v1.2)--tls-min-v1.3[set default TLS minimum to TLSv1.3]' \
- '--trace-deprecation[show stack traces on deprecations]' \
- '--trace-env[print accesses to the environment variables]' \
- '--trace-env-js-stack[print accesses to the environment variables and the JavaScript stack trace]' \
- '--trace-env-native-stack[print accesses to the environment variables and the native stack trace ]' \
- '--trace-event-categories[comma separated list of trace event categories to record]: :{_values -s , categories node node.async_hooks node.bootstrap node.perf node.perf.usertiming node.perf.timerify node.fs.sync node.vm.script v8}' \
- '--trace-event-file-pattern[Template string specifying the filepath for the trace-events data, it supports ${rotation} and ${pid} log-rotation id. %2$u is the pid.]:template string' \
- '--trace-exit[show stack trace when an environment exits]' \
- '--trace-promises[show stack traces on promise initialization and resolution]' \
- '--trace-sigint[prints a stack trace on SIGINT]' \
- '--trace-sync-io[show stack trace when use of sync IO is detected after the first tick]' \
- '--trace-tls[prints TLS packet trace information to stderr]' \
- '--trace-uncaught[show stack traces for the throw behind uncaught exceptions]' \
- '--trace-warnings[show stack traces on process warnings]' \
- '--track-heap-objects[track heap object allocations for heap snapshots]' \
- '--unhandled-rejections=[define unhandled rejections behavior]:rejection behavior:(strict warn none)' \
- '--use-bundled-ca[use bundled CA store (default)]' \
- '--use-largepages=[re-map the Node.js static code to large memory pages at startup]:mode:(off on silent)' \
- "--use-openssl-ca[use OpenSSL's default CA store]" \
- "--use-system-ca[Use system's CA store]" \
- '(- 1 *)--v8-options[print v8 command line options]' \
- "--v8-pool-size=[set v8's thread pool size]:number" \
- "--watch[run in watch mode]" \
- '--watch-kill-signal=[kill signal to send to the process on watch mode restarts]:signal:_signals -s' \
- "--watch-path=[path to watch]: :_node_files" \
- '--watch-preserve-output[preserve outputs on watch mode restart]' \
- '--zero-fill-buffers[automatically zero-fill all newly allocated Buffer and SlowBuffer instances]' \
- '(- 1 *)'{-h,--help}'[print node command line options]' \
- '(- 1 *)'{-v,--version}'[print Node.js version]' \
- '*: :_node_args'
+_node() {
+ local ret=1
+
+ _arguments \
+ '-[script read from stdin (default; interactive mode if a tty)]' \
+ '--[indicate the end of node options]' \
+ '--abort-on-uncaught-exception[aborting instead of exiting causes a core file to be generated for analysis]' \
+ '--allow-addons[allow use of addons when any permissions are set]' \
+ '--allow-child-process[allow use of child process when any permissions are set]' \
+ '--allow-fs-read=[allow permissions to read the filesystem]: :_files' \
+ '--allow-fs-write=[allow permissions to write in the filesystem]:_files' \
+ '--allow-inspector[allow use of inspector when any permissions are set]' \
+ '--allow-net[allow use of network when any permissions are set]' \
+ '--allow-wasi[allow wasi when any permissions are set]' \
+ '--allow-worker[allow worker threads when any permissions are set]' \
+ '--build-snapshot[generate a snapshot blob when the process exits]' \
+ '--build-snapshot-config=[generate a snapshot blob when the process exits using a JSON configuration in the specified path]:path:_files' \
+ {-c,--check}'[syntax check script without executing]' \
+ '--completion-bash[print source-able bash completion script]' \
+ '*'{-C,--conditions=}'[additional user conditions for conditional exports and imports]:condition' \
+ '--cpu-prof[Start the V8 CPU profiler on start up]' \
+ '--cpu-prof-dir=[directory where the V8 profiles generated by --cpu-prof]:dir:_files -/' \
+ '--cpu-prof-interval=[sampling interval in microseconds for the V8 CPU profiler]:number' \
+ '--cpu-prof-name=[file name of the V8 profile generated with --cpu-prof]: :_files' \
+ '--diagnostic-dir=[set dir for all output files(default: current working directory)]:dir:_files -/' \
+ '--disable-proto=[disable Object.prototype.__proto__]:mode:(delete throw)' \
+ '--disable-sigusr1[disable inspector thread to be listening for SIGUSR1 signal]' \
+ '*--disable-warning=[silence specific process warnings]:warn type' \
+ '--disable-wasm-trap-handler[disable trap-handler-based WebAssembly bound checks]' \
+ '--disallow-code-generation-from-strings[disallow eval and friends]' \
+ '--dns-result-order=[set default value of verbatim in dns.lookup]: :(ipv4first verbatim)' \
+ '--enable-etw-stack-walking[provides heap data to ETW Windows native tracing]' \
+ '--enable-fips[enable FIPS crypto at startup]' \
+ '--enable-source-maps[source map support for stack traces]' \
+ '--entry-url[treat the entrypoint as a URL]' \
+ '*--env-file=[set environment variables from supplied file]:envfile:_files' \
+ '*--env-file-if-exists=[set environment variables from supplied file if exists]:envfile:_files' \
+ '(- 1 *)'{-e,--eval}'[evaluate script]:inline JavaScript' \
+ '--experimental-addon-modules[enable experimental import support for addons]' \
+ '--experimental-config-file=[set config file from supplied file]:file:_files' \
+ '--experimental-default-config-file[set config file from default config file]' \
+ '--experimental-eventsource[enable experimental EventSource API]' \
+ '--experimental-import-meta-resolve[experimental ES Module import.meta.resolve() support]' \
+ '--experimental-inspector-network-resource[experimental load network resources via the inspector]' \
+ '(--loader --experimental-loader)'{--loader,--experimental-loader}'=[Specify the module of a custom ECMAScript Module loader]: :_files' \
+ '--experimental-network-inspection[enable experimental network inspection support]' \
+ '--experimental-print-required-tla[print pending top-level await]' \
+ '--experimental-quic[experimental QUIC support]' \
+ '--experimental-sea-config=[generate a blob that can be embedded into the single executable application]: :_files' \
+ '--experimental-test-coverage[enable code coverage in the test runner]' \
+ '--experimental-test-module-mocks[enable module mocking in the test runner]' \
+ '--experimental-transform-types[enable transformation of TypeScript-onlysyntax into JavaScript code]' \
+ '--experimental-vm-modules[experimental ES Module support in vm module]' \
+ '--experimental-worker-inspection[experimental worker inspection support]' \
+ '--expose-gc[expose gc extension]' \
+ '--force-context-aware[disable loading non-context-aware addons]' \
+ '--force-fips[force FIPS crypto]' \
+ '--force-node-api-uncaught-exceptions-policy[enforces "uncaughtException" event on Node API asynchronous callbacks]' \
+ '--frozen-intrinsics[experimental frozen intrinsics support]' \
+ '--heap-prof[Start the V8 heap profiler on start up]' \
+ '--heap-prof-dir=[Directory where the V8 profiles generated by --heap-prof]: :_files -/' \
+ '--heap-prof-interval=[sampling interval in bytes for the V8 heap profile]: :number' \
+ '--heap-prof-name=[file name of the V8 heap profile generated]: :_files' \
+ '--heapsnapshot-near-heap-limit=[Generate heapsnapshots whenever V8 is approaching the heap limit]:limit' \
+ '--heapsnapshot-signal=[Generate heap snapshot on specified signal]:signals:_signals -s' \
+ '--icu-data-dir=[set ICU data load path to dir (overrides NODE_ICU_DATA) note: linked-in ICU data is present]: :_directories' \
+ '--import=[ES module to preload]:module:_node_files' \
+ '--input-type=[set module type for string input]:module type :(commonjs module)' \
+ '--insecure-http-parser[Use an insecure HTTP parser that accepts invalid HTTP headers]' \
+ '--inspect=-[activate inspector on host:port (default: 127.0.0.1:9229)]:host_port' \
+ '--inspect-brk=-[activate inspector on host:port and break at start of user script]:host_port' \
+ '(--debug-port --inspect-port)'{--debug-port,--inspect-port}'=[set host:port for inspector]:host_port' \
+ '--inspect-publish-uid=[comma separated list of destinations for inspector uid]' \
+ '--inspect-wait=-[activate inspector on host:port and wait for debugger to be attached]::host_port' \
+ {-i,--interactive}'[always enter the REPL even if stdin does not appear to be a terminal]' \
+ '--interpreted-frames-native-stack[help system profilers to translate JavaScript interpreted frames]' \
+ '--jitless[Disable runtime allocation of executable memory]' \
+ '--localstorage-file=[file used to persist localStorage data]:file:_files' \
+ '--max-http-header-size=[set the maximum size of HTTP headers]: :number' \
+ "--max-old-space-size-percentage=[set V8's max old space size as a percentage of available memory]:memory" \
+ '--network-family-autoselection-attempt-timeout=[sets the default value for the network family autoselection attempt timeout]:timeout' \
+ '--no-addons[disable loading native addons]' \
+ '--no-async-context-frame[improve AsyncLocalStorage performance with AsyncContextFrame]' \
+ '--no-deprecation[silence deprecation warnings]' \
+ '--no-experimental-detect-module[when ambiguous modules fail to evaluate, try again to evaluate them as ES modules]' \
+ '--no-experimental-global-navigator[expose experimental Navigator API on the global scope]' \
+ '--no-experimental-repl-await[disable experimental await keyword support in REPL]' \
+ '--no-experimental-require-module[allow loading synchronous ES Modules in require()]' \
+ '--no-experimental-sqlite[disable experimental node sqlite module]' \
+ '--no-experimental-strip-types[disable experimental type-stripping for TypeScript files]' \
+ '--no-experimental-websocket[experimental WebSocket API (currently set)]' \
+ '--no-extra-info-on-fatal-exception[hide extra information on fatal exception that causes exit]' \
+ '--no-force-async-hooks-checks[disable checks for async_hooks]' \
+ '--no-global-search-paths[disable global module search paths]' \
+ '--no-network-family-autoselection[disable network address family autodetection algorithm]' \
+ '--no-warnings[silence all process warnings]' \
+ '--no-webstorage[disable Web Storage API]' \
+ '--node-memory-debug[run with extra debug checks for memory leaks in Node.js itself]' \
+ '--openssl-config=[load OpenSSL configuration from the specified file (overrides OPENSSL_CONF)]:file:_files' \
+ '--openssl-legacy-provider[enable OpenSSL 3.0 legacy provider]' \
+ '--openssl-shared-config[enable OpenSSL shared configuration]' \
+ '--pending-deprecation[emit pending deprecation warnings]' \
+ '--preserve-symlinks[preserve symbolic links when resolving]' \
+ '--preserve-symlinks-main[preserve symbolic links when resolving the main module]' \
+ '(- 1 *)'{-p,--print}'[evaluate script and print result]:inline JavaScript' \
+ '--prof[generate V8 profiler output]' \
+ '--prof-process[process V8 profiler output generated using --prof]' \
+ '--redirect-warnings=[write warnings to file instead of stderr]: :_files' \
+ '--report-compact[output compact single-line JSON]' \
+ '--report-directory=[custom report path]: :_files -/' \
+ '--report-exclude-network[exclude network interface diagnostics(default: false)]' \
+ '--report-filename=[custom report file name]: :_files' \
+ '--report-on-fatalerror[generate diagnostic report on fatal (internal) errors]' \
+ '--report-on-signal=[generate diagnostic report upon receiving signals]' \
+ '--report-signal=[causes diagnostic report to be produced on provided signal]:signals:_signals -s' \
+ '--report-uncaught-exception[generate diagnostic report on uncaught exceptions]' \
+ '*'{-r,--require}'[module to preload (option can be repeated)]: :_node_files' \
+ '--run=[run a script specified in package.json]:script:_node_scripts' \
+ '--secure-heap=[total size of the OpenSSL secure heap]: :number' \
+ '--secure-heap-min=[minimum allocation size from the OpenSSL secure heap]' \
+ '--snapshot-blob=[path to the snapshot blob that is used to restore the application state]:snapshot:_files' \
+ '--test[launch test runner on startup]' \
+ '--test-concurrency=[specify test runner concurrency]:concurrency' \
+ '--test-coverage-branches=[the branch coverage minimum threshold]:threshold' \
+ '--test-coverage-exclude=[exclude files from coverage report that match this glob pattern]:pattern' \
+ '--test-coverage-functions=[the function coverage minimum threshold]:threshold' \
+ '--test-coverage-include=[include files from coverage report that match this glob pattern]:pattern' \
+ '--test-coverage-lines=[the line coverage minimum threshold]:threshold' \
+ '--test-force-exit[force test runner to exit upon completion]' \
+ '--test-global-setup=[specify the path to the global setup file]:file:_files' \
+ '--test-isolation=[configurations the type of test isolation used in the test runner]:isolation' \
+ '--test-name-pattern=[run tests whose name matches this regular expression]:pattern' \
+ '--test-only[run tests with "only" option set]' \
+ '*--test-reporter=[report test output using the given reporter]:reporter:(tap spec dot)' \
+ '*--test-reporter-destination=[report given reporter to the given destination]:destination:_files' \
+ '--test-rerun-failures=[specify the path to the rerun state file]:state file:_files' \
+ '--test-shard=[run test at specific shard]:shard' \
+ '--test-skip-pattern=[run tests whose name do not match this regular expression]' \
+ '--test-timeout=[specify test runner timeout]' \
+ '--test-update-snapshots[regenerate test snapshots]' \
+ '--throw-deprecation[throw an exception on deprecations]' \
+ '--title=[the process title to use on startup]:process title' \
+ '--tls-cipher-list=[use an alternative default TLS cipher list]:cipher list string' \
+ '--tls-keylog=[log TLS decryption keys to named file for traffic analysis]: :_files' \
+ '(--tls-max-v1.3)--tls-max-v1.2[set default TLS maximum to TLSv1.2]' \
+ '(--tls-max-v1.2)--tls-max-v1.3[set default TLS maximum to TLSv1.3]' \
+ '(--tls-min-v1.1 --tls-min-v1.2 --tls-min-v1.3)--tls-min-v1.0[set default TLS minimum to TLSv1.0]' \
+ '(--tls-min-v1.0 --tls-min-v1.2 --tls-min-v1.3)--tls-min-v1.1[set default TLS minimum to TLSv1.1]' \
+ '(--tls-min-v1.0 --tls-min-v1.1 --tls-min-v1.3)--tls-min-v1.2[set default TLS minimum to TLSv1.2]' \
+ '(--tls-max-v1.2 --tls-min-v1.0 --tls-min-v1.1 --tls-min-v1.2)--tls-min-v1.3[set default TLS minimum to TLSv1.3]' \
+ '--trace-deprecation[show stack traces on deprecations]' \
+ '--trace-env[print accesses to the environment variables]' \
+ '--trace-env-js-stack[print accesses to the environment variables and the JavaScript stack trace]' \
+ '--trace-env-native-stack[print accesses to the environment variables and the native stack trace ]' \
+ '--trace-event-categories[comma separated list of trace event categories to record]: :{_values -s , categories node node.async_hooks node.bootstrap node.perf node.perf.usertiming node.perf.timerify node.fs.sync node.vm.script v8}' \
+ '--trace-event-file-pattern[Template string specifying the filepath for the trace-events data, it supports ${rotation} and ${pid} log-rotation id. %2$u is the pid.]:template string' \
+ '--trace-exit[show stack trace when an environment exits]' \
+ '--trace-promises[show stack traces on promise initialization and resolution]' \
+ '--trace-sigint[prints a stack trace on SIGINT]' \
+ '--trace-sync-io[show stack trace when use of sync IO is detected after the first tick]' \
+ '--trace-tls[prints TLS packet trace information to stderr]' \
+ '--trace-uncaught[show stack traces for the throw behind uncaught exceptions]' \
+ '--trace-warnings[show stack traces on process warnings]' \
+ '--track-heap-objects[track heap object allocations for heap snapshots]' \
+ '--unhandled-rejections=[define unhandled rejections behavior]:rejection behavior:(strict warn none)' \
+ '--use-bundled-ca[use bundled CA store (default)]' \
+ '--use-largepages=[re-map the Node.js static code to large memory pages at startup]:mode:(off on silent)' \
+ "--use-openssl-ca[use OpenSSL's default CA store]" \
+ "--use-system-ca[Use system's CA store]" \
+ '(- 1 *)--v8-options[print v8 command line options]' \
+ "--v8-pool-size=[set v8's thread pool size]:number" \
+ "--watch[run in watch mode]" \
+ '--watch-kill-signal=[kill signal to send to the process on watch mode restarts]:signal:_signals -s' \
+ "--watch-path=[path to watch]: :_node_files" \
+ '--watch-preserve-output[preserve outputs on watch mode restart]' \
+ '--zero-fill-buffers[automatically zero-fill all newly allocated Buffer and SlowBuffer instances]' \
+ '(- 1 *)'{-h,--help}'[print node command line options]' \
+ '(- 1 *)'{-v,--version}'[print Node.js version]' \
+ '*: :_node_args' && ret=0
+
+ return ret
+}
+
+_node "$@"
# Local Variables:
# mode: Shell-Script
diff --git a/src/_openssl b/src/_openssl
index 9e93be0..94b734e 100644
--- a/src/_openssl
+++ b/src/_openssl
@@ -25,1515 +25,2358 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
-
-# openssl command [ command_opts ] [ command_args ]
+# Description
+# -----------
+#
+# Completion script for OpenSSL 3.5.3 (https://www.openssl-library.org/)
+#
+# ------------------------------------------------------------------------------
+# Authors
+# -------
+#
+# * Aaron Schrab <aaron@schrab.com>
+# * Dimitris Apostolou <dimitris.apostolou@icloud.com>
+# * Shohei Yoshida <https://github.com/syohex/>
+#
+# ------------------------------------------------------------------------------
_openssl() {
- local openssl_commands cmd cmds
- if [[ "$CURRENT" -lt 2 ]]; then
- # I do not think this can happen...
- return
- elif [[ "$CURRENT" -eq 2 ]]; then
- # first parameter, the command
- openssl_commands=(${(z)${${(f)"$(openssl help 2>&1)"}:#([A-Z]|openssl:Error:)*}})
- _describe 'openssl commands' openssl_commands
- else
- # $CURRENT -gt 2
- cmd="${words[2]}"
- # Note: we could use ${(k)functions} to get a list of all functions and
- # filter those that start with _openssl_
- # but that would mean defining a new function *somewhere* might mess with
- # the completion...
- cmds=(asn1parse ca ciphers cms crl crl2pkcs7 dgst dh dhparam dsa dsaparam \
- ec ecparam enc engine errstr gendh gendsa genpkey genrsa nseq ocsp \
- passwd pkcs12 pkcs7 pkcs8 pkey pkeyparam pkeyutl prime rand req rsa \
- rsautl s_client s_server s_time sess_id smime speed spkac srp ts \
- verify version x509)
- # check if $cmd is in $cmds, the list of supported commands
- if [[ "${cmds[(r)$cmd]}" == "${cmd}" ]]; then
- # we should be able to complete $cmd
- # run _openssl_$cmd with the remaining words from the command line
- shift words
- (( CURRENT-- ))
- _openssl_${cmd}
- elif [[ ${${=${"$(openssl help 2>&1)"/*Cipher commands[^)]#)/}}[(re)$cmd]} == "$cmd" ]]; then
- # $cmd is a cipher command, which is practically an alias to enc
- shift words
- (( CURRENT-- ))
- _openssl_enc
- elif [[ ${${=${${"$(openssl help 2>&1)"%%Cipher commands*}/*Message Digest commands[^)]#)/}}[(re)$cmd]} == "$cmd" ]]; then
- # $cmd is a message digest command, which is practically an alias to dgst
- shift words
- (( CURRENT-- ))
- _openssl_dgst
- fi
- fi
+ typeset -A opt_args
+ local context state line
+ local curcontext="$curcontext"
+ local ret=1
+
+ local -a openssl_tls_flags=(
+ '-ssl3[enable SSL3 protocol]'
+ '-no_ssl3[disable SSL3 protocol]'
+ '-tls1[enable TLS1 protocol]'
+ '-no_tls1[disable TLS1 protocol]'
+ '-tls1_1[enable TLS1.1 protocol]'
+ '-no_tls1_1[disable TLS1.1 protocol]'
+ '-tls1_2[enable TLS1.2 protocol]'
+ '-no_tls1_2[disable TLS1.2 protocol]'
+ '-tls1_3[enable TLS1.3 protocol]'
+ '-no_tls1_3[disable TLS1.3 protocol]'
+ )
+
+ local -a openssl_dtls_flags=(
+ '-dtls[use DTLS instead of TLS]'
+ '-dtls1[use DTLS1 instead of TLS]'
+ '-dtls2[use DTLS2 instead of TLS]'
+ )
+
+ local -a openssl_extended_verification_flags=(
+ '-xkey[extra private key file]:file:_files'
+ '-xcert[extra certificate file]:file:_files'
+ '-xchain[extra certificate chain file]:file:_files'
+ '-xchain_build[build the certificate chain for the extra certificates]'
+ '-xcertform[extra certificate format]:format[DER PEM P12]'
+ )
+
+ local -a openssl_supported_commands_flags=(
+ '-bugs[set various bug workarounds]'
+ '(-comp -no_comp)-no_comp[disable support for SSL/TLS compression]'
+ '(-comp -no_comp)-comp[enable support for SSL/TLS compression]'
+ '-no_ticket[disable support for session tickets]'
+ '-serverpref[use server and not client preference order when determining cipher suite]'
+ '-client_renegotiation[allow servers to accept client-initiated renegotiation]'
+ '-legacy_renegotiation[permit the use of unsafe legacy renegotiation]'
+ '-no_renegotiation[disable all attempts at renegotiation in (D)TLSv1.2 and earlier]'
+ '-no_resumption_on_reneg[set SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION]'
+ '(-legacy_server_connect -no_legacy_server_connect)-legacy_server_connect[permit unsafe legacy renegotiation]'
+ '(-legacy_server_connect -no_legacy_server_connect)-no_legacy_server_connect[prohibit unsafe legacy renegotiation]'
+ '-prioritize_chacha[prioritize ChaCha ciphers when the client has a ChaCha20 cipher]'
+ '-allow_no_dhe_kex[allow a non-(ec)dhe based key exchange mode on resumption]'
+ '-strict[enable strict mode protocol handling]'
+ '-sigalgs[set signature algorithms for TLSv1.2 and TLSv1.3]:alg:_openssl_signature_algorithms'
+ '-client_sigalgs[set signature algorithms for client authentication for TLSv1.2 and TLSv1.3]:alg:_openssl_signature_algorithms'
+ '-groups[set the supported groups(colon separated NIST name or OpenSSL OID name)]:groups:_openssl_groups'
+ '-curves[set the curves groups]:groups:_openssl_groups'
+ '-named_curve[set the temporary curve for ephemeral ECDH modes]:curve'
+ '-cipher[set the TLSv1.2 and below ciphersuite list to ciphers]:ciphers'
+ '-ciphersuites[set the available ciphersuites for TLSv1.3]:ciphers'
+ '-min_protocol[minimum supported protocol]:protocol:_openssl_tls_protocols'
+ '-max_protocol[maximum supported protocol]:protocol:_openssl_tls_protocols'
+ '-record_padding[padding length for TLSv1.3 records]:padding'
+ '-no_middlebox[turn of middlebox compatibility]'
+ )
+
+ local -a openssl_provider_options=(
+ '-provider[provider ID to be loaded and initialized]:provider'
+ '-provider-path[search path that is to be used for looking for providers]:path:_files -/'
+ '*-provparam[configuration parameter key to value val in provider name]:key_value'
+ '-propquery[property query clause to be used when fetching algorithms from the loaded providers]:query'
+ )
+
+ local -a openssl_trusted_certificate_options=(
+ '-CAfile[load the specified file which contains a certificate or several of them]:file:_files'
+ '-no-CAfile[do not load the default file of trusted certificates]'
+ '-CApath[directory as a collection of trusted certificates]:dir:_files -/'
+ '-no-CApath[do not use the default directory of trusted certificates]'
+ '-CAstore[URI as a store of CA certificates]:uri'
+ '-no-CAstore[do not use the default store of trusted CA certificates]'
+ )
+
+ local -a openssl_random_state_options=(
+ '-rand[file containing random data used to seed the random number generator]:file:_files'
+ '-writerand[file to be written the seed data]:file:_files'
+ )
+
+ local -a openssl_verification_options=(
+ '-allow_proxy_certs[allow the verification of proxy certificates]'
+ '-attime[perform validation checks using time specified by timestamp and not current system time]:time'
+ '-no_check_time[suppresses checking the validity period of certificates and CRLs against the current time]'
+ '-check_ss_sig[verify the signature of the last certificate in a chain if the certificate is supposedly self-signed]'
+ '-crl_check[checks end entity certificate validity by attempting to look up a valid CRL]'
+ '-crl_check_all[checks the validity of all certificates in the chain by attempting to look up valid CRL]'
+ '-explicit_policy[set policy variable require-explicit-policy]'
+ '-extended_crl[enable extended CRL features]'
+ '-ignore_critical[ignore critical extensions]'
+ '-inhibit_any[set policy variable inhibit-any-policy]'
+ '-inhibit_map[set policy variable inhibit-policy-mapping]'
+ '-partial_chain[allow verification to succeed if an incomplete chain can be built]'
+ '-policy[enable policy processing and add arg to the user-initial-policy-set]:policy'
+ '-policy_check[enables certificate policy processing]'
+ '-policy_print[print out diagnostics related to policy processing]'
+ '-purpose[a high-level specification of the intended use of the target certificate]:purpose'
+ '-suiteB_128[enable the Suite B mode operation at 128 bit Level of Security]'
+ '-suiteB_128_only[enable only the Suite B mode operation at 128 bit Level of Security]'
+ '-suiteB_192[enable the Suite B mode operation at 192 bit Level of Security]'
+ '-use_deltas[enable support for delta CRLs]'
+ '-auth_level[set the certificate chain authentication security level]:level'
+ '-verify_depth[limit the certificate chain to num intermediate CA certificates]:depth'
+ '-verify_email[verify the email address in Subject Alternative Name or the email]:email'
+ '-verify_hostname[verify hostname in Subject Alternative Name or Common Name]:hostname'
+ '-verify_ip[verify IP addresses in Subject Alternative Name of the subject certificate]:ip'
+ '-x509_strict[disables non-compliant workarounds for broken certificates]'
+ )
+
+ _arguments -C -A "-*" \
+ '(- *)-help[show help]' \
+ '(- *)-version[show version]' \
+ '1: :_openssl_subcommands' \
+ '*::arg:->args' \
+ && ret=0
+
+ case "$state" in
+ (args)
+ local subcmd=${words[1]}
+ if (( $+functions[_openssl_${subcmd}] )); then
+ _openssl_${subcmd} && ret=0
+ else
+ local -a cipher_flags=($(openssl enc -list | tail -n +2 ))
+ local -a ciphers=()
+ for flag in $cipher_flags[@]
+ do
+ ciphers+=(${flag:1})
+ done
+
+ if (( $ciphers[(I)$subcmd] )); then
+ _openssl_enc 1 && ret=0
+ else
+ local -a digest_flags=($(openssl dgst -list | tail -n +2 ))
+ local -a digests=()
+ for flag in $digest_flags[@]
+ do
+ digests+=(${flag:1})
+ done
+
+ if (( $digests[(I)$subcmd] )); then
+ _openssl_dgst 1 && ret=0
+ fi
+ fi
+ fi
+
+ ;;
+ esac
+
+ return ret
}
+_openssl_subcommands() {
+ local -a commands=(
+ 'asn1parse:Parse an ASN.1 sequence'
+ 'ca:Certificate Authority Management'
+ 'ciphers:Cipher Suite Description Determination'
+ 'cmp:Certificate Management Protocol(CMP) application'
+ 'cms:Cryptographic Message Syntax command'
+ 'crl:Certificate Revocation List Management'
+ 'crl2pkcs7:CRL to PKCS#7 Conversion'
+ 'dgst:Message Digest calculation'
+ 'dhparam: Generation and Management of Diffie-Hellman Parameters'
+ 'dsa: DSA Data Management'
+ 'dsaparam:DSA Parameter Generation and Management'
+ 'ec:Elliptic curve key processing'
+ 'ecparam:EC parameter manipulation and generation'
+ 'enc:Encryption, decryption, and encoding'
+ 'engine:Engine (loadable module) information and manipulation'
+ 'errstr:Error Number to Error String Conversion'
+ 'fipsinstall:FIPS configuration installation'
+ 'gendsa:Generation of DSA Private Key from Parameters'
+ 'genpkey:Generation of Private Key or Parameters'
+ 'genrsa:Generation of RSA Private Key'
+ "help:Display information about a command's options"
+ 'info:Display diverse information built into the OpenSSL libraries'
+ 'list:List algorithms and features'
+ 'mac:Message Authentication Code Calculation'
+ 'nseq:Create or examine a Netscape certificate sequence'
+ 'ocsp:Online Certificate Status Protocol command'
+ 'passwd:Generation of hashed passwords'
+ 'pkcs12:PKCS#12 Data Management'
+ 'pkcs7:PKCS#7 Data Management'
+ 'pkcs8:PKCS#8 format private key conversion command'
+ 'pkey:Public and private key management'
+ 'pkeyparam:Public key algorithm parameter management'
+ 'pkeyutl:Public key algorithm cryptographic operation command'
+ 'prime:Compute prime numbers'
+ 'rand:Generate pseudo-random bytes'
+ 'rehash:Create symbolic links to certificate and CRL files named by the hash values'
+ 'req:PKCS#10 X.509 Certificate Signing Request Management'
+ 'rsautl:RSA command for signing, verification, encryption, and decryption'
+ 's_client:SSL/TLS client program'
+ 's_server:SSL/TLS server program'
+ 's_time:SSL Connection Timer'
+ 'sess_id:SSL Session Data Management'
+ 'smime:S/MIME mail processing'
+ 'speed:Algorithm Speed Measurement'
+ 'spkac:SPKAC printing and generating command'
+ 'srp:Maintain SRP password file(deprecated)'
+ 'storeutl:Command to list and display certificates, keys, CRLs, etc'
+ 'ts:Time Stamping Authority command'
+ 'verify:X.509 Certificate Verification'
+ 'version:OpenSSL Version Information'
+ 'x509:X.509 Certificate Data Management'
+
+ # Message Digest Commands
+ 'blake2b512:BLAKE2b-512 Digest'
+ 'blake2s256:BLAKE2s-256 Digest'
+ 'md2:MD2 Digest'
+ 'md4:MD4 Digest'
+ 'md5:MD5 Digest'
+ 'mdc2:MDC2 Digest'
+ 'rmd160:RMD-160 Digest'
+ 'sha1:SHA-1 Digest'
+ 'sha224:SHA-2 224 Digest'
+ 'sha256:SHA-2 256 Digest'
+ 'sha384:SHA-2 384 Digest'
+ 'sha512:SHA-2 512 Digest'
+ 'sha3-224:SHA-3 224 Digest'
+ 'sha3-256:SHA-3 256 Digest'
+ 'sha3-384:SHA-3 384 Digest'
+ 'sha3-512:SHA-3 512 Digest'
+ 'keccak-224:KECCAK 224 Digest'
+ 'keccak-256:KECCAK 256 Digest'
+ 'keccak-384:KECCAK 384 Digest'
+ 'keccak-512:KECCAK 512 Digest'
+ 'shake128:SHA-3 SHAKE128 Digest'
+ 'shake256:SHA-3 SHAKE256 Digest'
+ 'sm3:SM3 Digest'
+
+ # Encryption, Decryption, and Encoding Commands
+ 'aes128:AES-128 Cipher'
+ 'aes-128-cbc:AES-128 CBC Cipher'
+ 'aes-128-cfb:AES-128 CFB Cipher'
+ 'aes-128-ctr:AES-128 CTR Cipher'
+ 'aes-128-ecb:AES-128 ECB Cipher'
+ 'aes-128-ofb:AES-128 OFB Cipher'
+ 'aes192:AES-192 Cipher'
+ 'aes-192-cbc:AES-192 CBC Cipher'
+ 'aes-192-cfb:AES-192 CFB Cipher'
+ 'aes-192-ctr:AES-192 CTR Cipher'
+ 'aes-192-ecb:AES-192 ECB Cipher'
+ 'aes-192-ofb:AES-192 OFB Cipher'
+ 'aes256:AES-256 Cipher'
+ 'aes-256-cbc:AES-256 CBC Cipher'
+ 'aes-256-cfb:AES-256 CFB Cipher'
+ 'aes-256-ctr:AES-256 CTR Cipher'
+ 'aes-256-ecb:AES-256 ECB Cipher'
+ 'aes-256-ofb:AES-256 OFB Cipher'
+
+ 'aria128:Aria-128 Cipher'
+ 'aria-128-cbc:Aria-128 CBC Cipher'
+ 'aria-128-cfb:Aria-128 CFB Cipher'
+ 'aria-128-ctr:Aria-128 CTR Cipher'
+ 'aria-128-ecb:Aria-128 ECB Cipher'
+ 'aria-128-ofb:Aria-128 OFB Cipher'
+ 'aria192:Aria-192 Cipher'
+ 'aria-192-cbc:Aria-192 CBC Cipher'
+ 'aria-192-cfb:Aria-192 CFB Cipher'
+ 'aria-192-ctr:Aria-192 CTR Cipher'
+ 'aria-192-ecb:Aria-192 ECB Cipher'
+ 'aria-192-ofb:Aria-192 OFB Cipher'
+ 'aria256:Aria-256 Cipher'
+ 'aria-256-cbc:Aria-256 CBC Cipher'
+ 'aria-256-cfb:Aria-256 CFB Cipher'
+ 'aria-256-ctr:Aria-256 CTR Cipher'
+ 'aria-256-ecb:Aria-256 ECB Cipher'
+ 'aria-256-ofb:Aria-256 OFB Cipher'
+
+ 'base64:Base64 Encoding'
+
+ 'bf:Blowfish Cipher'
+ 'bf-cbc:Blowfish CBC Cipher'
+ 'bf-cfb:Blowfish CFB Cipher'
+ 'bf-ecb:Blowfish ECB Cipher'
+ 'bf-ofb:Blowfish OFB Cipher'
+
+ 'camellia128:Camellia-128 Cipher'
+ 'camellia-128-cbc:Camellia-128 CBC Cipher'
+ 'camellia-128-cfb:Camellia-128 CFB Cipher'
+ 'camellia-128-ctr:Camellia-128 CTR Cipher'
+ 'camellia-128-ecb:Camellia-128 ECB Cipher'
+ 'camellia-128-ofb:Camellia-128 OFB Cipher'
+ 'camellia192:Camellia-192 Cipher'
+ 'camellia-192-cbc:Camellia-192 CBC Cipher'
+ 'camellia-192-cfb:Camellia-192 CFB Cipher'
+ 'camellia-192-ctr:Camellia-192 CTR Cipher'
+ 'camellia-192-ecb:Camellia-192 ECB Cipher'
+ 'camellia-192-ofb:Camellia-192 OFB Cipher'
+ 'camellia256:Camellia-256 Cipher'
+ 'camellia-256-cbc:Camellia-256 CBC Cipher'
+ 'camellia-256-cfb:Camellia-256 CFB Cipher'
+ 'camellia-256-ctr:Camellia-256 CTR Cipher'
+ 'camellia-256-ecb:Camellia-256 ECB Cipher'
+ 'camellia-256-ofb:Camellia-256 OFB Cipher'
+
+ 'cast:CAST Cipher'
+ 'cast-cbc:CAST CBC Cipher'
+
+ 'cast5-cbc:CAST5 CBC Cipher'
+ 'cast5-cfb:CAST5 CFB Cipher'
+ 'cast5-ecb:CAST5 ECB Cipher'
+ 'cast5-ofb:CAST5 OFB Cipher'
+
+ 'chacha20:Chacha20 Cipher'
+
+ 'des:DES Ciper'
+ 'des-cbc:DES CBC Ciper'
+ 'des-cfb:DES CFB Ciper'
+ 'des-ecb:DES ECB Ciper'
+ 'des-ede:DES EDE Ciper'
+ 'des-ede-cbc:DES EDE CBC Ciper'
+ 'des-ede-cfb:DES EDE CFB Ciper'
+ 'des-ede-ofb:DES EDE OFB Ciper'
+ 'des-ofb:DES OFB Ciper'
+
+ 'des3:Triple-DES Ciper'
+ 'desx:Triple-DES X Ciper'
+ 'des-ede3:Triple-DES EDE Ciper'
+ 'des-ede3-cbc:Triple-DES EDE CBC Ciper'
+ 'des-ede3-cfb:Triple-DES EDE CFB Ciper'
+ 'des-ede3-ofb:Triple-DES EDE OFB Ciper'
+
+ 'idea:IDEA Ciper'
+ 'idea-cbc:IDEA CBC Ciper'
+ 'idea-cfb:IDEA CFB Ciper'
+ 'idea-ecb:IDEA ECB Ciper'
+ 'idea-ofb:IDEA OFB Ciper'
+
+ 'rc2:RC2 Ciper'
+ 'rc2-cbc:RC2 CBC Ciper'
+ 'rc2-cfb:RC2 CFB Ciper'
+ 'rc2-ecb:RC2 ECB Ciper'
+ 'rc2-ofb:RC2 OFB Ciper'
+
+ 'rc4:RC4 Ciper'
+
+ 'rc5:RC5 Ciper'
+ 'rc5-cbc:RC5 CBC Ciper'
+ 'rc5-cfb:RC5 CFB Ciper'
+ 'rc5-ecb:RC5 ECB Ciper'
+ 'rc5-ofb:RC5 OFB Ciper'
+
+ 'seed:SEED Ciper'
+ 'seed-cbc:SEED CBC Ciper'
+ 'seed-cfb:SEED CFB Ciper'
+ 'seed-ecb:SEED ECB Ciper'
+ 'seed-ofb:SEED OFB Ciper'
+
+ 'sm4:SM4 Ciper'
+ 'sm4-cbc:SM4 CBC Ciper'
+ 'sm4-cfb:SM4 CFB Ciper'
+ 'sm4-ctr:SM4 CTR Ciper'
+ 'sm4-ecb:SM4 ECB Ciper'
+ 'sm4-ofb:SM4 OFB Ciper'
+ )
+
+ _describe -t commands 'command' commands "$@"
+}
+
+#
+# Commands
+#
_openssl_asn1parse() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format - one of DER PEM]:format:(DER PEM)' \
+ _arguments \
+ '(- *)-help[display this summary]' \
+ '-inform[input format]:format:(DER PEM B64)' \
'-in[input file]:file:_files' \
- '-out[output file (output format is always DER]:file:_files' \
- "-noout[don't produce any output]" \
- '-offset[offset into file]:number: ' \
- '-length[length of section in file]:number: ' \
- '-i[indent entries]' \
- '-dump[dump unknown data in hex form]' \
- '-dlimit[dump the first arg bytes of unknown data in hex form]:number: ' \
+ '-out[output file(output format is always DER)]:file:_files' \
+ '-noout[do not produce any output]' \
+ '-offset[offset into file]:number' \
+ '-length[length of section in file]:number' \
+ '-i[indents the output]' \
'-oid[file of extra oid definitions]:file:_files' \
- "-strparse[a series of these can be used to 'dig' into multiple ASN1 blob wrappings]:offset:" \
- '-genstr[string to generate ASN1 structure from]:str:' \
- '-genconf[file to generate ASN1 structure from]:file:_files'
+ '-dump[unknown data in hex form]' \
+ '-dlimit[dump the first arg bytes of unknown data in hex form]:bytes' \
+ '-strparse[a series of these can be used to "dig"]:offset' \
+ '-genstr[string to generate ASN1 structure from]:val' \
+ '-genconf[file to generate ASN1 structure from]:file:_files' \
+ '-strictpem[strict PEM]' \
+ '-item[item to parse and print]:val'
}
-
_openssl_ca() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-verbose[talk a lot while doing things]' \
- '-config[a config file]:file:_files' \
- '-name[the particular CA definition to use]:section: ' \
- '-gencrl[generate a new CRL]' \
- '-crldays[days is when the next CRL is due]:days: ' \
- '-crlhours[hours is when the next CRL is due]:hours: ' \
- '-startdate[certificate validity notBefore]:date: ' \
- '-enddate[certificate validity notAfter (overrides -days)]:date: ' \
- '-days[number of days to certify the certificate for]:days: ' \
- '-md[md to use, one of md2, md5, sha or sha1]:alg:(md2 md5 sha sha1)' \
- "-policy[the CA 'policy' to support]:policy: " \
- '-keyfile[private key file]:file:_files' \
- '-keyform[private key file format (PEM or ENGINE)]:format:(PEM ENGINE)' \
- '-key[key to decode the private key if it is encrypted]:password: ' \
- '-cert[the CA certificate]:file:_files' \
- '-selfsign[sign a certificate with the key associated with it]' \
- '-in[the input PEM encoded certificate request(s)]:file:_files' \
- '-out[where to put the output file(s)]:file:_files' \
- '-outdir[where to put output certificates]:dir:_files -/' \
- '-infiles[the last argument, requests to process]:*:files:_files' \
- '-spkac[file contains DN and signed public key and challenge]:file:_files' \
- '-ss_cert[file contains a self signed cert to sign]:file:_files' \
- "-preserveDN[don't re-order the DN]" \
- "-noemailDN[don't add the EMAIL field into certificate' subject]" \
- "-batch[don't ask questions]" \
- '-msie_hack[msie modifications to handle all those universal strings]' \
- '-revoke[revoke a certificate (given in file)]:file:_files' \
- "-subj[use arg instead of request's subject]:subject: " \
- '-utf8[input characters are UTF8 (default ASCII)]' \
- '-multivalue-rdn[enable support for multivalued RDNs]' \
- '-extensions[extension section (override value in config file)]:section: ' \
- '-extfile[configuration file with X509v3 extensions to add]:file:_files' \
- '-crlexts[CRL extension section (override value in config file)]:section: ' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-status[shows certificate status given the serial number]:serial: ' \
- '-updatedb[updates db for expired certificates]'
+ _arguments \
+ '(- *)-help[print out a usage message]' \
+ '-verbose[prints extra details about the operations being performed]' \
+ '-quiet[prints fewer details about the operations being performed]' \
+ '-config[specifies the configuration file to use]:file:_files' \
+ '(-name -section)'{-name,-section}'[specifies the configuration file section to use]:section' \
+ '-in[input filename containing a single certificate request to be signed by the CA]:file:_files' \
+ '-inform[format to use when loading certificate request (CSR) input files]:type:(DER PEM)' \
+ '-ss_cert[single self-signed certificate to be signed by the CA]:file:_files' \
+ '-spkac[file containing a single Netscape signed public key and challenge to be signed by the CA]:file:_files' \
+ '-infiles[all subsequent arguments are taken as the names f files containing certificate requests]' \
+ '-out[output file to output certificates to]:file:_files' \
+ '-outdir[directory to output certificates to]:dir:_files -/' \
+ '-cert[CA certificate]:file:_files' \
+ '-certform[format of the data in certificate input files]:format:(DER PEM P12)' \
+ '-keyfile[CA private key to sign certificate requests with]:file_or_uri:_files' \
+ '-keyform[format of the private key input file]:format:(DER PEM P12 ENGINE)' \
+ '-sigopt[pass options to the signature algorithm during sign operations]:option' \
+ '-vfyopt[pass options to the signature algorithm during verify operations]:option' \
+ '-key[The password used to encrypt the private key]:password' \
+ '-passin[key password source for key files and certificate PKCS#12 files]:arg' \
+ '-selfsign[certificates are to be signed with the key given with -keyfile]' \
+ '-notext[do not output the text form of a certificate to the output file]' \
+ '-dateopt[specify the date output format]:format:(rfc_822 iso_8601)' \
+ '(-startdate -not_before)'{-startdate,-not_before}'[start date to be explicitly set]:date' \
+ '(-enddate -not_after)'{-enddate,-not_after}'[expiry date to be explicitly set]:date' \
+ '-days[number of days from today to certify the certificate for]:days' \
+ '-md[message digest to use]:algorithm:(sha256 sha1 md5)' \
+ '-policy[CA policy to use]:policy' \
+ '-preserveDN[preserve DN order of a certificate]' \
+ '-noemailDN[remove EMAIL field from the certificate]' \
+ '-batch[enable batch mode]' \
+ '-extensions[section of the configuration file to be added when certificate is issued]:section' \
+ '-extfile[additional configuration file to read certificate extensions from]:file:_files' \
+ '-subj[supersedes subject name given in the request]:subject' \
+ '-utf8[field values to be interpreted as UTF8 string]' \
+ '-create_serial[creates a new random serial to be used as next serial number]' \
+ '-rand_serial[generate a large random number to use as the serial number]' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '-gencrl[generates a CRL based on information in the index file]' \
+ "-crl_lastupdate[allows the value of the CRL's lastUpdate field to be explicitly set]:time" \
+ "-crl_nextupdate[allows the value of the CRL's nextUpdate field to be explicitly set]:time" \
+ '-crldays[number of days before the next CRL is due]:days' \
+ '-crlhours[number of hours before the next CRL is due]:hours' \
+ '-crlsec[number of seconds before the next CRL is due]:seconds' \
+ '-revoke[filename containing a certificate to revoke]:file:_files' \
+ '-valid[filename containing a certificate to add a Valid certificate entry]:file:_files' \
+ '-status[displays the revocation status of the certificate with the specified serial number]:serial' \
+ '-updatedb[updates the database index to purge expired certificates]' \
+ '-crl_reason[revocation reason]:reason:(unspecified keyCompromise CACompromise affiliationChanged superseded cessationOfOperation certificateHold removeFromCRL)' \
+ '-crl_hold[sets the CRL revocation reason code to certificateHold and the hold instruction]:insn:(holdInstructionCallIssuer holdInstructionReject)' \
+ '-crl_compromise[sets the revocation reason to keyCompromise and the compromise time]:time' \
+ '-crl_CA_compromise[same as crl_compromise except the revocation reason is set to CACompromise]:time' \
+ '-crlexts[section of the configuration file containing CRL extensions to include]:section' \
+ '*:: :_files'
}
-
_openssl_ciphers() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-v[verbose mode, a textual listing of the SSL/TLS ciphers in OpenSSL]' \
- '-V[even more verbose]' \
- '-ssl2[SSL2 mode]' \
- '-ssl3[SSL3 mode]' \
- '-tls1[TLS1 mode]' \
- ':cipher suite:_list_ciphers'
+ _arguments \
+ '(- *)-help[print help message]' \
+ $openssl_provider_options[@] \
+ '-s[only list supported ciphers]' \
+ '-psk[include cipher suites which require PSK]' \
+ '-srp[include cipher suites which require SRP]'\
+ '-v[verbose output]' \
+ '-V[like -v but include the official cipher suites values in hex]' \
+ '-ssl3[list ciphers which could be used in SSL3 protocol negotiation]' \
+ '-tls1[list ciphers which could be used in TLS1 protocol negotiation]' \
+ '-tls1_1[list ciphers which could be used in TLS1.1 protocol negotiation]' \
+ '-tls1_2[list ciphers which could be used in TLS1.2 protocol negotiation]' \
+ '-tls1_3[list ciphers which could be used in TLS1.3 protocol negotiation]' \
+ '-stdname[precede each cipher suite by its standard name]' \
+ '-convert[connvert a standard cipher name to its OpenSSL name]:name' \
+ '-ciphersuites[sets the list of TLSv1.3 ciphersuites]:suites' \
+ '*:cipher_suite:_openssl_list_ciphers'
+}
+
+_openssl_cmp() {
+ local -a info_types=(signKeyPairTypes caCerts rootCaCert certReqTemplate crlStatusList)
+ local -a mac_algorithms=(
+ hmacWithMD5 hmacWithRMD160 hmacWithSHA1 hmacWithSHA224 hmacWithSHA256 hmacWithSHA384
+ hmacWithSHA512 hmac-sha1
+ )
+
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-config[configuration file]:file:_files' \
+ '-section[sections names to use within config file defining CMP options]:names' \
+ '-verbosity[level of verbosity]:level:_openssl_cmp_verbosity_level' \
+ '-cmd[CMP command to execute]:command:_openssl_cmp_commands' \
+ '-infotype[InfoType name to use for requesting specific info in gem]:type:(($info_types))' \
+ '-profile[name of a certificate profile in the PKIHeader generalInfo field]:name' \
+ '-geninfo[a comma-separated list of InfoTypeAndValue]:values' \
+ '-template[file to save any CRMF certTemplate in DER format]:file:_files' \
+ '-keyspec[file to save any keySpec]:file:_files' \
+ '-newkey[private or public key file or URI to be requested]:file_or_uri:_files' \
+ '-newkeypass[pass phrase source for the key given with -newkey option]:source:_openssl_pass_phrase_options' \
+ '-centralkeygen[request central key generation for certificate enrollment]' \
+ '-newkeyout[file to save centrally generated private key in PEM format]:file:_files' \
+ '-subject[X.509 Distinguished Name(DN) to use as subject field in requested certificate]:name' \
+ '-days[number of days new certificate is requested to be valid for]:days' \
+ '-reqexts[name of section in OpenSSL config file defining certificate request extensions]:name' \
+ '-sans[addresses, email addresses, DNS names, URIS to add as SAN certificate request extension]:spec' \
+ '-san_nodefault[disable to be copied from the reference certificate]' \
+ '-policies[name of section to be set as certificate request extension]:name' \
+ '-policy_oids[one or more OIDs to add as certificate policies request extension]:names' \
+ '-policy_oids_critical[set policies given with -policy_oids as critical]' \
+ '-popo[Proof-of-possession(POPO) method to use for IR/CR/KUR]:number:(0 1 2)' \
+ '-csr[PKCS#10 CSR containing a certificate request]:file:_files' \
+ '-out_trusted[trusted certificate file or URI to use for validating newly enrolled certificate]:file_or_uri:_files' \
+ '-implicit_confirm[request implicit confirmation of newly enrolled certificates]' \
+ '-disable_confirm[do not send certificate confirmation message for newly enrolled certificate]' \
+ '-certout[file where any newly enrolled certificate should be saved]:file:_files' \
+ '-chainout[file where the chain of any newly enrolled certificate should be saved]:file:_files' \
+ '-oldcert[certificate file or URI to be updated message or to be revoked in RR messages]:file_or_uri:_files' \
+ '-issuer[X.509 Distinguished Name(ND) to place as the issuer field]:name' \
+ '-serial[serial number of certificate to be revoked in revocation request]:number' \
+ '-revreason[CRLReason number to be included in revocation request]:reason:_openssl_cmp_revocation_reasons' \
+ '-server[domain name or IP address and optionally port of CMP server to connect]:domain_or_ip' \
+ '-proxy[proxy server to use for reaching CMP server]:domain_or_ip' \
+ '-no_proxy[list of IP addresses and/or DNS names not to use proxy for]:addresses' \
+ '-recipient[Distinguished Name(DN) to use in recipient field of CMP request message headers]:name' \
+ '-path[HTTP path at CMP server to use for POST requests]:path' \
+ '-keep_alive[keep alive type]:value:(0 1 2)' \
+ '-msg_timeout[seconds a CMP request-response message round trip is allowed to take]:seconds' \
+ '-total_timeout[maximum total seconds a transaction may take]:seconds' \
+ '-trusted[certificate files or uris to use as trust anchors]:file_or_uri:_files' \
+ '-untrusted[non-trusted intermediate CA certificate files or URIs]:file_or_uri:_files' \
+ '-srvcert[CMP server certificate file or URI to expect and directly trust]:file_or_uri:_files' \
+ '-expect_sender[Distinguished Name(DN) expected in the sender field of incoming CMP messages]:name' \
+ '-ignore_keyusage[ignore key usage restrictions in CMP signer certificates]' \
+ '-unprotected_errors[accept missing or invalid protection of negative responses from server]' \
+ '-no_cache_extracerts[do not cache certificates in extraCerts field of CMP messages received]' \
+ '-srvcert[file where to save successfully validated certificate]:file:_files' \
+ '-extracertsout[file where to save the list of certificates contained in extraCert field]:file:_files' \
+ '-cacertsout[file where to save the list of CA certificates contained in caPubs field]:file:_files' \
+ '-oldwithold[root CA certificate to include in a genm request of infoType "rootCaCert"]:file:_files' \
+ '-newwithnew[file to save newWithNew certificate received in a genp message]:file:_files' \
+ '-newwithold[file to save any newWithOld certificate received in a genp message]:file:_files' \
+ '-oldwithold[file to save any oldWithNew certificate received in a genp message]:file:_files' \
+ '-crlcert[certificate to derive CRL issuer data for the source field]:file:_files' \
+ '-oldcrl[CRL to obtain an update for in a genm request with infoType "crlStatusList"]:file:_files' \
+ '-crlout[file to save any CRL received in a genp message of infoType "crls"]:file:_files' \
+ '-ref[reference number/string/value to use as fallback senderKID]:value' \
+ '-secret[source of a secret value to use with MAC-based message protection]:source:_openssl_pass_phrase_options' \
+ "-cert[client's current CMP signer certificate file or URI]:file_or_uri:_files" \
+ '-own_trusted[list of certificates to be used as trusted anchors]:file_or_uri:_files' \
+ "-key[private key file or URI for the client's current certificate]:file_or_uri:_files" \
+ '-keypass[pass pharse source for the private key]:source:_openssl_pass_phrase_options' \
+ '-digest[digest to use in MSG_SIG_ALG and as the on-way function(OWF) in MSG_MAC_ALG]:digest:_openssl_digests' \
+ '-mac[MAC algorithm in MSG_MAC_ALG]:alg:(($mac_algorithms))' \
+ '-extracerts[certificates files or URIs to append in extraCerts field]:file_or_uri:_files' \
+ '-unprotected_errors[send request messages without CMP-level protection]' \
+ '-certform[file format to use when saving a certificate]:format:(PEM DER)' \
+ '-crlform[file format to use when saving a CRL]:format(PEM DER)' \
+ '-keyform[format of the key input]:format:(PEM DER P12 ENGINE)' \
+ '-otherpass[pass phrase source for certificate]:source:_openssl_pass_phrase_options' \
+ $openssl_provider_options[@] \
+ $openssl_random_state_options[@] \
+ '-tls_used[make the CMP client use TLS for message exchange]' \
+ "-tls_cert[client's TLS certificate file or URI for authenticating to TLS server]:file_or_uri:_files" \
+ "-tls_key[private key for client's TLS certificate]:file_or_uri:_files" \
+ "-tls_keypass[pass phrase source for client's private TLS key]:source:_openssl_pass_phrase_options" \
+ '-tls_extra[extra certificates file or URI to provite to TLS server during handshake]:file_or_uri:_files' \
+ '-tls_trusted[trusted certificates to use for validating TLS server certificate]:file_or_uri:_files' \
+ '-tls_host[address to be checked during hostname validation]:name' \
+ '-batch[do not interactively prompt for input]' \
+ '-repeat[number of times to invoke the command with the same parameters]:number' \
+ '-reqin[files to take the sequence of CMP requests to send to server]:files:_files' \
+ '-reqin_new_tid[use a fresh transaction ID for CMP request messages]' \
+ '-reqout[file to save the sequence of CMP requests]:file:_files' \
+ '-reqout_only[file to save the first CMP requests created by client]:file:_files' \
+ '-rspin[files to save sequence of CMP responses]:file:_files' \
+ '-rspout[file to save sequence of actually used CMP responses]:files:_files' \
+ '-use_mock_srv[test the client using the internal CMP server mock-up at API level]' \
+ '-port[port number of CMP mock-up server]:number' \
+ '-max_msgs[maximum number of CMP messages that mock-up server should handle]:number' \
+ '-srv_ref[reference value to use as snderKID of server]:value' \
+ '-srv_secret[password source for server authentication with a pre-shared key]:arg' \
+ '-srv_cert[certificate file or URI of the server]:file_or_uri:_files' \
+ '-srv_cert[private key file or URI by the server for signing messages]:file_or_uri:_files' \
+ '-srv_keypass[server private key file pass phrase source]:arg' \
+ '-srv_trusted[trusted certificates for client authentication]:file_or_uri:_files' \
+ '-srv_untrusted[untrusted intermediate CA certs files or URIs]:file_or_uri:_files' \
+ '-ref_cert[certificate file or URI to be expected for RR messages]:file_or_uri:_files' \
+ '-rsp_cert[certificate file or URI to be returned as mock enrollment result]:file_or_uri:_files' \
+ '-rsp_key[private key to be returned as central key generation result]:file_or_uri:_files' \
+ '-rsp_keypass[pass phrase source for rsp_cert and rsp_key]:arg' \
+ '-rsp_crl[CRL file or URI to be returned in genp of type "crls"]:file_or_uri:_files' \
+ '-rsp_extracerts[extra certificates to be include in mock certification responses]:file_or_uri:_files' \
+ '-rsp_capubs[CA certificates to be included in mock Initialization Response message]:file_or_uri:_files' \
+ '-rsp_newwithnew[certificate to be returned in newWithNew field of genp]:file_or_uri:_files' \
+ '-rsp_newwithold[certificate to be returned in newWithPld field of genp]:file_or_uri:_files' \
+ '-rsp_oldwithnew[certificate to be returned in oldWithNew field of genp]:file_or_uri:_files' \
+ '-poll_count[number of times the client must poll before receiving a certificate]:number' \
+ '-check_after[checkAfter value to include in poll response]:number' \
+ '-grant_implicitconf[grant implicit confirmation of newly enrolled certificate]' \
+ '-pkistatus[PKIStatus to be include in server response]:number' \
+ '-failure[a single failure info bit number to be include in server response]:number' \
+ '-failurebits[number representing failure bits to be include in server response]:number' \
+ '-statusstring[text to be include as status string in server response]:str' \
+ '-send_error[force server to reply with error message]' \
+ '-send_unprotected[send reponse message without CMP-level protection]' \
+ '-send_unprot_err[server shall send unprotected error message]' \
+ '-accept_unprotected[accept missing or invalid protection of requests]' \
+ '-accept_unprot_err[accept unprotected error messages from client]' \
+ '-accept_raverified[accept RAVERIFIED as proof of possession(POPO)]' \
+ $openssl_verification_options[@]
+}
+
+_openssl_cmp_verbosity_level() {
+ local -a levels=(
+ '0:EMERG'
+ '1:ALERT'
+ '2:CRIT'
+ '3:ERR'
+ '4:WARN'
+ '5:NOTE'
+ '6:INFO(Default)'
+ '7:DEBUG'
+ '8:TRACE'
+ )
+
+ _describe -t levels 'levels' levels "$@"
+}
+
+_openssl_cmp_commands() {
+ local -a commands=(
+ "ir:Initialization Request"
+ "cr:Certificate Request"
+ "p10cr:PKCS#10 Certification Request (for legacy support)"
+ "kur:Key Update Request"
+ "rr:Revocation Request"
+ "genm:General Message"
+ )
+
+ _describe -t commands 'commands' commands "$@"
}
+_openssl_cmp_revocation_reasons() {
+ local -a reasons=(
+ '0:unspecified'
+ '1:keyCompromise'
+ '2:cACompromise'
+ '3:affiliationChanged'
+ '4:superseded'
+ '5:cessationOfOperation'
+ '6:certificateHold'
+ '8:removeFromCRL'
+ '9:privilegeWithdrawn'
+ '10:aACompromise'
+ )
+
+ _describe -t reasons 'reasons' reasons "$@"
+}
_openssl_cms() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-encrypt[encrypt message]' \
- '-decrypt[decrypt encrypted message]' \
- '-sign[sign message]' \
- '-verify[verify signed message]' \
- '-cmsout[output CMS structure]' \
- '-des3[encrypt with triple DES]' \
- '-des[encrypt with DES]' \
- '-seed[encrypt with SEED]' \
- '-rc2-40[encrypt with RC2-40 (default)]' \
- '-rc2-64[encrypt with RC2-64]' \
- '-rc2-128[encrypt with RC2-128]' \
- '-aes128[encrypt PEM output with cbc aes]' \
- '-aes192[encrypt PEM output with cbc aes]' \
- '-aes256[encrypt PEM output with cbc aes]' \
- '-camellia128[encrypt PEM output with cbc camellia]' \
- '-camellia192[encrypt PEM output with cbc camellia]' \
- '-camellia256[encrypt PEM output with cbc camellia]' \
- "-nointern[don't search certificates in message for signer]" \
- "-nosigs[don't verify message signature]" \
- "-noverify[don't verify signers certificate]" \
- "-nocerts[don't include signers certificate when signing]" \
+ local -a ciphers=($(openssl enc -list | tail -n +2 ))
+ local -a cipher_flags=()
+ for cipher in $ciphers[@]
+ do
+ cipher_flags+=("($ciphers)${cipher}[use ${cipher:1:u} to encrypt]")
+ done
+
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-in[input file name]:file:_files' \
+ '-out[output file name]:file:_files' \
+ '-config[config file]:file:_files' \
+ '-encrypt[encrypt data for the given recipient certificates]' \
+ '-decrypt[decrypt data using the supplied certificate and private key]' \
+ '-sign[sign data using the supplied certificate and private key]' \
+ '-verify[verify signed data]' \
+ '-resign[resign a message]' \
+ '-sign_receipt[generate and output a signed receipt for the supplied message]' \
+ '-verify_receipt[verify a signed receipt in file receipt]:receipt:_files' \
+ '-digest[digest in hexadecimal form instead of computing it]:digest' \
+ '-digest_create[create a CMS DigestedData type]' \
+ '-digest_verify[verify a CMS DigestedData type and output the content]' \
+ '-compress[create a CMS CompressedData type]' \
+ '-uncompress[uncompress a CMS CompressedData type and output the content]' \
+ '-EncryptedData_encrypt[encrypt content using supplied symmetric key and algorithm]' \
+ '-EncryptedData_decrypt[decrypt content using supplied symmetric key and algorithm]' \
+ '-data_create[create a CMS Data type]' \
+ '-data_out[Data type and output the content]' \
+ '-cmsout[take an input message and write out a PEM encoded CMS structure]' \
+ '-inform[input format of the CMS structure]:format:(DER PEM SMIME)' \
+ '-outform[output format of the CMS structure]:format(DER PEM SMIME)' \
+ '-rctform[signed receipt format for use with the -receipt_verify]:format:(DER PEM SMIME)' \
+ '(-stream -indef -noindef)'{-stream,-indef}'[enable streaming I/O for encoding operations]' \
+ '(-stream -indef -noindef)-noindef[disable streaming I/O for encoding operations]' \
+ '-binary[do not convert to canonical format]' \
+ '-crlfeol[use CRLF instead of LF as end of line]' \
+ '-asciicrlf[strip trailing whitespace from all lines, delete trailing blank lines at EOF]' \
+ '-pwri_password[password for recipient]' \
+ '-secretkey[symmetric key to use]:key' \
+ '-secretkeyid[key identifier for the supplied symmetric key for KEKRecipientInfo type]:id' \
+ '-inkey[private key file or URI to use when signing or decrypting]:file_or_uri:_files' \
+ '-passin[private key password source]:option:_openssl_pass_phrase_options' \
+ '*-keyopt[options for signing and encryption]:option' \
+ '-keyform[format of the private key file]:format:(DER PEM P12 ENGINE)' \
+ $openssl_provider_options[@] \
+ $openssl_random_state_options[@] \
+ '-originator[originator of the encrypted message]:file:_files' \
+ '-recip[recipient of the certificate when decrypting a message]:file:_files' \
+ $cipher_flags[@] \
+ '-wrap[cipher algorithm to use for key wrap]:cipher:_openssl_cipher_algorithms' \
+ '-debug_decrypt[set the CMS_DEBUG_DECRYPT flag]' \
+ '-md[digest algorithm to use when signing or resigning]:digest:_openssl_digests' \
+ '-signer[a signing certificate]:file:_files' \
+ '-certfile[additional certificates]:file:_files' \
+ '-cades[add an ESS signingCertificate or ESS signingCertificateV2 attributes to the SignerInfo]' \
'-nodetach[use opaque signing]' \
- "-noattr[don't include any signed attributes]" \
- "-binary[don't translate message to text]" \
- '-certfile[other certificates file]:file:_files' \
- '-certsout[certificate output file]:file:_files' \
+ '-nocerts[do not include signers certificate when signing]' \
+ '-noattr[do not include any signed attributes]' \
+ '-nosmimecap[exclude list of supported algorithms from signed attributes]' \
+ '-no_signing_time[exclude the signing time from signed attributes]' \
+ '-receipt_request_all[requests should be provided by all recipient]' \
+ '-receipt_request_first[requests should be provided by first tier recipients]' \
+ '-receipt_request_from[add an explicit email address where receipts should be supplied]:email_address' \
+ '-receipt_request_to[add an explicit email address where signed receipts should be sent to]:email_address' \
'-signer[signer certificate file]:file:_files' \
- '-recip[recipient certificate file for decryption]:file:_files' \
- '-keyid[use subject key identifier]' \
- '-in[input file]:file:_files' \
- '-inform[input format SMIME (default), PEM or DER]:format:(SMIME PEM DER)' \
- '-inkey[input private key (if not signer or recipient)]:file:_files' \
- '-keyform[input private key format (PEM or ENGINE)]:format:(PEM ENGINE)' \
- '-out[output file]:file:_files' \
- '-outform[output format SMIME (default), PEM or DER]:format:(SMIME PEM DER)' \
'-content[supply or override content for detached signature]:file:_files' \
- '-to[to address mail head]:address: ' \
- '-from[from address mail head]:address: ' \
- '-subject[subject mail head]:subject: ' \
- '-text[include or delete text MIME headers]' \
- '-CApath[trusted certificates directory]:dir:_files -/' \
- '-CAfile[trusted certificates file]:file:_files' \
- "-crl_check[check revocation status of signer's certificate using CRLs]" \
- "-crl_check_all[check revocation status of signer's certificate chain using CRLs]" \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-rand[files to use for random number input]:file:_rand_files' \
- '*:certificate:_files'
+ '-no_content_verify[do not verify signed content signatures]' \
+ '-no_attr_verify[do not verify signed attribute signatures]' \
+ '-nosigs[do not verify message signature]' \
+ '-noverify[do not verify the signers certificate of a signed message]' \
+ '-nointern[do not search certificates in message for signer]' \
+ '-cades[require and check signer certificate digest]' \
+ '-verify_retcode[exit non-zero on verification failure]' \
+ $openssl_trusted_certificate_options[@] \
+ '-keyid[subject key identifier to identify certificates instead of issuer name and serial number]' \
+ '-econtent_type[encapsulated content type]:type' \
+ '-text[add plain text MIME headers to the supplied message]' \
+ '-certsout[output file name to any certificates contained in the input message]:file:_files' \
+ '-to[TO email header]:to' \
+ '-from[FROM email header]:from' \
+ '-subject[SUBJECT email header]:subject' \
+ '-noout[do not output the parsed CMS structure]' \
+ '-print[print out all fields of the CMS structure]' \
+ '-nameopt[printing options for string fields]:nameopt:_openssl_name_display_options' \
+ '-receipt_request_print[print out the contents of any signed receipt requests]' \
+ $openssl_verification_options[@] \
+ '*::recipient_cert:_files'
}
-
_openssl_crl() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format - default PEM (DER or PEM)]:format:(PEM DER)' \
- '-outform[output format - default PEM]:format:(PEM DER)' \
- '-text[print out a text format version]' \
- '-in[input file - default stdin]:file:_files' \
- '-out[output file - default stdout]:file:_files' \
- '-hash[print hash value]' \
- '-hash_old[print old-style (MD5) hash value]' \
- '-fingerprint[print the crl fingerprint]' \
- '-issuer[print issuer DN]' \
- '-lastupdate[print lastUpdate field]' \
- '-nextupdate[print nextUpdate field]' \
- '-crlnumber[print CRL number]' \
- '-noout[no CRL output]' \
- '-CAfile[verify CRL using certificates in the specified file]:file:_files' \
- '-CApath[verify CRL using certificates in the specified directory]:dir:_files -/' \
- '*-nameopt[various certificate name options]:options:_nameopts'
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-inform[CRL input format]:format:(DER PEM)' \
+ '-outform[CRL output format]:format:(DER PEM)' \
+ '-key[private key to be used to sign the CRL]:key:_files' \
+ '-keyform[format of private key file]:format:(DER PEM P12)' \
+ '-in[input file name]:file:_files' \
+ '-out[output file name]:file:_files' \
+ '-gendelta[output a comparison of the main CRL and this file]:file:_files' \
+ '-badsig[corrupt the signature before writing it]'\
+ '-dateopt[date output format]:format:(rfc_822 iso_8601)' \
+ '-text[print out the CRL in text form]' \
+ '-verify[verify the signature in the CRL]' \
+ '-noout[do not output the encoded version of the CRL]' \
+ '-fingerprint[output the fingerprint of the CRL]' \
+ '-crlnumber[output the number of the CRL]' \
+ '-hash[output a hash of the issuer name]' \
+ '-hash_old[output the hash of the CRL issuer name using the older algorithm]' \
+ '-issuer[output the issuer name]' \
+ '-lastupdate[output the lastUpdate field]' \
+ '-nextupdate[output the nextUpdate field]' \
+ '-nameopt[specify how the subject or issuer names are displayed]:option:_openssl_name_display_options' \
+ $openssl_trusted_certificate_options[@] \
+ $openssl_provider_options[@]
}
-
_openssl_crl2pkcs7() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format - DER or PEM]:format:(PEM DER)' \
- '-outform[output format - DER or PEM]:format:(PEM DER)' \
- '-in[input file]:file:_files' \
- '-out[output file]:file:_files' \
- '-certfile[certificates file of chain to a trusted CA (can be used more than once)]:file:_files' \
- "-nocrl[no crl to load, just certs from '-certfile']"
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-inform[input format of the CRL]:format:(DER PEM)' \
+ '-outform[output format of the PKCS#7 object]:format:(DER PEM)' \
+ '-in[input file name to read a CRL from]:file:_files' \
+ '-out[output file name to write the PKCS#7 structure]:file:_files' \
+ '-certfile[file containing one or more certificates in PEM format]:file:_files' \
+ '-nocrl[no CRL is included in the output file]' \
+ $openssl_provider_options[@]
}
-
_openssl_dgst() {
- # written for openssl 1.0.1k
- local digests
- digests=(-dss1 -md4 -md5 -mdc2 -ripemd160 -sha -sha1 -sha224 -sha256 -sha384 -sha512 -whirlpool)
- # -hmac is listed twice because it's documented twice by openssl
- _arguments -C -A '-*' \
- '(-r -hex -binary)-c[to output the digest with separating colons]' \
- '(-c -hex -binary)-r[to output the digest in coreutils format]' \
- '-d[to output debug info]' \
- '(-c -r -binary)-hex[output as hex dump]' \
- '(-c -r -hex)-binary[output in binary form]' \
- '-hmac[set the HMAC key to arg]:key: ' \
- '-non-fips-allow[allow use of non FIPS digest]' \
- '-sign[sign digest using private key in the specified file]:file:_files' \
- '-verify[verify a signature using public key in the specified file]:file:_files' \
- '-prverify[verify a signature using private key in the specified file]:file:_files' \
- '-keyform[key file format (PEM or ENGINE)]:format:(PEM ENGINE)' \
- '-out[output to filename rather than stdout]:file:_files' \
- '-signature[signature to verify]:file:_files' \
- '-sigopt[signature parameter]:nm\:v: ' \
- '-hmac[create hashed MAC with key]:key: ' \
- '-mac[create MAC (not necessarily HMAC)]:algorithm: ' \
- '-macopt[MAC algorithm parameters or key]:nm\:v: ' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- "($digests)-dss1[use the dss1 message digest algorithm]" \
- "($digests)-md4[to use the md4 message digest algorithm]" \
- "($digests)-md5[to use the md5 message digest algorithm]" \
- "($digests)-mdc2[to use the mdc2 message digest algorithm]" \
- "($digests)-ripemd160[to use the ripemd160 message digest algorithm]" \
- "($digests)-sha[to use the sha message digest algorithm]" \
- "($digests)-sha1[to use the sha1 message digest algorithm]" \
- "($digests)-sha224[to use the sha224 message digest algorithm]" \
- "($digests)-sha256[to use the sha256 message digest algorithm]" \
- "($digests)-sha384[to use the sha384 message digest algorithm]" \
- "($digests)-sha512[to use the sha512 message digest algorithm]" \
- "($digests)-whirlpool[to use the whirlpool message digest algorithm]" \
- '*:file:_files'
-}
+ local not_need_digest_flags=$1
+ local -a digest_flags=()
+ if (( not_need_digest_flags != 1 )); then
+ local -a digests=($(openssl dgst -list | tail -n +2))
+ for digest in $digests[@]
+ do
+ digest_flags+=("${digest}[use ${digest:1} message digest algorithm]")
+ done
+ fi
-_openssl_dh() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format]:format:(PEM DER)' \
- '-outform[output format]:format:(PEM DER)' \
- '-in[input file]:file:_files' \
- '-out[output file]:file:_files' \
- '-check[check the DH parameters]' \
- '-text[print a text form of the DH parameters]' \
- '-C[output C code]' \
- '-noout[no output]' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines'
+ _arguments \
+ '(- *)-help[print help message]' \
+ $digest_flags[@] \
+ '(- *)-list[print out a list of supported message digests]' \
+ '-c[print out the digest in two digit groups separated by colons]' \
+ '(-d --debug)'{-d,--debug}'[print out BIO debugging information]' \
+ '-hex[digest is to be output as a hex dump]' \
+ '-binary[output the digest or signature in binary form]' \
+ '-xoflen[output length for XOF algorithms]:length' \
+ '-r[output the digest in the "coreutils" format]' \
+ '-out[output file name]:file:_files' \
+ '-sign[private key file or URI to sign the digest]:file_or_uri:_files' \
+ '-keyform[format of the key to sign with]:format:(DER PEM P12 ENGINE)' \
+ '-sigopt[options of signature algorithms during sign or verify operations]:options' \
+ '-passin[private key password source]:source:_openssl_pass_phrase_options' \
+ '-verify[public key file to verify the signature]:file:_files' \
+ '-prverify[private key file to verify the signature]:file:_files' \
+ '-signature[actual signature file to verify]:file:_files' \
+ '-hmac[key to create a hashed MAC]:key' \
+ '-mac[MAC algorithm]:alg:_openssl_mac_algorithms' \
+ '-macopt[options of MAC algorithm]:options' \
+ '-fips-fingerprint[compute HMAC using a specific key for certain OpenSSL-FIPS operations]' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '*::file:_files'
}
-
_openssl_dhparam() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format]:format:(PEM DER)' \
- '-outform[output format]:format:(PEM DER)' \
- '-in[input file]:file:_files' \
- '-out[output file]:file:_files' \
- '-dsaparam[read or generate DSA parameters, convert to DH]' \
- '-check[check the DH parameters]' \
- '-text[print a text form of the DH parameters]' \
- '-C[output C code]' \
- '-2[generate parameters using 2 as the generator value]' \
- '-5[generate parameters using 5 as the generator value]' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-rand[files to use for random number input]:file:_rand_files' \
- '-noout[no output]' \
- ':numbits: '
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-inform[input format(default is PEM)]:format:(DER PEM)' \
+ '-outform[output format(default is PEM)]:format:(DER PEM)' \
+ '-in[input file name to read a CRL from]:file:_files' \
+ '-out[output file name to write the PKCS#7 structure]:file:_files' \
+ '-dsaparam[read or create DSA parameters]' \
+ '-check[perform numerous checks to see]' \
+ '(-2 -3 -5)-2[generator use 2]' \
+ '(-2 -3 -5)-3[generator use 3]' \
+ '(-2 -3 -5)-5[generator use 5]' \
+ '-noout[inhibit the output of the encoded version of the parameters]' \
+ '-text[print out the DH parameters in human readable form]' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '-quiet[suppress the output of progress messages]' \
+ '*::numbits'
}
-
_openssl_dsa() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format]:format:(PEM DER)' \
- '-outform[output format]:format:(PEM DER)' \
- '-in[input file]:file:_files' \
- '-passin[input file pass phrase source]:file:_files' \
- '-out[output file]:file:_files' \
- '-passout[output file pass phrase source]:file:_files' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-des[encrypt PEM output with cbc des]' \
- '-des3[encrypt PEM output with ede cbc des using 168 bit key]' \
- '-idea[encrypt PEM output with cbc idea]' \
- '-aes128[encrypt PEM output with cbc aes]' \
- '-aes192[encrypt PEM output with cbc aes]' \
- '-aes256[encrypt PEM output with cbc aes]' \
- '-camellia128[encrypt PEM output with cbc camellia]' \
- '-camellia192[encrypt PEM output with cbc camellia]' \
- '-camellia256[encrypt PEM output with cbc camellia]' \
- '-seed[encrypt PEM output with cbc seed]' \
- '-text[print the key in text]' \
- "-noout[don't print key out]" \
- '-modulus[print the DSA public value]'
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-inform[key input format]:format:(DER PEM)' \
+ '-outform[key output format(default: PEM)]:format:(DER PEM)' \
+ '-in[input file name]:file:_files' \
+ '-out[output file name to write a key]:file:_files' \
+ '-passin[password source for input file]:source:_openssl_pass_phrase_options' \
+ '-passout[password source for output file]:source:_openssl_pass_phrase_options' \
+ '-aes128[encrypt the private key with aes128 before outputting it]' \
+ '-aes192[encrypt the private key with aes192 before outputting it]' \
+ '-aes256[encrypt the private key with aes256 before outputting it]' \
+ '-aria128[encrypt the private key with aria128 before outputting it]' \
+ '-aria192[encrypt the private key with aria192 before outputting it]' \
+ '-aria256[encrypt the private key with aria256 before outputting it]' \
+ '-camellia128[encrypt the private key with camellia128 before outputting it]' \
+ '-camellia192[encrypt the private key with camellia192 before outputting it]' \
+ '-camellia256[encrypt the private key with camellia256 before outputting it]' \
+ '-des[encrypt the private key with des before outputting it]' \
+ '-des3[encrypt the private key with des3 before outputting it]' \
+ '-idea[encrypt the private key with idea before outputting it]' \
+ '-text[print out the public, private key components and parameters]' \
+ '-noout[prevent output of the encoded version of the key]' \
+ '-modulus[print out the value of the public key component of the key]' \
+ '-pubin[read public key instead of private key]' \
+ '-pubout[output public key instead of private key]' \
+ '-pvk-strong[enable "Strong" PVK encoding level]' \
+ '-pvk-weak[enable "Weak" PVK encoding level]' \
+ '-pvk-none[do not enforce PVK encoding]' \
+ $openssl_provider_options[@]
}
-
_openssl_dsaparam() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format]:format:(PEM DER)' \
- '-outform[output format]:format:(PEM DER)' \
- '-in[input file]:file:_files' \
- '-out[output file]:file:_files' \
- '-text[print as text]' \
- '-C[output C code]' \
- '-noout[no output]' \
- '-genkey[generate a DSA key]' \
- '-rand[files to use for random number input]:file:_rand_files' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- ':numbits: '
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-inform[DSA parameters input format]:format:(DER PEM)' \
+ '-outform[DSA parameters output format]:format:(DER PEM)' \
+ '-in[input file name]:file:_files' \
+ '-out[output file name]:file:_files' \
+ '-noout[inhibit the output of the encoded version of the parameters]' \
+ '-text[print out the DSA parameters in human readable form]' \
+ '-genkey[generate a DSA either using the specified or generated parameters]' \
+ '-verbose[print extra details about the operations being performed]' \
+ '-quiet[print fewer details about the operations being performed]' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '1:numbits' \
+ '2:numqbits'
}
-
_openssl_ec() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format]:format:(PEM DER)' \
- '-outform[output format]:format:(PEM DER)' \
- '-in[input file]:file:_files' \
- '-passin[input file pass phrase source]:file:_files' \
- '-out[output file]:file:_files' \
- '-passout[output file pass phrase source]:file:_files' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- "-des[encrypt PEM output, instead of 'des' every other cipher supported by OpenSSL can be used]" \
- '-text[print the key]' \
- "-noout[don't print key out]" \
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-inform[key input format]:format:(DER PEM P12 ENGINE)' \
+ '-outform[key output format]:format:(DER PEM)' \
+ '-in[input file name or input URI]:file_or_uri:_files' \
+ '-out[output file name]:file:_files' \
+ '-passin[passowrd source for input file]:source:_openssl_pass_phrase_options' \
+ '-passout[passowrd source for output file]:source:_openssl_pass_phrase_options' \
+ '-des[encrypt the private key with DES]' \
+ '-des3[encrypt the private key with DES3]' \
+ '-idea[encrypt the private key with IDEA]' \
+ '-text[print out the public, private key components and parameters]' \
+ '-noout[prevents output of the encoded version of the key]' \
'-param_out[print the elliptic curve parameters]' \
- '-conv_form[specifies the point conversion form]:form:(compressed uncompressed hybrid)' \
- '-param_enc[specifies the way the ec parameters are encoded in the asn1 der encoding]:encoding:(named_curve explicit)'
+ '-pubin[read public key from the input instead of private key]' \
+ '-pubout[output public key instead of private key]' \
+ '-conv_form[how to convert points on the elliptic curve]:how:(compressed uncompressed hybrid)' \
+ '-param_enc[how to encode the elliptic curve parameters]:how:(named_curve explicit)' \
+ '-no_public[omit the public key components from the private key output]' \
+ '-check[check the consistency of an EC private or public key]' \
+ $openssl_provider_options[@]
}
-
_openssl_ecparam() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format]:format:(PEM DER)' \
- '-outform[output format]:format:(PEM DER)' \
- '-in[input file - default stdin]:file:_files' \
- '-out[output file - default stdout]:file:_files' \
- '-noout[do not print the ec parameter]' \
- '-text[print the ec parameters in text form]' \
- '-check[validate the ec parameters]' \
- "-C[print a 'C' function creating the parameters]" \
- "-name[use the ec parameters with 'short name' name]:name: " \
- "-list_curves[prints a list of all currently available curve 'short names']" \
- '-conv_form[specifies the point conversion form]:form:(compressed uncompressed hybrid)' \
- '-param_enc[specifies the way the ec parameters are encoded in the asn1 der encoding]:encoding:(named_curve explicit)' \
- "-no_seed[if 'explicit' parameters are chosen do not use the seed]" \
- '-genkey[generate ec key]' \
- '-rand[files to use for random number input]:file:_rand_files' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines'
-}
+ local -a short_names=($(openssl ecparam -list_curves | awk -F: '/^\s+\S+\s*:/{ print $1 }'))
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-inform[EC parameters input format]:format:(DER PEM)' \
+ '-outform[EC parameters output format]:format:(DER PEM)' \
+ '-in[input file name]:file:_files' \
+ '-out[output file name]:file:_files' \
+ '-noout[inhibit the output of the encoded version of the parameters]' \
+ '-text[print out the EC parameters in human readable form]' \
+ '-check[validate the elliptic curve parameters]' \
+ '-check_named[validate the elliptic name curve parameters]' \
+ '-name[use the EC parameters with the specified short name]:name:(($short_names))' \
+ '-list_curves[print out a list of all currently implemented EC parameters name]' \
+ '-conv_form[specify how the points on the elliptic curve are converted into octet strings]:type:(compressed uncompressed hybrid)' \
+ '-param_enc[specify the how the elliptic curve parameters are encoded]:type:(named_curve explicit)' \
+ '-no_seed[inhibit that the seed for the parameter generation]' \
+ '-genkey[generate an EC private key]' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@]
+}
_openssl_enc() {
- # written for openssl 1.0.1k
- local ciphers
- ciphers=(-aes-128-cbc -aes-128-cbc-hmac-sha1 -aes-128-cfb -aes-128-cfb1 \
- -aes-128-cfb8 -aes-128-ctr -aes-128-ecb -aes-128-gcm -aes-128-ofb \
- -aes-128-xts -aes-192-cbc -aes-192-cfb -aes-192-cfb1 -aes-192-cfb8 \
- -aes-192-ctr -aes-192-ecb -aes-192-gcm -aes-192-ofb -aes-256-cbc \
- -aes-256-cbc-hmac-sha1 -aes-256-cfb -aes-256-cfb1 -aes-256-cfb8 \
- -aes-256-ctr -aes-256-ecb -aes-256-gcm -aes-256-ofb -aes-256-xts \
- -aes128 -aes192 -aes256 -bf -bf-cbc -bf-cfb -bf-ecb -bf-ofb \
- -blowfish -camellia-128-cbc -camellia-128-cfb -camellia-128-cfb1 \
- -camellia-128-cfb8 -camellia-128-ecb -camellia-128-ofb \
- -camellia-192-cbc -camellia-192-cfb -camellia-192-cfb1 \
- -camellia-192-cfb8 -camellia-192-ecb -camellia-192-ofb \
- -camellia-256-cbc -camellia-256-cfb -camellia-256-cfb1 \
- -camellia-256-cfb8 -camellia-256-ecb -camellia-256-ofb \
- -camellia128 -camellia192 -camellia256 -cast -cast-cbc -cast5-cbc \
- -cast5-cfb -cast5-ecb -cast5-ofb -des -des-cbc -des-cfb -des-cfb1 \
- -des-cfb8 -des-ecb -des-ede -des-ede-cbc -des-ede-cfb -des-ede-ofb \
- -des-ede3 -des-ede3-cbc -des-ede3-cfb -des-ede3-cfb1 \
- -des-ede3-cfb8 -des-ede3-ofb -des-ofb -des3 -desx -desx-cbc \
- -id-aes128-GCM -id-aes192-GCM -id-aes256-GCM -idea -idea-cbc \
- -idea-cfb -idea-ecb -idea-ofb -rc2 -rc2-40-cbc -rc2-64-cbc \
- -rc2-cbc -rc2-cfb -rc2-ecb -rc2-ofb -rc4 -rc4-40 -rc4-hmac-md5 \
- -rc5 -rc5-cbc -rc5-cfb -rc5-ecb -rc5-ofb -seed -seed-cbc -seed-cfb \
- -seed-ecb -seed-ofb)
- _arguments -C \
- '-in[input file]:file:_files' \
- '-out[output file]:file:_files' \
- '-pass[pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-e[encrypt]' \
- '-d[decrypt]' \
- '(-a -base64)'{-a,-base64}'[base64 encode/decode, depending on encryption flag]' \
- '-k[the password to derive the key from]:password: ' \
- '-kfile[read the password to derive the key from the first line of the file]:file:_files' \
- '-md[the md to use to create a key from a passphrase]:alg:(md2 md5 sha sha1)' \
- '-S[the actual salt to use]:salt: ' \
- '-K[the actual key to use]:key: ' \
- '-iv[the actual IV to use]:IV: ' \
+ local not_need_cipher_flags=$1
+ local -a cipher_flags=()
+
+ if (( not_need_cipher_flags != 1 )); then
+ local -a ciphers=($(openssl enc -list | tail -n +2 ))
+
+ for cipher in $ciphers[@]
+ do
+ cipher_flags+=("($ciphers)${cipher}[use ${cipher:1}]")
+ done
+ fi
+
+ _arguments \
+ '(- *)-help[print help message]' \
+ '(- *)'{-list,-ciphers}'[list all supported ciphers]' \
+ $cipher_flags[@] \
+ '-in[input file name]:file:_files' \
+ '-out[output file name]:file:_files' \
+ '-pass[password source]:source:_openssl_pass_phrase_options' \
+ '-e[encrypt the input data(default behavior)]' \
+ '-e[decrypt the input data]' \
+ '(-a -base64)'{-a,-base64}'[Base64 proess the data]' \
+ '-A[base64 encoding produces output without any newline character]' \
+ '-k[password to derive the key from]:password' \
+ '-kfile[file to read the password from the first line]:file:_files' \
+ '-md[digest to create the key from the passphrase]:digest:(md2 md5 sha1 shar256)' \
+ '-iter[interation count on the password in deriving the encryption key]:count' \
+ '-pbkdf2[use PBKDF2 algorithm with a default iteration count of 10000]' \
+ '-saltlen[salt length to use when using th -pbkdf2 option]:length' \
+ '-nosalt[do not use a salt in the key derivation routines]' \
+ '-salt[use salt when encrypting]' \
+ '-S[actual salt to use]:salt' \
+ '-K[actual key to use]:key' \
+ '-iv[actual IV to use]:iv' \
'-p[print out the key and IV used]' \
- '-P[print out the key and IV used the exit]' \
- '-bufsize[set the buffer size for I/O]:size: ' \
+ '-P[print out the key and IV used then immediately exit]' \
+ '-bufsize[buffer size of I/O]:size' \
'-nopad[disable standard block padding]' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- "(${ciphers})-aes-128-cbc[cipher types]" \
- "(${ciphers})-aes-128-cbc-hmac-sha1[cipher types]" \
- "(${ciphers})-aes-128-cfb[cipher types]" \
- "(${ciphers})-aes-128-cfb1[cipher types]" \
- "(${ciphers})-aes-128-cfb8[cipher types]" \
- "(${ciphers})-aes-128-ctr[cipher types]" \
- "(${ciphers})-aes-128-ecb[cipher types]" \
- "(${ciphers})-aes-128-gcm[cipher types]" \
- "(${ciphers})-aes-128-ofb[cipher types]" \
- "(${ciphers})-aes-128-xts[cipher types]" \
- "(${ciphers})-aes-192-cbc[cipher types]" \
- "(${ciphers})-aes-192-cfb[cipher types]" \
- "(${ciphers})-aes-192-cfb1[cipher types]" \
- "(${ciphers})-aes-192-cfb8[cipher types]" \
- "(${ciphers})-aes-192-ctr[cipher types]" \
- "(${ciphers})-aes-192-ecb[cipher types]" \
- "(${ciphers})-aes-192-gcm[cipher types]" \
- "(${ciphers})-aes-192-ofb[cipher types]" \
- "(${ciphers})-aes-256-cbc[cipher types]" \
- "(${ciphers})-aes-256-cbc-hmac-sha1[cipher types]" \
- "(${ciphers})-aes-256-cfb[cipher types]" \
- "(${ciphers})-aes-256-cfb1[cipher types]" \
- "(${ciphers})-aes-256-cfb8[cipher types]" \
- "(${ciphers})-aes-256-ctr[cipher types]" \
- "(${ciphers})-aes-256-ecb[cipher types]" \
- "(${ciphers})-aes-256-gcm[cipher types]" \
- "(${ciphers})-aes-256-ofb[cipher types]" \
- "(${ciphers})-aes-256-xts[cipher types]" \
- "(${ciphers})-aes128[cipher types]" \
- "(${ciphers})-aes192[cipher types]" \
- "(${ciphers})-aes256[cipher types]" \
- "(${ciphers})-bf[cipher types]" \
- "(${ciphers})-bf-cbc[cipher types]" \
- "(${ciphers})-bf-cfb[cipher types]" \
- "(${ciphers})-bf-ecb[cipher types]" \
- "(${ciphers})-bf-ofb[cipher types]" \
- "(${ciphers})-blowfish[cipher types]" \
- "(${ciphers})-camellia-128-cbc[cipher types]" \
- "(${ciphers})-camellia-128-cfb[cipher types]" \
- "(${ciphers})-camellia-128-cfb1[cipher types]" \
- "(${ciphers})-camellia-128-cfb8[cipher types]" \
- "(${ciphers})-camellia-128-ecb[cipher types]" \
- "(${ciphers})-camellia-128-ofb[cipher types]" \
- "(${ciphers})-camellia-192-cbc[cipher types]" \
- "(${ciphers})-camellia-192-cfb[cipher types]" \
- "(${ciphers})-camellia-192-cfb1[cipher types]" \
- "(${ciphers})-camellia-192-cfb8[cipher types]" \
- "(${ciphers})-camellia-192-ecb[cipher types]" \
- "(${ciphers})-camellia-192-ofb[cipher types]" \
- "(${ciphers})-camellia-256-cbc[cipher types]" \
- "(${ciphers})-camellia-256-cfb[cipher types]" \
- "(${ciphers})-camellia-256-cfb1[cipher types]" \
- "(${ciphers})-camellia-256-cfb8[cipher types]" \
- "(${ciphers})-camellia-256-ecb[cipher types]" \
- "(${ciphers})-camellia-256-ofb[cipher types]" \
- "(${ciphers})-camellia128[cipher types]" \
- "(${ciphers})-camellia192[cipher types]" \
- "(${ciphers})-camellia256[cipher types]" \
- "(${ciphers})-cast[cipher types]" \
- "(${ciphers})-cast-cbc[cipher types]" \
- "(${ciphers})-cast5-cbc[cipher types]" \
- "(${ciphers})-cast5-cfb[cipher types]" \
- "(${ciphers})-cast5-ecb[cipher types]" \
- "(${ciphers})-cast5-ofb[cipher types]" \
- "(${ciphers})-des[cipher types]" \
- "(${ciphers})-des-cbc[cipher types]" \
- "(${ciphers})-des-cfb[cipher types]" \
- "(${ciphers})-des-cfb1[cipher types]" \
- "(${ciphers})-des-cfb8[cipher types]" \
- "(${ciphers})-des-ecb[cipher types]" \
- "(${ciphers})-des-ede[cipher types]" \
- "(${ciphers})-des-ede-cbc[cipher types]" \
- "(${ciphers})-des-ede-cfb[cipher types]" \
- "(${ciphers})-des-ede-ofb[cipher types]" \
- "(${ciphers})-des-ede3[cipher types]" \
- "(${ciphers})-des-ede3-cbc[cipher types]" \
- "(${ciphers})-des-ede3-cfb[cipher types]" \
- "(${ciphers})-des-ede3-cfb1[cipher types]" \
- "(${ciphers})-des-ede3-cfb8[cipher types]" \
- "(${ciphers})-des-ede3-ofb[cipher types]" \
- "(${ciphers})-des-ofb[cipher types]" \
- "(${ciphers})-des3[cipher types]" \
- "(${ciphers})-desx[cipher types]" \
- "(${ciphers})-desx-cbc[cipher types]" \
- "(${ciphers})-id-aes128-GCM[cipher types]" \
- "(${ciphers})-id-aes192-GCM[cipher types]" \
- "(${ciphers})-id-aes256-GCM[cipher types]" \
- "(${ciphers})-idea[cipher types]" \
- "(${ciphers})-idea-cbc[cipher types]" \
- "(${ciphers})-idea-cfb[cipher types]" \
- "(${ciphers})-idea-ecb[cipher types]" \
- "(${ciphers})-idea-ofb[cipher types]" \
- "(${ciphers})-rc2[cipher types]" \
- "(${ciphers})-rc2-40-cbc[cipher types]" \
- "(${ciphers})-rc2-64-cbc[cipher types]" \
- "(${ciphers})-rc2-cbc[cipher types]" \
- "(${ciphers})-rc2-cfb[cipher types]" \
- "(${ciphers})-rc2-ecb[cipher types]" \
- "(${ciphers})-rc2-ofb[cipher types]" \
- "(${ciphers})-rc4[cipher types]" \
- "(${ciphers})-rc4-40[cipher types]" \
- "(${ciphers})-rc4-hmac-md5[cipher types]" \
- "(${ciphers})-rc5[cipher types]" \
- "(${ciphers})-rc5-cbc[cipher types]" \
- "(${ciphers})-rc5-cfb[cipher types]" \
- "(${ciphers})-rc5-ecb[cipher types]" \
- "(${ciphers})-rc5-ofb[cipher types]" \
- "(${ciphers})-seed[cipher types]" \
- "(${ciphers})-seed-cbc[cipher types]" \
- "(${ciphers})-seed-cfb[cipher types]" \
- "(${ciphers})-seed-ecb[cipher types]" \
- "(${ciphers})-seed-ofb[cipher types]"
+ '-v[verbose print]' \
+ '-debug[debug the BIOs used for I/O]' \
+ '-z[compress or decompress encrypted data using zlib after encrypting or before decryption]' \
+ '-none[use NULL cipher]' \
+ '-skeymgmt[name of the EVP_SKEYMGMT to be used]:name' \
+ '-skeyopt[opaque symmetric key options]:options' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@]
}
-
-_openssl_engine() {
- # written for openssl 1.0.1k
- _arguments -C \
- '(-vv -vvv -vvvv)-v[verbose mode, for each engine, list its "control commands"]' \
- "(-v -vvv -vvvv)-vv[like -v, but additionally display each command's description]" \
- '(-v -vv -vvvv)-vvv[like -vv, but also add the input flags for each command]' \
- '(-v -vv -vvv)-vvvv[like -vvv, but also show internal input flags]' \
- '-c[for each engine, also list the capabilities]' \
- '(-tt)-t[for each engine, check that they are really available]' \
- '(-t)-tt[display error trace for unavailable engines]' \
- "-pre[runs command 'cmd' against the ENGINE before any attempts to load it (if -t is used)]:cmd: " \
- "-post[runs command 'cmd' against the ENGINE after loading it (only used if -t is also provided)]:cmd: " \
- '*:engine:_engines'
- # TODO: can cmd (for -pre and -post) be completed?
+_openssl_errstr() {
+ _arguments \
+ '(- *)-help[print help message]' \
+ '*:error_code'
}
+_openssl_fipsinstall() {
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-module[file name of the FIPS module]:file:_files' \
+ '-out[file name to output configuration data to]:file:_files' \
+ '-in[input file name to load configuration data from]:_files' \
+ '-verify[verify the input configuration file]' \
+ '-provider_name[name of the provider inside the configuration file(default: "fips")]:name' \
+ '-section_name[name of the section inside the configuration file(default: "fips_sect")]:name' \
+ '-mac_name[name of a supported MAC algorithm]:name:_openssl_mac_algorithms' \
+ '-macopt[options of the MAC algorithm]:option' \
+ '-noout[disable logging of the self tests]' \
+ '-pedantic[strictly FIPS compliant]' \
+ '-no_conditional_errors[not enter an error state]' \
+ '-no_security_checks[not perform run-time security checks]' \
+ '-ems_check[enable a run-time Extended Master Secret]' \
+ '-no_short_mac[not allow short MAC outputs]' \
+ '-hmac_key_check[not allow small keys sizes when using HMAC]' \
+ '-kmac_key_check[not allow small keys sizes when using KMAC]' \
+ '-no_drbg_truncated_digests[not allow truncated digests with Hash and HMAC DRBGs]' \
+ '-signature_digest_check[enforce signature algorithms to use digests]' \
+ '-tls13_kdf_digest_check[enable a run-time digest check when deriving a key by TLS13 KDF]' \
+ '-tls1_prf_digest_check[enable a run-time digest check when deriving a key by TLS_PRF]' \
+ '-sshkdf_digest_check[enable a run-time digest check when deriving a key by SSHKDF]' \
+ '-x963kdf_digest_check[enable a run-time digest check when deriving a key by X963KDF]' \
+ '-dsa_sign_disabled[not allow DSA signing]' \
+ '-tdes_encrypt_disabled[not allow Triple-DES encryption]' \
+ '-rsa_pkcs15_padding_disabled[not allow PKCS#1 version 1.5 padding]' \
+ '-rsa_pss_saltlen_check[enable a run-time salt length check]' \
+ '-rsa_sign_x931_disabled[not allow X9.31 padding]' \
+ '-hkdf_key_check[enable a run-time short key-derivation key check when deriving a key by HKDF]'\
+ '-kbkdf_key_check[enable a run-time short key-derivation key check when deriving a key by KBKDF]'\
+ '-tls13_kdf_key_check[enable a run-time short key-derivation key check when deriving a key by TLS13 KFD]'\
+ '-tls1_prf_key_check[enable a run-time short key-derivation key check when deriving a key by TLS_PRF]'\
+ '-sshkdf_key_check[enable a run-time short key-derivation key check when deriving a key by SSHKDF]'\
+ '-sskdf_key_check[enable a run-time short key-derivation key check when deriving a key by SSKDF]'\
+ '-x963kdf_key_check[enable a run-time short key-derivation key check when deriving a key by X963KDF]'\
+ '-x942kdf_key_check[enable a run-time short key-derivation key check when deriving a key by X942KDF]'\
+ '-no_pbkdf2_lower_bound_check[not perform run-time lower bound check for PBKDF2]' \
+ '-ecdh_cofactor_check[enable a run-time check that ECDH uses the EC curves cofactor value]' \
+ '-self_test_onload[do not write two fields related to "test status indicator" and "MAC status indicator"]' \
+ '-self_test_oninstall[ write two fields related to "test status indicator" and "MAC status indicator]' \
+ '-quiet[do not output pass/fail messages]' \
+ '-corrupt_desc[currupt description to be used to test failure]:description' \
+ '-corrupt_type[currupt type to be used to test failure]:type' \
+ '-config[configuration file]:file:_files'
+}
-_openssl_errstr() {
- # written for openssl 1.0.1k
- # written for openssl 1.0.2a
- _arguments -C \
- '-stats' \
- ':errno: '
+_openssl_gendsa() {
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-out[output file name]' \
+ '-passout[passphrase used for the output file]:option:_openssl_pass_phrase_options'\
+ '-aes128[encrypt the private key with aes128 before outputting it]' \
+ '-aes192[encrypt the private key with aes192 before outputting it]' \
+ '-aes256[encrypt the private key with aes256 before outputting it]' \
+ '-aria128[encrypt the private key with aria128 before outputting it]' \
+ '-aria192[encrypt the private key with aria192 before outputting it]' \
+ '-aria256[encrypt the private key with aria256 before outputting it]' \
+ '-camellia128[encrypt the private key with camellia128 before outputting it]' \
+ '-camellia192[encrypt the private key with camellia192 before outputting it]' \
+ '-camellia256[encrypt the private key with camellia256 before outputting it]' \
+ '-des[encrypt the private key with des before outputting it]' \
+ '-des3[encrypt the private key with des3 before outputting it]' \
+ '-idea[encrypt the private key with idea before outputting it]' \
+ '-verbose[print extra details about the operations being performed]' \
+ '-quiet[print fewer details about the operations being performed]' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '*:paramfile:_files'
}
+_openssl_genpkey() {
+ local -a builtin_algorithms=(
+ RSA DSA DH DHX EC
+ RSA RSA-PSS EC X25519 X448 ED25519 ED448
+ ML-DSA-44 ML-DSA-5 ML-DSA-87
+ ML-KEM-512 ML-KEM-768 ML-KEM-1024
+ )
-_openssl_gendh() {
- # written for openssl 1.0.1k
- _arguments -C \
- "-out[output the key to 'file']:file:_files" \
- '-2[use 2 as the generator value]' \
- '-5[use 5 as the generator value]' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-rand[files to use for random number input]:file:_rand_files' \
- ':numbits: '
-}
+ local -a ciphers=($(openssl enc -list | tail -n +2 ))
+ local -a cipher_flags=()
+ for cipher in $ciphers[@]
+ do
+ cipher_flags+=("($ciphers)${cipher}[use ${cipher:1}]")
+ done
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-out[output private key file]:file:_files' \
+ '-outpubkey[output public key file]:file:_files' \
+ '-outform[output format]:format:(DER PEM)' \
+ '-verbose[output "status dots" while generating keys]' \
+ '-quiet[do not output "status dots" while generating keys]' \
+ '-pass[output file password source]:source:_openssl_pass_phrase_options' \
+ $cipher_flags[@] \
+ '-algorithm[public key algorithm]:alg:(($builtin_algorithms))' \
+ '-pkeyopt[public key algorithm option]:option' \
+ '-genparam[generate a set of parameters instead of a private key]' \
+ '-paramfile[file to supply public key parameters]:file:_files' \
+ '-text[print an (unencrypted) text representation of private and public keys and parameters]' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '-config[configuration file]:file:_files'
+}
-_openssl_gendsa() {
- # written for openssl 1.0.1k
- _arguments -C \
- "-out[output the key to 'file']:file:_files" \
- '-des[encrypt the generated key with DES in cbc mode]' \
- '-des3[encrypt the generated key with DES in ede cbc mode (168 bit key)]' \
- '-idea[encrypt the generated key with IDEA in cbc mode]' \
- '-seed[encrypt PEM output with cbc seed]' \
- '-aes128[encrypt PEM output with cbc aes]' \
- '-aes192[encrypt PEM output with cbc aes]' \
- '-aes256[encrypt PEM output with cbc aes]' \
- '-camellia128[encrypt PEM output with cbc camellia]' \
- '-camellia192[encrypt PEM output with cbc camellia]' \
- '-camellia256[encrypt PEM output with cbc camellia]' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-rand[files to use for random number input]:file:_rand_files' \
- ':dsaparam-file:_files'
+_openssl_genrsa() {
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-out[output key file name]:file:_files' \
+ '-passout[output file password source]:source:_openssl_pass_phrase_options' \
+ '-aes128[encrypt the private key with AES128]' \
+ '-aes192[encrypt the private key with AES192]' \
+ '-aes256[encrypt the private key with AES256]' \
+ '-aria128[encrypt the private key with ARIA128]' \
+ '-aria192[encrypt the private key with ARIA192]' \
+ '-aria256[encrypt the private key with ARIA256]' \
+ '-camellia128[encrypt the private key with CAMELLIA128]' \
+ '-camellia192[encrypt the private key with CAMELLIA192]' \
+ '-camellia256[encrypt the private key with CAMELLIA256]' \
+ '-des[encrypt the private key with DES]' \
+ '-des3[encrypt the private key with DES3]' \
+ '-idea[encrypt the private key with IDEA]' \
+ '(-F4 -f4)'{-F4,-f4}'[use 65537 as public exponent]' \
+ '-primes[specify the number of primes to use while generating the RSA key]:num' \
+ '-verbose[print extra details about the operations being performed]' \
+ '-quiet[print fewer details about the operations being performed]' \
+ '-traditional[write the key using the traditional PKCS#1 format]' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '::numbits'
}
+_openssl_help() {
+ local -a commands=(
+ # Standard commands
+ asn1parse ca ciphers cmp
+ cms crl crl2pkcs7 dgst
+ dhparam dsa dsaparam ec
+ ecparam enc engine errstr
+ fipsinstall gendsa genpkey genrsa
+ help info kdf list
+ mac nseq ocsp passwd
+ pkcs12 pkcs7 pkcs8 pkey
+ pkeyparam pkeyutl prime rand
+ rehash req rsa rsautl
+ s_client s_server s_time sess_id
+ skeyutl smime speed spkac
+ srp storeutl ts verify
+ version x509
-_openssl_genpkey() {
- # written for openssl 1.0.1k
- local ciphers cipher_opts
- if ! ciphers=( ${$(openssl list-cipher-algorithms | cut -d' ' -f1)} ) 2>/dev/null ; then
- ciphers=( ${$(openssl list -cipher-algorithms | cut -d' ' -f1)} )
- fi
- cipher_opts=()
- for alg in ${ciphers}; do
- cipher_opts=(${cipher_opts} "(${${(l:32:: ::-:)ciphers[@]}// / })-${alg}[use this cipher to encrypt the key]")
- done
- _arguments -C \
- '-out[output file]:file:_files' \
- '-outform[output format]:format:(PEM DER)' \
- '-pass[output file pass phrase source]:pass phrase source:_pass_phrase_source' \
- $cipher_opts \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '(-algorithm)-paramfile[parameters file]:file:_files' \
- '(-paramfile)-algorithm[the public key algorithm]:algorithm:(EC RSA DSA DH)' \
- '-pkeyopt[public key options]:option\:value: ' \
- '-genparam[generate parameters, not key]' \
- '-text[print the in text]'
- # NB: options order may be important! See the manual page.
- # TODO: complete pkeyopts
- # However: "The precise set of options supported depends on the public key
- # algorithm used and its implementation."
+ # Message Digest commands (see the `dgst' command for more details)
+ blake2b512 blake2s256 md4 md5
+ rmd160 sha1 sha224 sha256
+ sha3-224 sha3-256 sha3-384 sha3-512
+ sha384 sha512 sha512-224 sha512-256
+ shake128 shake256 sm3
+
+ # Cipher commands (see the `enc' command for more details)
+ aes-128-cbc aes-128-ecb aes-192-cbc aes-192-ecb
+ aes-256-cbc aes-256-ecb aria-128-cbc aria-128-cfb
+ aria-128-cfb1 aria-128-cfb8 aria-128-ctr aria-128-ecb
+ aria-128-ofb aria-192-cbc aria-192-cfb aria-192-cfb1
+ aria-192-cfb8 aria-192-ctr aria-192-ecb aria-192-ofb
+ aria-256-cbc aria-256-cfb aria-256-cfb1 aria-256-cfb8
+ aria-256-ctr aria-256-ecb aria-256-ofb base64
+ bf bf-cbc bf-cfb bf-ecb
+ bf-ofb camellia-128-cbc camellia-128-ecb camellia-192-cbc
+ camellia-192-ecb camellia-256-cbc camellia-256-ecb cast
+ cast-cbc cast5-cbc cast5-cfb cast5-ecb
+ cast5-ofb des des-cbc des-cfb
+ des-ecb des-ede des-ede-cbc des-ede-cfb
+ des-ede-ofb des-ede3 des-ede3-cbc des-ede3-cfb
+ des-ede3-ofb des-ofb des3 desx
+ rc2 rc2-40-cbc rc2-64-cbc rc2-cbc
+ rc2-cfb rc2-ecb rc2-ofb rc4
+ rc4-40 seed seed-cbc seed-cfb
+ seed-ecb seed-ofb sm4-cbc sm4-cfb
+ sm4-ctr sm4-ecb sm4-ofb zlib
+ zstd
+ )
+
+ _values commands $commands
}
+_openssl_info() {
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-configdir[outputs the default directory for OpenSSL configuration files]' \
+ '-enginesdir[outputs the default directory for OpenSSL engine modules]' \
+ '-modulesdir[outputs the default directory for OpenSSL dynamically loadable modules]' \
+ '-dsoext[outputs the DSO extension OpenSSL uses]' \
+ '-dirnamesep[outputs the separator character between a directory specification and a filename]' \
+ '-listsep[outputs the OpenSSL list separator character]' \
+ '-seeds[outputs the randomness seed sources]' \
+ '-cpusettings[outputs the OpenSSL CPU settings info]' \
+ '-windowscontext[outputs the Windows install context]'
+}
-_openssl_genrsa() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-des[encrypt the generated key with DES in cbc mode]' \
- '-des3[encrypt the generated key with DES in ede cbc mode (168 bit key)]' \
- '-idea[encrypt the generated key with IDEA in cbc mode]' \
- '-seed[encrypt PEM output with cbc seed]' \
- '-aes128[encrypt PEM output with cbc aes]' \
- '-aes192[encrypt PEM output with cbc aes]' \
- '-aes256[encrypt PEM output with cbc aes]' \
- '-camellia128[encrypt PEM output with cbc camellia]' \
- '-camellia192[encrypt PEM output with cbc camellia]' \
- '-camellia256[encrypt PEM output with cbc camellia]' \
- '-out[output the key to file]:file:_files' \
- '-passout[output file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-f4[use F4 (0x10001) for the E value]' \
- '-3[use 3 for the E value]' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-rand[files to use for random number input]:file:_rand_files' \
- ':numbits: '
+_openssl_list() {
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-verbose[displays extra information]' \
+ '-select[only list algorithms that match this name]:name' \
+ '-1[list the commands, digest-commands, or cipher-commands in a single column]' \
+ '-all-algorithms[display lists of all algorithms]' \
+ '-commands[display a list of standard command]' \
+ '-standard-commands[display list of standard commands]' \
+ '-digest-commands[display a list of message digest commands(deprecated)]' \
+ '-cipher-commands[display a list of cipher commands(deprecated)]' \
+ '-cipher-algorithms[display a list of symmetric cipher algorithms]' \
+ '-digest-algorithms[display a list of digest algorithms]' \
+ '-kdf-algorithms[display a list of kdf algorithms]' \
+ '-mac-algorithms[display a list of mac algorithms]' \
+ '-random-instances[list the primary, public and private random number generator details]' \
+ '-random-generators[display a list of random number generators]' \
+ '-encoders[display a list of encoders]' \
+ '-decoders[display a list of decoders]' \
+ '-public-key-algorithms[display a list of public key algorithms]' \
+ '-public-key-methods[display a list of public key methods]' \
+ '-key-managers[display a list of key managers]' \
+ '-skey-managers[display a list of symmetric key managers]' \
+ '-key-exchange-algorithms[display a list of key exchange algorithms]' \
+ '-kem-algorithms[display a list of key encapsulation algorithms]' \
+ '-tls-groups[display a list of the IANA names of all available TLS groups]' \
+ '-all-tls-groups[display a list of the names of all available TLS groups]' \
+ '-tls1_2[list TLS groups compatible with TLS 1.2]'\
+ '-tls1_3[list TLS groups compatible with TLS 1.3]'\
+ '-signature-algorithms[display a list of signature algorithms]' \
+ '-tls-signature-algorithms[display the list of signature algorithms available for TLS handshakes]' \
+ '-asymcipher-algorithms[display a list of asymmetric cipher algorithms]' \
+ '-store-loaders[display a list of store loaders]' \
+ '-providers[display a list of all loaded providers with their names, version and status]' \
+ '-disabled[display a list of disabled features]' \
+ '-objects[display a list of built in objects]' \
+ '-options[output a two-column list of the options accepted by the specified command]:command:_openssl_help' \
+ $openssl_provider_options[@]
}
+_openssl_mac() {
+ local -a cbc_or_gcm_ciphers=(
+ AES-128-CBC AES-192-CBC AES-256-CBC
+ AES-128-GCM AES-192-GCM AES-256-GCM
+ )
-_openssl_nseq() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-in[input file]:file:_files' \
- '-out[output file]:file:_files' \
- '-toseq[output NS Sequence file]'
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-in[input file name to calculate a MAC]:file:_files' \
+ '-out[output file name]:file:_files' \
+ '-binary[output the MAC in binary form]' \
+ '-cipher[specify the cipher algorithm]:ciper:(($cbc_or_gcm_ciphers))' \
+ '-digest[use HMAC as an alphanumeric string]:name:_openssl_digests' \
+ '-macopt[options to the MAC algorithm]:options:_openssl_macopts' \
+ $openssl_provider_options[@] \
+ '*:mac_name:_openssl_mac_algorithms'
}
+_openssl_nseq() {
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-in[input file name to read]:file:_files' \
+ '-out[output file name]:file:_files' \
+ '-toseq[output Netscape certificate sequence]' \
+ $openssl_provider_options[@]
+}
_openssl_ocsp() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-out[output filename]:file:_files' \
- '-issuer[issuer certificate]:file:_files' \
- '-cert[certificate to check]:file:_files' \
- '-serial[serial number to check]:serial: ' \
- '-signer[certificate to sign OCSP request with]:file:_files' \
- '-signkey[private key to sign OCSP request with]:file:_files' \
- '-sign_other[additional certificates to include in signed request]:file:_files' \
- "-no_certs[don't include any certificates in signed request]" \
- '-req_text[print text form of request]' \
- '-resp_text[print text form of response]' \
- '-text[print text form of request and response]' \
- '-reqout[write DER encoded OCSP request to "file"]:file:_files' \
- '-respout[write DER encoded OCSP response to "file"]:file:_files' \
- '-reqin[read DER encoded OCSP request from "file"]:file:_files' \
- '-respin[read DER encoded OCSP response from "file"]:file:_files' \
- '-nonce[add OCSP nonce to request]' \
- "-no_nonce[don't add OCSP nonce to request]" \
- '-url[OCSP responder URL]:URL: ' \
- '-host[send OCSP request to given host on given port]:host\:port: ' \
- '-path[path to use in OCSP request]' \
- '-CApath[trusted certificates directory]:directory:_files -/' \
- '-CAfile[trusted certificates file]:file:_files' \
- '-VAfile[validator certificates file]:file:_files' \
- '-validity_period[maximum validity discrepancy in seconds]:seconds: ' \
+ local -a digests=($(openssl dgst -list | tail -n +2))
+ local -a digest_flags=()
+ for digest in $digests[@]
+ do
+ digest_flags+=("${digest}[use ${digest:1} message digest algorithm]")
+ done
+
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-out[output file name]:file:_files' \
+ '-issuer[specify the current issuer certificate]:file:_files' \
+ '-cert[certificate file name to request]:file:_files' \
+ '-no_certs[do not include any certificates in signed request]' \
+ '-serial[serial number of certificate]:num' \
+ '-signer[signer to sign the OSCP request]:file:_files' \
+ '-signkey[private key to sign the OCSP request]:file:_files' \
+ '-sign_other[additional certificates to include in the signed request]:file:_files' \
+ '(-nonce -no_nonce)-nonce[add an OCSP nonce extension to a request]' \
+ '(-nonce -no_nonce)-no-nonce[disable OCSP nonce addition]' \
+ '-req_text[print out the text form of the OCSP request]' \
+ '-resp_text[print out the text form of the OCSP response]' \
+ '-text[print out the text form of the OCSP both request and response]' \
+ '-reqout[write out the DER-encoded OCSP request to file]:file:_files' \
+ '-respout[write out the DER-encoded OCSP response to file]:file:_files' \
+ '-reqin[read OCSP request from file]:file:_files' \
+ '-respin[read OCSP response from file]:file:_files' \
+ '-url[responder host and optionally port and path via a URL]:url:_urls' \
+ '-host[host and port to be sent the OCSP request]:host' \
+ '-path[HTTP path to be sent the OCSP request]:path' \
+ '-proxy[HTTP(S) proxy server to use for reaching the OCSP server]:address' \
+ '-no_proxy[list of IP addresses and DNS names of servers not to use an HTTP(S) proxy for]:addresses' \
+ '*-head[add the header name with the specified value to the OCSP request]:key_value' \
+ '-timeout[connection timeout to the OCSP responder in seconds]:seconds' \
+ '-verify_other[file or URI containing additional certificates to search for signer]:file:_files' \
+ '-trust_other[do not verify additional certificates]' \
+ '-VAfile[file or URI containing explicitly trusted responder certificates]:file:_files' \
+ '-noverify[do not attempt to verify the OCSP response signature or the nonce values]' \
+ '-no_intern[ignore certificates contained in the OCSP response]' \
+ '-no_signature_verify[do not check the signature on the OCSP response]' \
+ '-no_cert_verify[do not verify the OCSP response signers certificate at all]' \
+ '-no_chain[do not use certificates in the response as additional untrusted CA certificates]' \
+ '-no_explicit[do not explicitly trust the root CA]' \
+ '-no_cert_checks[do not perform any additional checks on the OCSP response signers certificate]' \
+ '-validity_period[acceptable error range in seconds]:nsec' \
'-status_age[maximum status age in seconds]:seconds: ' \
- "-noverify[don't verify response at all]" \
- '-verify_other[additional certificates to search for signer]:file:_files' \
- "-trust_other[don't verify additional certificates]" \
- "-no_intern[don't search certificates contained in response for signer]" \
- "-no_signature_verify[don't check signature on response]" \
- "-no_cert_verify[don't check signing certificate]" \
- "-no_chain[don't chain verify response]" \
- "-no_cert_checks[don't do additional checks on signing certificate]" \
- '-port[port to run responder on]:port: ' \
- '-index[certificate status index file]:file:_files' \
- '-CA[CA certificate]:file:_files' \
- '-rsigner[responder certificate to sign responses with]:file:_files' \
- '-rkey[responder key to sign responses with]:file:_files' \
- '-rother[other certificates to include in response]:file:_files' \
- "-resp_no_certs[don't include any certificates in response]" \
- '-nmin[number of minutes before next update]:minutes: ' \
- '-ndays[number of days before next update]:days: ' \
- '-resp_key_id[identify response by signing certificate key ID]' \
- '-nrequest[number of requests to accept (default unlimited)]:limit: ' \
- '-dss1[use specified digest in the request]' \
- '-md4[use specified digest in the request]' \
- '-md5[use specified digest in the request]' \
- '-mdc2[use specified digest in the request]' \
- '-ripemd160[use specified digest in the request]' \
- '-ripemd[use specified digest in the request]' \
- '-rmd160[use specified digest in the request]' \
- '-sha1[use specified digest in the request]' \
- '-sha224[use specified digest in the request]' \
- '-sha256[use specified digest in the request]' \
- '-sha384[use specified digest in the request]' \
- '-sha512[use specified digest in the request]' \
- '-sha[use specified digest in the request]' \
- '-ssl2-md5[use specified digest in the request]' \
- '-ssl3-md5[use specified digest in the request]' \
- '-ssl3-sha1[use specified digest in the request]' \
- '-whirlpool[use specified digest in the request]' \
- '-timeout[timeout connection to OCSP responder after n seconds]:seconds: '
+ '-rcid[digest algorithm to use for certificate identification in the OCSP response]:digest:_openssl_digests' \
+ $digest_flags[@] \
+ $openssl_trusted_certificate_options[@] \
+ $openssl_verification_options[@] \
+ $openssl_provider_options[@] \
+ '-index[index file parameter]:file:_files' \
+ '-CA[index file of CA certificate corresponding to the revocation information]:file:_files' \
+ '-rsigner[certificate to sign OCSP responses with]:file:_files' \
+ '-rkey[private key to sign OCSP responses with]:file:_files' \
+ '-passin[private key password source]:source:_openssl_pass_phrase_options' \
+ '-rother[additional certificates to include in the OCSP response]:file:_files' \
+ '-rsigopt[pass options to the signature algorithm when signing OCSP responses]:option' \
+ '-rmd[digest to use when signing the reponse]:digest:_openssl_digests' \
+ '-badsig[corrupt the response signature before writing it]' \
+ '-resp_no_certs[do not include any certificates in the OCSP response]' \
+ '-resp_key_id[identify the signer certificate using the key ID]'\
+ '-port[port to listen for OCSP requests on]:port' \
+ '-ignore_err[ignore malformed requests or responses]' \
+ '-nrequest[request number that OCSP server will exit after this number of requests]:number' \
+ '-multi[run the specified number of OCSP responder child processes]:process_count' \
+ '-nmin[number of minites when fresh revocation information]:minites' \
+ '-nmin[number of days when fresh revocation information]:minites'
}
-
_openssl_passwd() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-crypt[standard Unix password algorithm (default)]' \
- '-1[MD5-based password algorithm]' \
- '-apr1[MD5-based password algorithm, Apache variant]' \
- '-salt[use provided salt]:salt: ' \
- '-in[read passwords from file]:file:_files' \
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-1[use the MD5 based BSD password algorithms(default)]' \
+ '-apr[use the apr1 algorithms(Apache variant of the BSD algorithm)]' \
+ '-aixmd5[use the AIX MD5 algorithm]' \
+ '-5[use the SHA256 based algorithms defined by Ulrich Drepper]' \
+ '-6[use the SHA512 based algorithms defined by Ulrich Drepper]' \
+ '-salt[use the specified salt]:salt' \
+ '-in[read passwords from file]:file' \
'-stdin[read passwords from stdin]' \
- '-noverify[never verify when reading password from terminal]' \
- '-quiet[no warnings]' \
+ '-noverify[do not verify when reading a password from the terminal]' \
+ '-quiet[do not output warnings when passwords given at the command line are truncated]' \
'-table[format output as table]' \
- '-reverse[switch table columns]' \
- '*:password:'
+ '-reverse[when the -table -option is used, reverse the order of cleartext and hash]' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '*::password'
}
-
_openssl_pkcs12() {
- # written for openssl 1.0.2d
- local algorithms
- algorithms=(aes-128-cbc aes-128-ecb aes-192-cbc aes-192-ecb aes-256-cbc \
- aes-256-ecb bf-cbc bf-cfb bf-ecb bf-ofb camellia-128-cbc \
- camellia-128-ecb camellia-192-cbc camellia-192-ecb \
- camellia-256-cbc camellia-256-ecb cast-cbc cast5-cbc cast5-cfb \
- cast5-ecb cast5-ofb des-cbc des-cfb des-ecb des-ede des-ede-cbc \
- des-ede-cfb des-ede-ofb des-ede3 des-ede3-cbc des-ede3-cfb \
- des-ede3-ofb des-ofb idea-cbc idea-cfb idea-ecb idea-ofb \
- rc2-40-cbc rc2-64-cbc rc2-cbc rc2-cfb rc2-ecb rc2-ofb rc4 \
- rc4-40 rc5-cbc rc5-cfb rc5-ecb rc5-ofb seed-cbc seed-cfb \
- seed-ecb seed-ofb PBE-MD2-DES PBE-MD5-DES PBE-SHA1-RC2-64 \
- PBE-MD2-RC2-64 PBE-MD5-RC2-64 PBE-SHA1-DES PBE-SHA1-RC4-128 \
- PBE-SHA1-RC4-40 PBE-SHA1-3DES PBE-SHA1-2DES PBE-SHA1-RC2-128 \
- PBE-SHA1-RC2-40)
- _arguments -C \
- '-export[output PKCS12 file]' \
- '-chain[add certificate chain]' \
- '-inkey[private key if not infile]:file:_files' \
- '-certfile[add all certs in the specified file]:file:_files' \
- "-CApath[PEM format directory of CA's]:file:_files" \
- "-CAfile[PEM format file of CA's]:file:_files" \
- '-name[use specified friendly name]:name: ' \
- '*-caname[use specified CA friendly name]:name: ' \
- '-in[input filename]:file:_files' \
- '-out[output filename]:file:_files' \
- "-noout[don't output anything, just verify]" \
- "-nomacver[don't verify MAC]" \
- "-nocerts[don't output certificates]" \
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-passin[input password source]:source:_openssl_pass_phrase_options' \
+ '-passout[output password source]:source:_openssl_pass_phrase_options' \
+ '-password[password source]:source:_openssl_pass_phrase_options' \
+ '-twopass[prompt for separate integrity and encryption passwords]' \
+ '-nokeys[no private keys will be output]' \
+ '-nocerts[no certificates will be output]' \
+ '-noout[inhibit all credentials output]' \
+ '-legacy[use legacy mode of operation and automatically load the legacy provider]' \
+ $openssl_provider_options[@] \
+ $openssl_random_state_options[@] \
+ '-in[input file name or URI]:file_or_uri:_files' \
+ '-out[output file name]:file:_files' \
+ '-info[output additional information about the PKCS#12]' \
+ '-nomacver[do not attempt to verify the integrity MAC]' \
'-clcerts[only output client certificates]' \
'-cacerts[only output CA certificates]' \
- "-nokeys[don't output private keys]" \
- '-info[give info about PKCS#12 structure]' \
- '-des[encrypt private keys with DES]' \
- '-des3[encrypt private keys with triple DES (default)]' \
- '-idea[encrypt private keys with idea]' \
- '-seed[encrypt private keys with seed]' \
- '-aes128[encrypt PEM output with cbc aes]' \
- '-aes192[encrypt PEM output with cbc aes]' \
- '-aes256[encrypt PEM output with cbc aes]' \
- '-camellia128[encrypt PEM output with cbc camellia]' \
- '-camellia192[encrypt PEM output with cbc camellia]' \
- '-camellia256[encrypt PEM output with cbc camellia]' \
- "-nodes[don't encrypt private keys]" \
- "-noiter[don't use encryption iteration]" \
- "-nomaciter[don't use MAC iteration]" \
- '-maciter[use MAC iteration]' \
- "-nomac[don't generate MAC]" \
- '-twopass[separate MAC, encryption passwords]' \
- '-descert[encrypt PKCS#12 certificates with triple DES (default RC2-40)]' \
- "-certpbe[specify certificate PBE algorithm (default RC2-40)]:alg:(${algorithms})" \
- '-keypbe[specify private key PBE algorithm (default 3DES)]:alg:(${algorithms})' \
- '-macalg[digest algorithm used in MAC (default SHA1)]:alg:_list_message_digest_algorithms' \
- '-keyex[set MS key exchange type]' \
- '-keysig[set MS key signature type]' \
- '-password[set import/export password source]:pass phrase source:_pass_phrase_source' \
- '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-passout[output file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-rand[files to use for random number input]:file:_rand_files' \
- '-CSP[Microsoft CSP name]:name: ' \
- '-LMK[add local machine keyset attribute to private key]'
+ '-aes128[encrypt the private key with AES128]' \
+ '-aes192[encrypt the private key with AES192]' \
+ '-aes256[encrypt the private key with AES256]' \
+ '-aria128[encrypt the private key with ARIA128]' \
+ '-aria192[encrypt the private key with ARIA192]' \
+ '-aria256[encrypt the private key with ARIA256]' \
+ '-camellia128[encrypt the private key with CAMELLIA128]' \
+ '-camellia192[encrypt the private key with CAMELLIA192]' \
+ '-camellia256[encrypt the private key with CAMELLIA256]' \
+ '-des[encrypt the private key with DES]' \
+ '-des3[encrypt the private key with DES3]' \
+ '-idea[encrypt the private key with IDEA]' \
+ '-noenc[do not encrypt private keys at all]' \
+ '-export[create PKCS#12 file rather than parsed]' \
+ '-inkey[private key input file or URI for PKCS12 output]:file_or_uri:_files' \
+ '-certfile[extra certificates input file]:file:_files' \
+ '-passcerts[password source for certificate input]:source:_openssl_pass_phrase_options' \
+ '-chain[certificate chain is built and included in the PKCS#12 output file]' \
+ '-untrusted[untrusted certificates input file]:file:_files' \
+ $openssl_trusted_certificate_options[@] \
+ '-name["friendly name" for the certificates and private key]:name' \
+ '-caname["friendly name" for other certificates]:name' \
+ '-CSP[name as a Microsoft CSP name]:name' \
+ '-LMK[add the "Local Key Set" identifier to the attributes]' \
+ '-keyex[private key is to be used for key exchange]' \
+ '-keysig[private key is to be used for just signing]' \
+ '-keypbe[algorithm used to encrypt the private key]:alg:_openssl_cipher_algorithms' \
+ '-certpbe[algorithm used to encrypt certificates]:alg:_openssl_cipher_algorithms' \
+ '-descert[encrypt the certificates using triple DES]' \
+ '-macalg[MAC digest algorithm]:digest:_openssl_digests' \
+ '-pbmac1_pbkdf2[use PBMAC1 with PBKDF2 for MAC protection]' \
+ '-pbmac1_pbkdf2_md[PBKDF2 KDF digest algorithm]:alg:_openssl_digests' \
+ '-iter[iteration count for the encryption key and MAC]:count' \
+ '-noiter[set iteration count to 1 for encryption]' \
+ '-nomaciter[set iteration count to 1 for MAC]' \
+ '-macsaltlen[salt length in bytes for the MAC]:length' \
+ '-nomac[do not attempt to provide the MAC integrity]' \
+ '-jdktrust[export pkcs12 file in a foormat compatible with Java keystore usage]:usage:(anyExtendedKeyUsage)'
}
-
_openssl_pkcs7() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format]:format:(PEM DER)' \
- '-outform[output format]:format:(PEM DER)' \
- '-in[input file]:file:_files' \
- '-out[output file]:file:_files' \
- '-print_certs[print any certs or crl in the input]' \
- '-text[print full details of certificates]' \
- "-noout[don't output encoded data]" \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines'
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-inform[input format]:format:(DER PEM)' \
+ '-outform[output format]:format:(DER PEM)' \
+ '-in[input file name]:file:_files' \
+ '-out[output file name]:file:_files' \
+ '-print[print out the full PKCS7 object]' \
+ '-print_certs[print out any certificates or CRLs contained in the file]' \
+ '-quiet[print out just the PEM-encoded certificates without any other output]' \
+ '-text[print out certificate details in full]' \
+ '-noout[do not output the encoded version of the PKCS#7 structure]' \
+ $openssl_provider_options[@]
}
-
_openssl_pkcs8() {
- # written for openssl 1.0.2d
- _arguments -C \
- '-in[input file]:file:_files' \
- '-inform[input format]:format:(PEM DER)' \
- '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-outform[output format]:format:(PEM DER)' \
- '-out[output file]:file:_files' \
- '-passout[output file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-topk8[output PKCS8 file]' \
- '-nooct[use (nonstandard) no octet format]' \
- '-embed[use (nonstandard) embedded DSA parameters format]' \
- '-nsdb[use (nonstandard) DSA Netscape DB format]' \
- '-noiter[use 1 as iteration count]' \
- '-nocrypt[use or expect unencrypted private key]' \
- '-v2[use PKCS#5 v2.0 and given cipher]:alg:(aes-128-cbc aes-128-ecb aes-192-cbc aes-192-ecb aes-256-cbc aes-256-ecb bf bf-cbc bf-cfb bf-ecb bf-ofb camellia-128-cbc camellia-128-ecb camellia-192-cbc camellia-192-ecb camellia-256-cbc camellia-256-ecb cast cast-cbc cast5-cbc cast5-cfb cast5-ecb cast5-ofb des des-cbc des-cfb des-ecb des-ede des-ede-cbc des-ede-cfb des-ede-ofb des-ede3 des-ede3-cbc des-ede3-cfb des-ede3-ofb des-ofb des3 desx idea idea-cbc idea-cfb idea-ecb idea-ofb rc2 rc2-40-cbc rc2-64-cbc rc2-cbc rc2-cfb rc2-ecb rc2-ofb rc4 rc4-40 rc5 rc5-cbc rc5-cfb rc5-ecb rc5-ofb seed seed-cbc seed-cfb seed-ecb seed-ofb)' \
- '-v2prf[set the PRF algorithm to use with PKCS#5 v2.0]:alg:(hmacWithMD5 hmacWithRMD160 hmacWithSHA1 hmacWithSHA224 hmacWithSHA256 hmacWithSHA384 hmacWithSHA512)' \
- '-v1[use PKCS#5 v1.5 and given cipher]:obj:(PBE-MD2-DES PBE-MD5-DES PBE-SHA1-RC2-64 PBE-MD2-RC2-64 PBE-MD5-RC2-64 PBE-SHA1-DES PBE-SHA1-RC4-128 PBE-SHA1-RC4-40 PBE-SHA1-3DES PBE-SHA1-2DES PBE-SHA1-RC2-128 PBE-SHA1-RC2-40)' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines'
-}
+ local -a prf_algorithms=(
+ hmacWithMD5 hmacWithRMD160 hmacWithSHA1 hmacWithSHA224 hmacWithSHA256 hmacWithSHA384 hmacWithSHA512
+ )
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-topk8[read a private key and write a PkCS#8 format key]' \
+ '-inform[input format]:format:(DER PEM)' \
+ '-outform[output format]:format:(DER PEM)' \
+ '-traditional[traditional format]' \
+ '-in[input file name]:file:_files' \
+ '-passin[input password source]:source:_openssl_pass_phrase_options' \
+ '-passout[output password source]:source:_openssl_pass_phrase_options' \
+ '-out[output file name]:files:_files' \
+ '-iter[number of iterations to create PKCS#8 containers]:count' \
+ '-noiter[use 1 as iteration count]' \
+ '-nocrypt[output unencrypted PrivateKeyInfo structure]' \
+ '-v2[algorithm for PKCS#5 v2.0]:alg:_openssl_cipher_algorithms' \
+ '-v2prf[PRF algorithm to use with PKCS#5 v2.0]:alg:(($prf_algorithms))' \
+ '-v1[algorithm for PKCS#5 v1.5 or PKCS#12]:alg:_openssl_cipher_algorithms' \
+ '-scrypt[use the script algorithm for private key encryption]' \
+ '-scrypt_N[scrypt "N" parameter]:n' \
+ '-scrypt_r[scrypt "r" parameter]:r' \
+ '-scrypt_p[scrypt "p" parameter]:p' \
+ '-saltlen[length of the salt to use for the PBE algorithm]:length' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@]
+}
_openssl_pkey() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-in[input file]:file:_files' \
- '-inform[input format]:format:(PEM DER)' \
- '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-outform[output format]:format:(PEM DER)' \
- '-out[output file]:file:_files' \
- '-passout[output file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines'
+ _arguments \
+ '(- *)-help[print help message]' \
+ $openssl_provider_options[@] \
+ '-check[check the consistency of a key pair for both public and private components]' \
+ '-pubcheck[check the correctness of either a public key or the public components of a key pair]' \
+ '-in[input file or URI]:file_or_uri:_files' \
+ '-inform[key input format]:format:(DER PEM P12 ENGINE)' \
+ '-passin[password source for the key input]:source:_openssl_pass_phrase_options' \
+ '-pubin[read public key instead of private key]' \
+ '-out[output file name]' \
+ '-outform[key output format]:format:(DER PEM)' \
+ '-cipher[cipher to encrypt the PEM encoded private key]:cipher:_openssl_ciphers' \
+ '-passout[password source for the output file]:source:_openssl_pass_phrase_options' \
+ '-traditional[use older "traditional" format]' \
+ '-pubout[output the public components]' \
+ '-noout[do not output the key in encoded form]' \
+ '-text[output the various key components in plain text]' \
+ '-text_pub[output only the public key components in text form]' \
+ '-ec_conv_form[specify how the points on the elliptic-curve curve are converted into octet strings]:type:(compressed uncompressed hybrid)' \
+ '-ec_param_enc[specify how the elliptic curve parameters are encoded]:type:(named_curve explicit)'
}
-
_openssl_pkeyparam() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-in[the input filename to read parameters from]:file:_files' \
- '-out[the output filename to write parameters]:file:_files' \
- '-text[prints out the parameters in plain text in addition to the encoded version]' \
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-in[input file name]:file:_files' \
+ '-out[output file name]:file:_files' \
+ '-text[print out the parameters in plain text]' \
'-noout[do not output the encoded version of the parameters]' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines'
+ '-check[check the correctness of parameters]' \
+ $openssl_provider_options[@]
}
-
_openssl_pkeyutl() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-in[input file]:file:_files' \
- '-out[output file]:file:_files' \
- '-sigfile[signature file (verify operation only)]:file:_files' \
- '-inkey[input key]:file:_files' \
- '-keyform[private key format]:format:(PEM DER)' \
- '-pubin[input is a public key]' \
- '-certin[input is a certificate carrying a public key]' \
- '-pkeyopt[public key options]:option\:value:_pkeyopts' \
- '-sign[sign with private key]' \
- '-verify[verify with public key]' \
- '-verifyrecover[verify with public key, recover original data]' \
- '-encrypt[encrypt with public key]' \
- '-decrypt[decrypt with private key]' \
- '-derive[derive shared secret]' \
- '-hexdump[hex dump output]' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-passin[pass phrase source]:pass phrase source:_pass_phrase_source'
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-in[input file name]:file:_files' \
+ '-rawin[indicate that signature or verification input data is raw data]' \
+ '-digest[digest algorithm to be used to hash the input data]:digest:_openssl_digests' \
+ '-out[output file name]:file:_files' \
+ '-secret[shared-secret output file name]:file:_files' \
+ '-sigfile[signature file]:file:_files' \
+ '-inkey[input key file name or URI]:file_or_uri:_files' \
+ '-keyform[key format]:format:(DER PEM P12 ENGINE)' \
+ '-passin[input key password source]:source:_openssl_pass_phrase_options' \
+ '-pubin[read public key instead of private key]' \
+ '-certin[input is a certificate containing a public key]' \
+ '-rev[reverse the order of the input buffer]' \
+ '-sign[sign the input data and output the signed result]' \
+ '-verify[verify the input data against the signature]'\
+ '-verifyrecover[verify the given signature and output the recovered data]' \
+ '-encrypt[encrypt the input data using a public key]' \
+ '-decrypt[decrypt the input data using a private key]' \
+ '-derive[derive a shared secret using own private (EC)DH key and peer key]' \
+ '-peerkey[file containing the peer public or private (EC)DH key]:file:_files' \
+ '-peerform[peer key format]:format:(DER PEM P12 ENGINE)' \
+ '-encap[use a Key Encapsulation Mechanism to encapsulate a shared-secret]' \
+ '-decap[decode an encapsulated secret with a private key]' \
+ '-kemop[specify KEM mode for key algorithm]:mode' \
+ '-kdf[key derivation function algorithm]:algorithm:(TLS1-PRF HKDF)' \
+ '-kdflen[output length for KDF]:length' \
+ '-pkeyopt[public key options]:options' \
+ '-pkeyopt_passin[public key option from stdin or a password source]:option:_openssl_pass_phrase_options' \
+ '-hexdump[hex dump the output data]' \
+ '-asn1parse[parse the ASN.1 output data to check its DER encoding]'\
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '-config[configuration file]:file:_files'
}
-
_openssl_prime() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-hex[hex]' \
- '-checks[number of checks]:checks: ' \
- ':number:'
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-hex[generate hex output]' \
+ '-generate[generate a prime number]' \
+ '-bits[how many bits to generate a prime]:num' \
+ '-safe[generates a safe prime]' \
+ $openssl_provider_options[@] \
+ '*::number:'
}
-
_openssl_rand() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-out[write to file]:file:_files' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-rand[files to use for random number input]:file:_rand_files' \
- '-base64[base64 encode output]' \
- '-hex[hex encode output]' \
- ':num:'
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-out[output file name]:file:_files' \
+ '-base64[perform base64 encoding on the output]' \
+ '-hex[show the output as a hex string]' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '*:num'
}
+_openssl_rehash() {
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-old[use old-tyle hashing for generating links]' \
+ '-n[do not remove existing links]' \
+ '-compat[generate links for both old-style(MD5) and new-style(SHA1) hashing]' \
+ '-v[print messages about old links removed and new links created]' \
+ $openssl_provider_options[@] \
+ '*::dir:_files -/'
+}
_openssl_req() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format]:format:(PEM DER)' \
- '-outform[output format]:format:(PEM DER)' \
- '-in[input file]:file:_files' \
- '-out[output file]:file:_files' \
- '-text[text form of request]' \
- '-pubkey[output public key]' \
- '-noout[do not output REQ]' \
- '-verify[verify signature on REQ]' \
- '-modulus[RSA modulus]' \
- "-nodes[don't encrypt the output key]" \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- "-subject[output the request's subject]" \
- '-passin[private key pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-key[use the private key contained in the specified file]:file:_files' \
- '-keyform[key file format]:format:(PEM DER)' \
- '-keyout[file to send the key to]:file:_files' \
- '-rand[files to use for random number input]:file:_rand_files' \
- "-newkey rsa\:-[generate a new RSA key of the specified number of bits in size]:bits: " \
- "-newkey dsa\:[generate a new DSA key, parameters taken from CA in the specified file]:file:_files" \
- "-newkey ec\:[generate a new EC key, parameters taken from CA in the specified file]:file:_files" \
- '-md2[digest to sign with]' \
- '-md4[digest to sign with]' \
- '-md5[digest to sign with]' \
- '-mdc2[digest to sign with]' \
- '-sha1[digest to sign with]' \
- '-config[request template file]:file:_files' \
- '-subj[set or modify request subject]:subject: ' \
- '-multivalue-rdn[enable support for multivalued RDNs]' \
- '-new[new request]' \
- '-batch[do not ask anything during request generation]' \
- '-x509[output a x509 structure instead of a certificate request]' \
- '-days[number of days a certificate generated by -x509 is valid for]:days: ' \
- '-set_serial[serial number to use for a certificate generated by -x509]:serial: ' \
- '-newhdr[output "NEW" in the header lines]' \
- "-asn1-kludge[output the 'request' in a format that is wrong but some CA's have been reported as requiring]" \
- '-extensions[specify certificate extension section (override value in config file)]:section: ' \
- '-reqexts[specify request extension section (override value in config file)]:section: ' \
- '-utf8[input characters are UTF8 (default ASCII)]' \
- '*-nameopt[various certificate name options]:options:_nameopts' \
- '*-reqopt[- various request text options]:options:_certopts'
- # TODO: complete -extensions and -reqexts
-}
+ local -a digests=($(openssl dgst -list | tail -n +2))
+ local -a digest_flags=()
+ for digest in $digests[@]
+ do
+ digest_flags+=("($digests)${digest}[use ${digest:1} message digest algorithm]")
+ done
+ local -a cipher_flags=($(openssl enc -list | tail -n +2 ))
+ local -a ciphers=()
+ for flag in $cipher_flags[@]
+ do
+ ciphers+=("${flag:1}")
+ done
-_openssl_rsa() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format]:format:(PEM DER NET)' \
- '-outform[output format]:format:(PEM DER NET)' \
- '-in[input file]:file:_files' \
- '-sgckey[use IIS SGC key format]' \
- '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-out[output file]:file:_files' \
- '-passout[output file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-des[encrypt PEM output with cbc des]' \
- '-des3[encrypt PEM output with ede cbc des using 168 bit key]' \
- '-idea[encrypt PEM output with cbc idea]' \
- '-seed[encrypt PEM output with cbc seed]' \
- '-aes128[encrypt PEM output with cbc aes]' \
- '-aes192[encrypt PEM output with cbc aes]' \
- '-aes256[encrypt PEM output with cbc aes]' \
- '-camellia128[encrypt PEM output with cbc camellia]' \
- '-camellia192[encrypt PEM output with cbc camellia]' \
- '-camellia256[encrypt PEM output with cbc camellia]' \
- '-text[print the key in text]' \
- "-noout[don't print key out]" \
- '-modulus[print the RSA key modulus]' \
- '-check[verify key consistency]' \
- '-pubin[expect a public key in input file]' \
- '-pubout[output a public key]' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines'
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-inform[CSR input file format]:format:(DER PEM)' \
+ '-outform[output format]:format:(DER PEM)' \
+ '-cipher[cipher to use]:cipher:(($ciphers))' \
+ '-in[input file name]:file:_files' \
+ '-sigopt[options of the signature algorithm during sign operations]:options' \
+ '-vfyopt[options of the signature algorithm during verify operations]:options' \
+ '-passin[password source for private key and certificate input]:source:_openssl_pass_phrase_options' \
+ '-passout[password source for the output file]:source:_openssl_pass_phrase_options' \
+ '-out[output file name]:file:_files' \
+ '-text[print out the certificate request in text form]' \
+ '-subject[print out the certificate request subject]' \
+ '-pubkey[print out the public key]' \
+ '-noout[prevent output of the encoded version of the certificate request]' \
+ '-modules[print out the value of the modulus of the public key]' \
+ '-verify[verify the self-signed on the request]' \
+ '-new[generate a new certificate request]' \
+ '-newkey[generate a new private key]:arg' \
+ '-pkeyopt[option of public key algorithm]:option' \
+ '-key[private key file or URI]:file_or_uri:_files' \
+ '-keyform[format of the private key]:format:(DER PEM P12 ENGINE)' \
+ '-keyout[output private key file name]:file:_files' \
+ '-noenc[create private key it will not be encrypted]' \
+ $digest_flags[@] \
+ '-config[config file name]:file:_files' \
+ '-section[section name]:section' \
+ '-subj[subject name for new request or superseded the subject name]:subject' \
+ '-x509[output certificate instead of a certificate request]' \
+ '-x509v1[request generation of certificates with X.509 version 1]' \
+ '-CA["CA" certificate file or URI]:file_or_uri:_files' \
+ '-CAkey["CA" private key file or URI]:file_or_uri:_files' \
+ '-not_before[start date to be explicitly set]:date'\
+ '-not_after[expiry date to be explicitly set]:date'\
+ '-days[the number of days from today to certify the certificate for]:days' \
+ '-set_serial[serial number to use when outputting a self-signed certificate]:serial' \
+ '-copy_extensions[how X.509 extensions in certificate requests should be handled]:type:(none copy copyall)' \
+ '-extensions[specify certificate extension section (override value in config file)]:section' \
+ '-reqexts[specify request extension section (override value in config file)]:section ' \
+ '-addext[add a specific extension to the certificate]:ext' \
+ '-precert[add poison extension to the certificate]' \
+ '-utf8[interpret field values as UTF8 strings]' \
+ '-reqopt[options to customize the printing format]:option:_openssl_text_printing_options' \
+ '-newhdr[add the word NEW to the PEM file header and footer lines]' \
+ '-batch[non-interactive mode]' \
+ '-verbose[print extra details about the operations being performed]' \
+ '-quiet[print fewer details about the operations being performed]' \
+ '-keygen_engine[engine for key generation operations]:id' \
+ '-nameopt[how subject or issuer names are displayed]:option:_openssl_name_display_options' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@]
}
+_openssl_rsa() {
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-inform[key input format]:format:(DER PEM P12 ENGINE)' \
+ '-outform[key output format]:format:(DER PEM)' \
+ '-traditional[use the traditional PKCS#1 format instead of PKCS#8 format]' \
+ '-in[input file or URI]:file_or_uri:_files' \
+ '-passin[input password source]:source:_openssl_pass_phrase_options' \
+ '-passout[output password source]:source:_openssl_pass_phrase_options' \
+ '-out[output file name]:file:_files' \
+ '-aes128[encrypt the private key with AES128]' \
+ '-aes192[encrypt the private key with AES192]' \
+ '-aes256[encrypt the private key with AES256]' \
+ '-aria128[encrypt the private key with ARIA128]' \
+ '-aria192[encrypt the private key with ARIA192]' \
+ '-aria256[encrypt the private key with ARIA256]' \
+ '-camellia128[encrypt the private key with CAMELLIA128]' \
+ '-camellia192[encrypt the private key with CAMELLIA192]' \
+ '-camellia256[encrypt the private key with CAMELLIA256]' \
+ '-des[encrypt the private key with DES]' \
+ '-des3[encrypt the private key with DES3]' \
+ '-idea[encrypt the private key with IDEA]' \
+ '-text[print out the various public or private key components in plain text]' \
+ '-noout[prevent output of the encoded version of the key]' \
+ '-module[print out the value of the modules of the key]'\
+ '-check[check the consistency of an RSA private key]' \
+ '-pubin[read public key instead of private key]' \
+ '-pubout[output public key instead of private key]' \
+ '-RSAPublicKey_in[read RSA public key instead of private key]' \
+ '-RSAPublicKey_out[output RSA public key instead of private key]' \
+ '-pvk-strong[enable "Strong" PVK encoding level(default)]' \
+ '-pvk-weak[enable "Weak" PVK encoding level]' \
+ '-pvk-none[do not enforce PVK encoding]' \
+ $openssl_provider_options[@]
+}
_openssl_rsautl() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-in[input file]:file:_files' \
- '-out[output file]:file:_files' \
- '-inkey[input key]:file:_files' \
- '-keyform[private key format]:format:(PEM DER)' \
- '-pubin[input is an RSA public]' \
- '-certin[input is a certificate carrying an RSA public key]' \
- '-ssl[use SSL v2 padding]' \
- '-raw[use no padding]' \
- '-pkcs[use PKCS#1 v1.5 padding (default)]' \
- '-oaep[use PKCS#1 OAEP]' \
- '-sign[sign with private key]' \
- '-verify[verify with public key]' \
- '-encrypt[encrypt with public key]' \
- '-decrypt[decrypt with private key]' \
- '-hexdump[hex dump output]' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-passin[pass phrase source]:pass phrase source:_pass_phrase_source'
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-in[input file name]:file:_files' \
+ '-passin[pass phrase option]:option:_openssl_pass_phrase_options' \
+ '-rev[reverse the order of the input]' \
+ '-out[output file name]:file:_files' \
+ '-inkey[input key file or URI]:file_or_uri:_files' \
+ '-keyform[key format]:format:(DER PEM P12 ENGINE)' \
+ '-pubin[read public key instead of private key]' \
+ '-certin[input is a certificate containing an RSA public key]' \
+ '-sign[sign the input data and output the signed result]' \
+ '-verify[verify the input data and output the recovered data]' \
+ '-encrypt[encrypt the input data using an RSA public key]' \
+ '-decrypt[decrypt the input data using an RSA private key]' \
+ '-pkcs[use PKCS#1 for padding]' \
+ '-oaep[use OAEP for padding]' \
+ '-x931[use ANSI X9.31 for padding]' \
+ '-raw[do not use padding]' \
+ '-hexdump[hex dump the output data]' \
+ '-asn1parse[parse the ASN.1 output data]' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@]
}
-
_openssl_s_client() {
- # written for openssl 1.0.1k
- _arguments -C \
- '(-6)-4[use IPv4 only]' \
- '(-4)-6[use IPv6 only]' \
- '(-connect)-host[use -connect instead]:host: ' \
- '(-connect)-port[use -connect instead]:port: ' \
- '(-host -port)-connect[who to connect to (default is localhost:4433)]:host\:port: ' \
- '-verify[turn on peer certificate verification]:depth: ' \
- '-verify_return_error[return verification errors]' \
- '-cert[certificate file to use, PEM format assumed]:file:_files' \
- '-certform[certificate format (PEM or DER) PEM default]:format:(PEM DER)' \
- '-key[private key file to use, in cert file if not specified but cert file is]:file:_files' \
- '-keyform[key format (PEM or DER) PEM default]:format:(PEM DER)' \
- '-pass[private key file pass phrase source]:pass phrase source:_pass_phrase_source' \
- "-CApath[PEM format directory of CA's]:directory:_files -/" \
- "-CAfile[PEM format file of CA's]:file:_files" \
- '-reconnect[drop and re-make the connection with the same Session-ID]' \
- '-pause[sleep(1) after each read(2) and write(2) system call]' \
- '-prexit[print session information even on connection failure]' \
- '-showcerts[show all certificates in the chain]' \
- '-debug[extra output]' \
+ local tls_start_protocols=(smtp pop3 imap ftp xmpp xmpp-server irc postgres mysql lmtp nntp sieve ldap)
+
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-ssl_config[section of the configuration file to configure the SSL_CTX object]:section' \
+ '-connect[host and optional port to connect to]:host_port' \
+ '-host[host to connect to]:host' \
+ '-port[port to connect to]:port' \
+ '-bind[host address and port to bind as the source for the connection]:host_port' \
+ '-proxy[proxy host and port]:host_port' \
+ '-proxy_user[proxy user for basic(base64) authenticate]' \
+ '-proxy_pass[proxy password source]:option:_openssl_pass_phrase_options' \
+ '-unix[connect over the specified Unix-domain socket]:path:_files' \
+ '(-4 -6)-4[use IPv4 only]' \
+ '(-4 -6)-6[use IPv6 only]' \
+ '-quic[connect using the QUIC protocol]' \
+ '-servername[set the TLS SNI extension in the ClientHello to the given value]:name' \
+ '-noservername[suppress sending of the SNI extension in the ClientHello message]' \
+ '-cert[client certificate path]:file:_files' \
+ '-certform[client certificate file format]:format:(DER PEM P12)' \
+ '-cert_chain[file or URI of untrusted certificates to build the certificate chain]:file_or_uri:_files' \
+ '-build_chain[whether the application build build the client certificate chain]' \
+ "-CRL[CRL file to use to check the server's certificate]" \
+ '-CRLform[CRL file format]:format:(DER PEM)' \
+ '-crl_download[download CRL from distribution points in the certificate]' \
+ '-key[client private key to use(file or URI)]:file_or_uri:_files' \
+ '-keyform[key format]:format:(DER PEM P12 ENGINE)' \
+ '-pass[private key and certificate file password source]:option:_openssl_pass_phrase_options' \
+ '-verify[verify depth]:depth' \
+ '-verify_return_error[returns verification error instead of continuing]' \
+ '-verify_quiet[limit verify output to only errors]' \
+ '-verifyCAfile[file in PEM format containing trusted certificates to verify]:file:_files' \
+ '-verifyCApath[directory containing trusted certificates to verify]:dir:_files -/' \
+ '-verifyCAstore[URI of a tstore containing trusted certificatesto verify]:uri:_urls' \
+ '-chainCAfile[file in PEM format containing certificates to build client certificate chain]:file:_files' \
+ '-chainCApath[directory containing trusted certificates for building client certificate chain]:dir:_files -/' \
+ '-chainCAstore[URI of a store containing trusted certificate to build client certificate chain]:uri:_urls' \
+ '-requestCAfile[file containing a list of certificates to be sent to the server]:file:_files' \
+ '-dane_tlsa_domain[enable DANE TLSA authentication and specify the TLSA base domain]:domain' \
+ '-dane_tlsa_rrdata[use one or more times to specify the RRDATA fields of the DANE TLSA RRset]:rrdata' \
+ '-dane_ee_no_namechecks[disable server name checks when authenticating via DANE-EE TLSA records]' \
+ '-reconnect[reconnect to the same server 5 time using the same sess_id ID]' \
+ '-showcerts[display the server certificate list as sent by the server]' \
+ '-prexit[print session information when the program exits]' \
+ '-no-interactive[run the client in a non-interactive mode]' \
+ '-state[print out the SSL session states]' \
+ '-debug[print extensive debugging information including a hex dump of all traffic]' \
+ '-nocommands[do not use interactive command letters]' \
+ '-adv[use advanced command mode]' \
+ '-security_debug[enable security debug messages]' \
+ '-security_debug_verbose[output more security debug output]' \
'-msg[show protocol messages]' \
- '-nbio_test[more ssl protocol testing]' \
- "-state[print the 'ssl' states]" \
- '-nbio[run with non-blocking IO]' \
- '-crlf[convert LF from terminal into CRLF]' \
- '-quiet[no s_client output]' \
- '(-no_ign_eof)-ign_eof[ignore input eof (default when -quiet)]' \
- "(-ign_eof)-no_ign_eof[don't ignore input eof]" \
- '-psk_identity[PSK identity]:identity: ' \
- '-psk[PSK in hex (without 0x)]:key: ' \
- "-srpuser[SRP authentication for 'user']:user: " \
- "-srppass[password for 'user']:password: " \
- '-srp_lateuser[SRP username into second ClientHello message]' \
- '-srp_moregroups[tolerate other than the known g N values]' \
- '-srp_strength[minimal length in bits for N (default 1024)]:int: ' \
- '(-no_ssl2 -ssl3 -tls1 -tls1_1 -tls1_2 -dtls1)-ssl2[just use SSLv2]' \
- '(-no_ssl3 -ssl2 -tls1 -tls1_1 -tls1_2 -dtls1)-ssl3[just use SSLv3]' \
- '(-no_tls1_2 -ssl2 -ssl3 -tls1 -tls1_1 -dtls1)-tls1_2[just use TLSv1.2]' \
- '(-no_tls1_1 -ssl2 -ssl3 -tls1 -tls1_1 -dtls1)-tls1_1[just use TLSv1.1]' \
- '(-no_tls1 -ssl2 -ssl3 -tls1 -tls1_1 -dtls1)-tls1[just use TLSv1.0]' \
- '(-no_dtls1 -ssl2 -ssl3 -tls1 -tls1_1 -tls1_2)-dtls1[just use DTLSv1]' \
- '-fallback_scsv[send TLS_FALLBACK_SCSV]' \
- '-mtu[set the link layer MTU]' \
- '(-tls1_2)-no_tls1_2[turn off TLSv1.2]' \
- '(-tls1_1)-no_tls1_1[turn off TLSv1.1]' \
- '(-tls1)-no_tls1[turn off TLSv1.0]' \
- '(-ssl3)-no_ssl3[turn off SSLv3]' \
- '(-ssl2)-no_ssl2[turn off SSLv2]' \
- '-bugs[switch on all SSL implementation bug workarounds]' \
- "-serverpref[use server's cipher preferences (only SSLv2)]" \
- '-cipher[preferred cipher to use]:cipher suite:_list_ciphers' \
- "-starttls[use the STARTTLS command before starting TLS for those protocols that support it]:protocol:(smtp pop3 imap ftp xmpp)" \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-rand[files to use for random number input]:file:_rand_files' \
- '-sess_out[file to write SSL session to]:file:_files' \
- '-sess_in[file to read SSL session from]:file:_files' \
- '-servername[set TLS extension servername in ClientHello]:host: ' \
- '-tlsextdebug[hex dump of all TLS extensions received]' \
- '-status[request certificate status from server]' \
- '-no_ticket[disable use of RFC4507bis session tickets]' \
- '-nextprotoneg[enable NPN extension, considering named protocols supported (comma-separated list)]:protocols: ' \
- '-legacy_renegotiation[enable use of legacy renegotiation (dangerous)]' \
- '-use_srtp[offer SRTP key management with a colon-separated profile list]:profiles: ' \
- '-keymatexport[export keying material using label]:label: ' \
- '-keymatexportlen[export len bytes of keying material (default 20)]:len: '
+ '-timeout[enable send/receive timeout on DTLS connections]' \
+ '-mtu[set MTU of the link layer]:size' \
+ '-no_ems[disable Extended master secret negotiation]' \
+ '-keymatexport[export keying materials using the specified label]:label' \
+ '-keymatexportlen[export the specified number of bytes of keying material(default 20)]:len' \
+ '-trace[show verbose trace output of protocol messages]' \
+ '-msgfile[file to send output of -msg or -trace to]:file:_files' \
+ '-nbio_test[test nonblocking I/O]' \
+ '-nbio[turn on nonblocking I/O]' \
+ '-crlf[translate a line feed from the terminal into CF+LF]' \
+ '-ign_eof[inhibit shutting down the connection when end of file is reached in the input]' \
+ '-quiet[inhibit printing of session and certificate information]' \
+ '-no_ign_eof[shut down the connection when end of file is reached in the input]' \
+ '-psk_identity[PSK identity when using a PSK cipher suite]:identity' \
+ '-psk[PSK key when using a PSK cipher suite]:key' \
+ '-psk_session[use the pem encoded SSL_SESSION data stored in file as the basic of a PSK]:file:_files' \
+ '-sctp[use SCTP for the transport protocol instead of UDO in DTLS]' \
+ '-sctp_label_bug[use the incorrect behaviour of older OpenSSL implementations for DTLS/SCTP]' \
+ '-fallback_scsv[send TLS_FALLBACK_SCSV in the ClientHello]' \
+ '-async[switch on asynchronous mode]' \
+ '-maxfraglen[enable Maximum Fragment Length Negotiation]:len:(512 1024 2048 4096)' \
+ '-max_send_frag[maximum size of data fragment to send]:size' \
+ '-split_send_frag[size used to split data for encrypt pipelines]:size' \
+ '-max_pipelines[maximum number of encrypt/decrypt pipelines]:number' \
+ '-read_buf[default read buffer size for connections]:size' \
+ '-ignore_unexpected_eof[enable the peer does not need to send the close_notify alert]' \
+ '-no_tx_cert_comp[disable support for sending TLSv1.3 compressed certificates]' \
+ '-no_rx_cert_comp[disable support for receiving TLSv1.3 compressed certificate]' \
+ '-brief[only provide a brief summary of connections parameters]' \
+ '-starttls[send the protocol-specific message to switch to TLS for communication]:protocol:(($tls_start_protocols))' \
+ '-xmpphost[host for the "to" attribute of the stream element]:host' \
+ '-name[hostname information for various protocols]:hostname' \
+ '-tlsextdebug[print out a hex dump of any TLS extensions received from the server]' \
+ '-sess_out[output SSL session to file]:file:_files' \
+ '-sess_in[load SSL session from this file]:file:_files' \
+ '-serverinfo[list of comma-separated TLS Extension Types]:types' \
+ '-status[send a certificate status request to the server(OCSP stapling)]' \
+ '-alpn[enable Application-Layer Protocol Negotiation]:protocols' \
+ '-nextprotoneg[enable Next Protocol Negotiation extension]:protocols' \
+ '(-ct -noct)-ct[enable Certificate Transparency]' \
+ '(-ct -noct)-noct[disable Certificate Transparency]' \
+ '-ctlogfile[file containing a list of known Certificate Transparency]' \
+ '-keylogfile[keylog file for appending TLS secrets]:file:_files' \
+ '-early_data[file to read the content and attempt to send it as early data]:file:_files' \
+ '-enable_pha[send the Post-Handshake Authentication extension]' \
+ '-use_srtp[offer SRTP key management]:value' \
+ '-ktls[enable kernel TLS for sending and receiving]' \
+ '-tfo[enable creation of connections via TCP fast open]' \
+ $openssl_tls_flags[@] \
+ $openssl_dtls_flags[@] \
+ '-nameopt[how the subject or issuer names are displayed]:option:_openssl_name_display_options' \
+ $openssl_extended_verification_flags[@] \
+ $openssl_trusted_certificate_options[@] \
+ $openssl_supported_commands_flags[@] \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '-ssl_client_engine[specified engine to be used for client certificate operations]:id' \
+ $openssl_verification_options[@] \
+ '-enable_server_rpk[enable support for receiving raw public keys from the server]' \
+ '-enable_client_rpk[enable support for sending raw public keys to the server]' \
+ '*::host_port'
}
-
_openssl_s_server() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-accept[port to accept on (default is 4433)]:port: ' \
- '-context[set session ID context]:id: ' \
- '-verify[turn on peer certificate verification]:depth: ' \
- '-Verify[turn on peer certificate verification, must have a cert]:depth: ' \
- '-verify_return_error[return verification errors]' \
- '-cert[certificate file to use (default is server.pem)]:file:_files' \
- '-crl_check[check the peer certificate has not been revoked by its CA]' \
- '-crl_check_all[check the peer certificate has not been revoked by its CA or any other CRL in the CA chain]' \
- '-certform[certificate format]:format:(PEM DER)' \
- '-key[Private Key file to use, in cert file if not specified (default is server.pem)]:file:_files' \
- '-keyform[key format]:format:(PEM DER ENGINE)' \
- '-pass[private key file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-dcert[second certificate file to use (usually for DSA)]:file:_files' \
- '-dcertform[second certificate format]:format:(PEM DER)' \
- '-dkey[second private key file to use (usually for DSA)]:file:_files' \
- '-dkeyform[second key format]:format:(PEM DER ENGINE)' \
- '-dpass[second private key file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-dhparam[DH parameter file to use, in cert file if not specified or a default set of parameters is used]:file:_files' \
- '-named_curve[elliptic curve name to use for ephemeral ECDH keys. (default is nistp256)]:named curve:_list_curves' \
- '-nbio[run with non-blocking IO]' \
- '-nbio_test[test with the non-blocking test bio]' \
- '-crlf[convert LF from terminal into CRLF]' \
- '-debug[print more output]' \
- '-msg[show protocol messages]' \
- '-state[print the SSL states]' \
- "-CApath[PEM format directory of CA's]:file:_files -/" \
- "-CAfile[PEM format file of CA's]:file:_files" \
- "-nocert[don't use any certificates (Anon-DH)]" \
- '-cipher[preferred cipher to use]:cipher suite:_list_ciphers' \
- "-serverpref[use server's cipher preferences]" \
- '-quiet[no server output]' \
- '-no_tmp_rsa[do not generate a tmp RSA key]' \
- '-psk_hint[PSK identity hint to use]:hint: ' \
- '-psk[PSK in hex (without 0x)]:PSK: ' \
- '-srpvfile[the verifier file for SRP]:file:_files' \
- '-srpuserseed[a seed string for a default user salt]:seed: ' \
- '-ssl2[just talk SSLv2]' \
- '-ssl3[just talk SSLv3]' \
- '-tls1_2[just talk TLSv1.2]' \
- '-tls1_1[just talk TLSv1.1]' \
- '-tls1[just talk TLSv1]' \
- '-dtls1[just talk DTLSv1]' \
- '-timeout[enable timeouts]' \
- '-mtu[set link layer MTU]' \
- '-chain[read a certificate chain]' \
- '-no_ssl2[just disable SSLv2]' \
- '-no_ssl3[just disable SSLv3]' \
- '-no_tls1[just disable TLSv1]' \
- '-no_tls1_1[just disable TLSv1.1]' \
- '-no_tls1_2[just disable TLSv1.2]' \
- '-no_dhe[disable ephemeral DH]' \
- '-no_ecdhe[disable ephemeral ECDH]' \
- '-bugs[turn on SSL bug compatibility]' \
- '-hack[workaround for early Netscape code]' \
- "-www[respond to a 'GET /' with a status page]" \
- "-WWW[respond to a 'GET /<path> HTTP/1.0' with file ./<path>]" \
- "-HTTP[respond to a 'GET /<path> HTTP/1.0' with file ./<path> with the assumption it contains a complete HTTP response]" \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-id_prefix[generate SSL/TLS session IDs prefixed by arg]:prefix: ' \
- '-rand[files to use for random number input]:file:_rand_files' \
- '-servername[servername for HostName TLS extension]:hostname: ' \
- '-servername_fatal[on mismatch send fatal alert (default warning alert)]' \
- '-cert2[certificate file to use for servername (default is server2.pem)]:file:_files' \
- '-key2[Private Key file to use for servername, in cert file if not specified (default is server2.pem)]:file:_files' \
- '-tlsextdebug[hex dump of all TLS extensions received]' \
- '-no_ticket[disable use of RFC4507bis session tickets]' \
- '-legacy_renegotiation[enable use of legacy renegotiation (dangerous)]' \
- '-nextprotoneg[set the advertised protocols for the NPN extension (comma-separated list)]:protocol:(http/1.0 http/1.1)' \
- '-use_srtp[offer SRTP key management with a colon-separated profile list]:profiles: ' \
- '-4[use IPv4 only]' \
- '-6[use IPv6 only]' \
- '-keymatexport[export keying material using label]:label: ' \
- '-keymatexportlen[export len bytes of keying material (default 20)]:length: ' \
- '-status[respond to certificate status requests]' \
- '-status_verbose[enable status request verbose printout]' \
- '-status_timeout[status request responder timeout]:seconds: ' \
- '-status_url[status request fallback URL]:URL: '
- # TODO: srtp profiles
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-port[TCP port to listen on for connections(default: 4433)]:port' \
+ '-accept[optional TCP host and port to listen on for connections(default: *:4433)]:host_port' \
+ '-unix[Unix domain socket path]:path:_files' \
+ '(-4 -6)-4[use IPv4 only]' \
+ '(-4 -6)-6[use IPv6 only]' \
+ '-unlink[for -unix, unlink any existing socket first]' \
+ '-context[SSL context ID]:id' \
+ '(-verify -Verify)'{-verify,-Verify}'[verify depth]:depth' \
+ '-cert[certificate file]:file:_files' \
+ '-cert2[certificate file to use for servername(default: server2.pem)]:file:_files' \
+ '-certform[server certificate file format]:format:(DER PEM P12)' \
+ '-cert_chain[file or URI of untrusted certificates to build the certificate chain]:file_or_uri:_files' \
+ '-build_chain[application should build the server certificate chain]' \
+ '-serverinfo[file containing one or more blocks of PEM data]:file:_files' \
+ '-key[private key file or URI]:file_or_uri:_files' \
+ '-key2[private key file or URI to use for servername]:file_or_uri:_files' \
+ '-keyform[key format]:format:(DER PEM P12 ENGINE)' \
+ '-pass[private key and certificate file password source]:source:_openssl_pass_phrase_options' \
+ '-dcert[additional certificate file]:file:_files' \
+ '-dkey[additional private key file or URI]:file_or_uri:_files' \
+ '-dcert_chain[file or URI of untrusted certificates to build the server certificate chain]:file_or_uri:_files' \
+ '-dcertform[format of the additional certificate file]:format:(DER PEM P12)' \
+ '-dkeyform[format of the additional private key]:format:(DER PEM P12 ENGINE)' \
+ '-dpass[passphrase for the additional private key and certificate]:pass:_openssl_pass_phrase_options' \
+ '-nbio_test[test non blocking I/O]' \
+ '-crlf[translate a line feed from the terminal into CR+LF]' \
+ '-debug[print extensive debugging information including a hex dump of all traffic]' \
+ '-security_debug[print output from SSL/TLS security framework]' \
+ '-security_debug_verbose[print more output from SSL/TLS security framework]' \
+ '-msg[show all protocol messages with hex dump]' \
+ '-msgfile[file to send output of -msg or -trace to]:file:_files' \
+ '-state[print the SSL session states]' \
+ '-CRL[CRL file]:file:_files' \
+ '-CRLform[CRL file format]:format:(DER PEM)' \
+ '-crl_download[download CRLs from distribution points]' \
+ '-verifyCAfile[file in PEM format CA containing trusted certificates to verify client certificates]:file:_files' \
+ '-verifyCApath[directory containing trusted certificates to verify client certificates]:dir:_files -/' \
+ '-verifyCAstore[URI of a store containing trusted certificates to verify client certificates]:uri:_urls' \
+ '-chainCAfile[file in PEM format containing trusted certificates to build the server certificate chain]:file:_files' \
+ '-chainCApath[directory containing trusted certificates for building server certificate chain]:dir:_files -/' \
+ '-chainCAstore[URI of a store containing trusted certificates for building server certificate chain]:uri:_urls' \
+ '-nocert[no certificate is used]' \
+ '-quiet[inhibit printing of session and certificate information]' \
+ '-no_resume_ephemeral[disable caching and tickets if ephemeral (EC)DH is used]' \
+ '-tlsextdebug[print a hex dump of any TLS extensions received from the server]' \
+ '-www[send a status message back to the client when it connects]' \
+ '(-WWW -HTTP)'{-WWW,-HTTP}'[emulate a simple web server]' \
+ '-http_server_binmode[acting as web-server open files in binary mode]' \
+ '-no_ca_names[disable TLS Extension CA Names]' \
+ '-ignore_unexpected_eof[peer does not need to send the close_notify alert]' \
+ '-servername[servername for HostName TLS extension]' \
+ '-servername_fatal[send fatal alert on servername mismatch]' \
+ '-id_prefix[generate SSL/TLS session IDs prefixed by this ID]:id' \
+ '-keymatexport[export keying material using label]:label' \
+ '-keymatexportlen[export the given number of bytes of keying material(default: 20)]:length' \
+ '-no_cache[disable session cache]' \
+ '-ext_cache[disable internal cache]' \
+ '-verify_return_error[close the connection when verification errors occur]' \
+ '-verify_quiet[no verify output except verify errors]' \
+ '(-no_ign_eof -ign_eof)-ign_eof[ignore input EOF]' \
+ '(-no_ign_eof -ign_eof)-no_ign_eof[do not ignore input EOF]' \
+ '-no_ems[disable Extended master secret negotiation]' \
+ '-status[enable certificate status request support]' \
+ '-status_verbose[enable certificate status request support and verbose output of OCSP response]' \
+ '-status_timeout[set the timeout for OCSP reponse to the given seconds]:seconds' \
+ '-proxy[HTTP(S) proxy server]:proxy' \
+ '-no_proxy[list of IP addresses and/or DNS names not to use an HTTP(S) proxy for]:addresses' \
+ '-status_url[set a fallback responder URL]:url:_urls' \
+ '-status_file[status file]:file:_files' \
+ '-ssl_config[configure SSL_CTX using the given configure value]:config' \
+ '-trace[show verbose trace output of protocol messages]' \
+ '-brief[provide a brief summary of connection parameters]' \
+ '-rev[simple echo server that sends back received text reserved]' \
+ '-async[switch on asynchronous mode]' \
+ '-max_send_frag[maximum size of data fragment to send]:size' \
+ '-split_send_frag[size used to split data for encrypt pipelines]:size' \
+ '-max_pipelines[maximum number of encrypt/decrypt pipelines]:number' \
+ '-naccept[server will exit after receiving the specified number of connections(default: unlimited)]:number' \
+ '-read_buf[default read buffer size for connections]:size' \
+ '-no_tx_cert_comp[disable support for sending TLSv1.3 compressed certificates]' \
+ '-no_rx_cert_comp[disable support for receiving TLSv1.3 compressed certificates]' \
+ '-no_comp[disable negotiation of TLS compression]' \
+ '-num_tickets[control the number of tickets that will be sent to the client after a full handshake in TLSv1.3]' \
+ '-dhparam[DH parameter file to use]:file:_files' \
+ '-nbio[turn on non blocking I/O]' \
+ '-timeout[enable timeout]' \
+ '-mtu[set link-layer MTU]:size' \
+ '-psk_identity[PSK identify when using a PSK cipher suite]:id' \
+ '-psk_hint[PSK identity hint when using a PSK cipher suite]:hint' \
+ '-psk[PSK key when using a PSK cipher suite]:key' \
+ '-psk_session[file contains pem encoded SSL_SESSION data]:file:_files' \
+ '-srpvfile[verifier file for SRP]:file:_files' \
+ '-listen[listen on a UDP port for incoming connections]' \
+ '-sctp[use SCTP for the transport protocol instead of UDP in DTLS]' \
+ '-sctp_label_bug[allow communication with older broken implementations]' \
+ '-use_srtp[offer SRTP key management with a colon-separated profile list]:list' \
+ '-no_dhe[no DH parameters will be loaded]' \
+ '-alpn[enable the Application-Layer Protocol Negotiation extension]:protocol' \
+ '-nextprotoneg[enable the Next Protocol Negotiation extension]:protocol' \
+ '-ktls[enable kernel TLS for sending and receiving]' \
+ '-sendfile[SSL_sendfile will be used instead of BIO_write to send response]' \
+ '-zerocopy_sendfile[SSL_sendfile will use the zerocopy TX mode]' \
+ '-keylogfile[append TLS secrets to the specified keylog file]:file:_files' \
+ '-max_early_data[change the default maximum early data bytes for new sessions and incoming early data]:size' \
+ '-recv_max_early_data[hard limit on the maximum number of early data bytes that will be accepted]:bytes' \
+ '-early_data[accept early data where possible]' \
+ '-stateless[require TLSv1.3 cookies]' \
+ '(-anti_replay -no_anti_replay)-anti_replay[switch replay protection on]' \
+ '(-anti_replay -no_anti_replay)-no_anti_replay[switch replay protection off]' \
+ '-tfo[enable acceptance of TCP fast Open connections]' \
+ '-cert_comp[pre-compresses certificates that will be sent during the handshake]' \
+ '-nameopt[how the subject or issuer names are displayed]:how:_openssl_name_display_options' \
+ $openssl_tls_flags[@] \
+ $openssl_dtls_flags[@] \
+ $openssl_supported_commands_flags[@] \
+ $openssl_extended_verification_flags[@] \
+ $openssl_trusted_certificate_options[@] \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ $openssl_verification_options[@] \
+ '-enable_server_rpk[enable support for sending raw public keys to the client]' \
+ '-enable_client_rpk[enable support for receiving raw public keys from the client]'
}
-
_openssl_s_time() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-connect[host:port to connect to (default is localhost:4433)]:host\:port: ' \
- '-nbio[run with non-blocking IO]' \
- '-ssl2[just use SSLv2]' \
- '-ssl3[just use SSLv3]' \
- '-bugs[turn on SSL bug compatibility]' \
- '-new[just time new connections]' \
- '-reuse[just time connection reuse]' \
- "-www[retrieve the specified page from the site]:page: " \
- '-time[max number of seconds to collect data, default 30]:seconds: ' \
- '-verify[turn on peer certificate verification]:depth: ' \
- '-cert[certificate file to use, PEM format assumed]:file:_files' \
- '-key[RSA file to use, PEM format assumed, key is in cert file]:file:_files' \
- "-CApath[PEM format directory of CA's]:file:_files -/" \
- "-CAfile[PEM format file of CA's]:file:_files" \
- '-cipher[preferred cipher to use]:cipher suite:_list_ciphers'
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-connect[host and optional port to connect to]:host_port' \
+ '-www[page to GET from the server. "/" gets the index.html page]:page' \
+ '-cert[certificate to use]:certificate' \
+ '-key[private key to use]:key:_files' \
+ '-verify[verify depth to use]:depth' \
+ '-new[performs the timing test using a new session ID for each connection]' \
+ '-reuse[performs the timing test using the same session ID]' \
+ '-bugs[enable various workaround for known SSL and TLS implementations]' \
+ '-cipher[allow TLSv1.2 and cipher list sent by the client to be modified]:ciperlist:_openssl_list_ciphers' \
+ '-ciphersuites[allow the TLSv1.3 ciphersuites sent by the client to be modified]:val' \
+ '-time[specify how long seconds this command should establish connections]:seconds' \
+ '-nameopt[specify how the subject or issuer names are displayed]:option:_openssl_nameopts' \
+ $openssl_trusted_certificate_options[@] \
+ $openssl_provider_options[@] \
+ $openssl_tls_flags[@]
}
-
_openssl_sess_id() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format]:format:(PEM DER)' \
- '-outform[output format]:format:(PEM DER)' \
- '-in[input file (default stdin)]:file:_files' \
- '-out[output file (default stdout)]:file:_files' \
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-context[set the session ID context]:id' \
+ '-in[input file(default stdin)]:file:_files' \
+ '-inform[input format(default PEM)]:format:(DER PEM)' \
+ '-out[output file(default stdout)]:file:_files' \
+ '-outform[output format(default PEM)]:format:(PEM DER NSS)' \
'-text[print ssl session id details]' \
- '-cert[output certificate ]' \
- '-noout[no CRL output]' \
- '-context[set the session ID context]:id: '
+ '-cert[output certificate]' \
+ '-noout[do not output the encoded session info]'
}
-
_openssl_smime() {
- # written for openssl 1.0.1k
- _arguments -C \
+ local -a ciphers=($(openssl enc -list | tail -n +2 ))
+ local -a cipher_flags=()
+ for cipher in $ciphers[@]
+ do
+ cipher_flags+=("($ciphers)${cipher}[use ${cipher:1}]")
+ done
+
+ _arguments \
+ '(- *)-help[print help message]' \
'-encrypt[encrypt message]' \
- '-decrypt[decrypt encrypted message]' \
- '-sign[sign message]' \
+ '-decrypt[decrypt message]' \
+ '-sign[sign message using the supplied certificate and private key]' \
+ '-resign[resign a message]' \
'-verify[verify signed message]' \
- '-pk7out[output PKCS#7 structure]' \
- '-des3[encrypt with triple DES]' \
- '-des[encrypt with DES]' \
- '-seed[encrypt with SEED]' \
- '-rc2-40[encrypt with RC2-40 (default)]' \
- '-rc2-64[encrypt with RC2-64]' \
- '-rc2-128[encrypt with RC2-128]' \
- '-aes128[encrypt PEM output with cbc aes]' \
- '-aes192[encrypt PEM output with cbc aes]' \
- '-aes256[encrypt PEM output with cbc aes]' \
- '-camellia128[encrypt PEM output with cbc camellia]' \
- '-camellia192[encrypt PEM output with cbc camellia]' \
- '-camellia256[encrypt PEM output with cbc camellia]' \
- "-nointern[don't search certificates in message for signer]" \
- "-nosigs[don't verify message signature]" \
- "-noverify[don't verify signers certificate]" \
- "-nocerts[don't include signers certificate when signing]" \
+ '-pk7out[write out a PEM encoded PKCS#7 structure]' \
+ '-in[input message file]:file:_files' \
+ '-out[output file name]:file:_files' \
+ '-inform[input format]:format:(DER PEM SMIME)' \
+ '-outform[output format]:format(DER PEM SMIME)' \
+ '-keyform[key format]:format:(DER PEM P12 ENGINE)' \
+ '(-stream -indef)'{-stream,-indef}'[enable streaming I/O for encoding operations]' \
+ '-noindef[disable streaming I/O]' \
+ '-content[file containing the detached content]:file:_files' \
+ '-text[add plain text MIME headers to the supplied message]' \
+ '-md[digest algorithm to use when signing or resigning]:digest:(sha256 sha1 md5' \
+ $cipher_flags[@] \
+ '-nointern[use only the certificate in the -certificate]' \
+ '-noverify[do not verify the signers certificate of a signed message]' \
+ '-nochain[do not do chain verifier of signers certificates]' \
+ '-nosigs[do not try to verify the signatures on the message]' \
+ '-nocerts[reduce the size of the signed message]' \
+ '-noattr[do not include attributes in the mssage]' \
'-nodetach[use opaque signing]' \
- "-noattr[don't include any signed attributes]" \
- "-binary[don't translate message to text]" \
- '-certfile[other certificates file]:file:_files' \
- '-signer[signer certificate file]:file:_files' \
- '-recip[recipient certificate file for decryption]:file:_files' \
- '-in[input file]:file:_files' \
- '-inform[input format]:format:(SMIME PEM DER)' \
- '-inkey[input private key (if not signer or recipient)]:file:_files' \
- '-keyform[input private key format]:format:(PEM ENGINE)' \
- '-out[output file]:file:_files' \
- '-outform[output format]:format:(SMIME PEM DER)' \
- '-content[supply or override content for detached signature]:file:_files' \
- '-to[to address]:address: ' \
- '-from[from address]:address: ' \
- '-subject[subject]:subject: ' \
- '-text[include or delete text MIME headers]' \
- '-CApath[trusted certificates directory]:directory:_files -/' \
- '-CAfile[trusted certificates file]:file:_files' \
- "-crl_check[check revocation status of signer's certificate using CRLs]" \
- "-crl_check_all[check revocation status of signer's certificate chain using CRLs]" \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-rand[files to use for random number input]:file:_rand_files' \
- ':certificate:_files'
+ '-nosmimecap[do not include the SMIMECapabilities attribute]' \
+ '-binary[do not convert message to "canonical" format]' \
+ '-crlfeol[use CRLF instead of LF as end of line in output file]' \
+ '-certfile[additional certificate file]:file:_files' \
+ '*-signer[signing certificate]:file:_files' \
+ '-recip[recipients certificate when decrypting a message]:file:_files' \
+ '-inkey[private key file or URI for signing or decrypting]:file_or_uri:_files' \
+ '-passin[private key password source]:source:_openssl_pass_phrase_options' \
+ '-to["To" mail header]:addr' \
+ '-from["From" mail header]:addr' \
+ '-subject["Subject" mail header]:subject' \
+ $openssl_verification_options[@] \
+ $openssl_trusted_certificate_options[@]\
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '-config[config file]:file:_files' \
+ '*::recip_rert:_files'
}
-
_openssl_speed() {
- # written for openssl 1.0.1k
- local algorithms
- algorithms=(mdc2 md4 md5 hmac sha1 sha256 sha512 whirlpoolrmd160 idea-cbc \
- seed-cbc rc2-cbc rc5-cbc bf-cbc des-cbc des-ede3 aes-128-cbc \
- aes-192-cbc aes-256-cbc aes-128-ige aes-192-ige aes-256-ige \
- camellia-128-cbc camellia-192-cbc camellia-256-cbc rc4 rsa512 \
- rsa1024 rsa2048 rsa4096 dsa512 dsa1024 dsa2048 ecdsap160 \
- ecdsap192 ecdsap224 ecdsap256 ecdsap384 ecdsap521 ecdsak163 \
- ecdsak233 ecdsak283 ecdsak409 ecdsak571 ecdsab163 ecdsab233 \
- ecdsab283 ecdsab409 ecdsab571 ecdsa ecdhp160 ecdhp192 ecdhp224 \
- ecdhp256 ecdhp384 ecdhp521 ecdhk163 ecdhk233 ecdhk283 ecdhk409 \
- ecdhk571 ecdhb163 ecdhb233 ecdhb283 ecdhb409 ecdhb571 ecdh idea \
- seed rc2 des aes camellia rsa blowfish)
- _arguments -C \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-evp[use the specified EVP]:EVP: ' \
- '-decrypt[time decryption instead of encryption (only EVP)]' \
- '-mr[produce machine readable output]' \
- '-multi[run n benchmarks in parallel]:benchmarks: ' \
- "*:algorithm:(${algorithms})"
-}
+ # NOTE extract algorithms from speed.c and check if 'openssl speed -seconds 1 $alg' succeed
+ local -a speed_algorithms=(
+ md2 mdc2 md4 md5 hmac sha1 sha256 sha512 whirlpool ripemd rmd160
+ ripemd160 rc4 des-cbc des-ede3 aes-128-cbc aes-192-cbc aes-256-cbc
+ camellia-128-cbc camellia-192-cbc camellia-256-cbc rc2-cbc rc2 rc5-cbc
+ rc5 idea-cbc idea seed-cbc seed bf-cbc blowfish bf cast-cbc cast cast5
+ ghash rand kmac128 kmac256 dsa1024 dsa2048 rsa512 rsa1024 rsa2048
+ rsa3072 rsa4096 rsa7680 rsa15360 ffdh2048 ffdh3072 ffdh4096 ffdh6144
+ ffdh8192 ecdsap160 ecdsap192 ecdsap224 ecdsap256 ecdsap384 ecdsap521
+ ecdsak163 ecdsak233 ecdsak283 ecdsak409 ecdsak571 ecdsab163 ecdsab233
+ ecdsab283 ecdsab409 ecdsab571 ecdsabrp256r1 ecdsabrp256t1
+ ecdsabrp384r1 ecdsabrp384t1 ecdsabrp512r1 ecdsabrp512t1 ecdhp160
+ ecdhp192 ecdhp224 ecdhp256 ecdhp384 ecdhp521 ecdhk163 ecdhk233
+ ecdhk283 ecdhk409 ecdhk571 ecdhb163 ecdhb233 ecdhb283 ecdhb409
+ ecdhb571 ecdhbrp256r1 ecdhbrp256t1 ecdhbrp384r1 ecdhbrp384t1
+ ecdhbrp512r1 ecdhbrp512t1 ecdhx25519 ecdhx448 curveSM2
+ )
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-config[configuration file]:file:_files' \
+ '-elapsed[use wall-clock time instead of CPU user time as divisor]' \
+ '-evp[use specified cipher or message digest algorithm via the EVP interface]:alg: _alternative "ciphers\:cipher\:_openssl_digests" "digests\:digest\:_openssl_cipher_algorithms"' \
+ '-multi[run multiple operations in parallel]:number' \
+ '-async_jobs[enable async mode and start specified number of jobs]:number' \
+ '-misalign[misalign the buffers by the specified number of bytes]:number' \
+ '-hmac[time the HMAC algorithm using the given message digest]:digest:_openssl_digests' \
+ '-cmac[time the CMAC algorithm using the given cipher]:cipher:_openssl_cipher_algorithms' \
+ '-decrypt[time the decryption instead of encryption]' \
+ '-mb[enable multi-block mode on EVP-named cipher]' \
+ '-aead[benchmark EVP-named AEAD cipher in TLS-like sequence]' \
+ '-kem-algorithms[benchmark KEM algorithms]' \
+ '-signature-algorithms[benchmark signature algorithms]' \
+ '-primes[generate n prime RSA key and use it to run the benchmarks]:number' \
+ '-seconds[run benchmarks for the given seconds]:number' \
+ '-bytes[run benchmarks on num-byte buffers]:bytes' \
+ '-mr[produce the summary in a machine-readable format]' \
+ '-mlock[lock memory into RAM for more determining measurements]' \
+ '-testmode[run the speed command in testmode]' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '*::alg:(($speed_algorithms))'
+}
_openssl_spkac() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-in[input file]:file:_files' \
- '-out[output file]:file:_files' \
- '-key[create SPKAC using private key]:file:_files' \
- '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-challenge[challenge string]:string: ' \
- '-spkac[alternative SPKAC name]:spkacname: ' \
- '-spksect[alternative section name]:section: ' \
- "-noout[don't print SPKAC]" \
- '-pubkey[output public key]' \
- '-verify[verify SPKAC signature]' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines'
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-in[input file name]:file:_files' \
+ '-out[output file name]:file:_files' \
+ '-digest[digest to sign a created SPKAC file]:digest:_openssl_digests' \
+ '-key[private key file or URI to create an SPKAC file]:file_or_uri:_files' \
+ '-keyform[key format]:format:(DER PEM P12 ENGINE)' \
+ '-passin[input file password source]:option:_openssl_pass_phrase_options' \
+ '-challenge[challenge string]:string' \
+ '-spkac[alternative name form the variable containing the SPKAC(default "SPKAC")]:name' \
+ '-spksect[allow an alternative name form the section containing the SPKAC]:section' \
+ '-noout[do not output the text version of the SPKAC]' \
+ '-pubkey[output the public key of an SPKAC]' \
+ '-verify[verify the digital signature on the supplied SPKAC]' \
+ $openssl_provider_options[@]
}
-
_openssl_srp() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-verbose[talk a lot while doing things]' \
- '-config[a config file]:file:_files' \
- '-name[the particular srp definition to use]:definition: ' \
- '-srpvfile[the srp verifier file name]:file:_files' \
- '(-modify -delete -list)-add[add an user and srp verifier]' \
- '(-add -delete -list)-modify[modify the srp verifier of an existing user]' \
- '(-add -modify -list)-delete[delete user from verifier file]' \
- '(-add -modify -delete)-list[list user]' \
- '-gn[g and N values to be used for new verifier]:g and N: ' \
- '-userinfo[additional info to be set for user]:userinfo: ' \
- '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-passout[output file pass phrase source]:pass phrase source:_pass_phrase_source' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '-rand[files to use for random number input]:file:_rand_files' \
- ':user:'
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-verbose[generate verbose output while processing]' \
+ '(-add -modify -delete -list)-add[add a user and SRP verifier]' \
+ '(-add -modify -delete -list)-modify[modify the SRP verifier of an existing user]' \
+ '(-add -modify -delete -list)-delete[delete user from verifier file]' \
+ '(- *)-list[list users]' \
+ '-name[particular SRP definition to use]:name' \
+ '-srpvfile[srp verifier file name]:file:_files' \
+ '-gn[specify the "g" and "N" value]:g_and_N' \
+ '-userinfo[additional information to add when adding or modifying a user]:info' \
+ '-passin[password source for input file]:option:_openssl_pass_phrase_options' \
+ '-passout[password source for output file]:option:_openssl_pass_phrase_options' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@] \
+ '-config[config file]:file:_files' \
+ '*::user'
}
+_openssl_storeutl() {
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-out[output file name]:file:_files' \
+ '-noout[prevent output of the PEM data]' \
+ '-passin[key password source]:option:_openssl_pass_phrase_options' \
+ '-text[print out the objects in text form]' \
+ '-r[fetch objects recursively when possible]'\
+ '-certs[only select the certificates from the given URI]' \
+ '-keys[only select the keys from the given URI]' \
+ '-crls[only select the CRLs from the given URI]' \
+ '-subject[search for an object having the subject name arg]:arg' \
+ '-issuer[search for an object having the given issuer name]:name' \
+ '-serial[search for an object having the given serial number]:serial_number' \
+ '-alias[search for an object having the given alias]:alias' \
+ '-fingerprint[search for an object having the given fingerprint]:fingerprint' \
+ '-digest[digest that was used to compute the fingerprint given with -fingerprint]' \
+ $openssl_provider_options[@] \
+ '*:uri:_urls'
+}
_openssl_ts() {
- # written for openssl 1.0.1k
- # written for openssl 1.0.2e
- local action digests
- digests=(-dss1 -md4 -md5 -mdc2 -ripemd160 -sha -sha1 -sha224 -sha256 \
- -sha384 -sha512 -whirlpool)
- if [[ "${CURRENT}" -eq 2 ]]; then
- # first parameter to ts
- _values 'openssl time stamp action' '-query[time stamp request generation]' '-reply[time stamp response generation]' '-verify[time stamp response verification]'
+ if [[ CURRENT -eq 2 ]]; then
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-query[generate a TS query]' \
+ '-reply[generate a TS reply]' \
+ '-verify[verify a TS response]'
else
- action="${words[2]}"
- case "${action}" in
- -query)
- _arguments -C \
- '-rand[files to use for random number input]:file:_rand_files' \
- '-config[config file to use]:file:_files' \
- '(-digest)-data[data file for which the time stamp request needs to be created]:file:_files' \
- '(-data)-digest[digest of the data file]:bytes: ' \
- "($digests)-dss1[use the dss1 message digest algorithm]" \
- "($digests)-md4[to use the md4 message digest algorithm]" \
- "($digests)-md5[to use the md5 message digest algorithm]" \
- "($digests)-mdc2[to use the mdc2 message digest algorithm]" \
- "($digests)-ripemd160[to use the ripemd160 message digest algorithm]" \
- "($digests)-sha[to use the sha message digest algorithm]" \
- "($digests)-sha1[to use the sha1 message digest algorithm]" \
- "($digests)-sha224[to use the sha224 message digest algorithm]" \
- "($digests)-sha256[to use the sha256 message digest algorithm]" \
- "($digests)-sha384[to use the sha384 message digest algorithm]" \
- "($digests)-sha512[to use the sha512 message digest algorithm]" \
- "($digests)-whirlpool[to use the whirlpool message digest algorithm]" \
- '-policy[policy to use for creating the time stamp token]:policy ID: ' \
- '-no_nonce[do not include a nonce in the request]' \
- '-cert[request a signing certificate in the response]' \
- '-in[use the previously created time stamp request]:file:_files' \
- '-out[name of the output file to which the request will be written]:file:_files' \
- '-text[output in human-readable format instead of DER]'
+ local -a digests=($(openssl dgst -list | tail -n +2))
+ local -a digest_flags=()
+ for digest in $digests[@]
+ do
+ digest_flags+=("${digest}[use ${digest:1} message digest algorithm]")
+ done
+
+ case $words[2] in
+ (-query)
+ _arguments \
+ '-config[configuration file]:file:_files' \
+ '-data[data file for creating timestamp request]:file:_files' \
+ '-digest[message imprint in a hexadecimal format]:digest' \
+ $digest_flags[@] \
+ '-tspolicy[policy that the client expects the TSA for creating the timestamp token]:oid' \
+ '-no_nonce[no nonce instead of 64bit long pseudo-random nonce]' \
+ '-cert[TSA is expected to include its signing certificates in the response]' \
+ '-in[previously created timestamp request]:file:_files' \
+ '-out[output file name]:file:_files' \
+ '-text[output human-readable text format instead of DER]' \
+ $openssl_random_state_options[@]
;;
- -reply)
- _arguments -C \
- '-config[config file to use]:file:_files' \
- '-section[config file section for response generation]:section: ' \
- '-queryfile[file containing a DER encoded time stamp request]:file:_files' \
- '-passin[private key password source]:pass phrase source:_pass_phrase_source' \
+ (-reply)
+ _arguments \
+ '-config[configuration file]:file:_files' \
+ '-section[name of the config file section for the response generation]:section' \
+ '-queryfile[file containing a DER encoded timestamp request]:file:_files' \
+ '-passin[password source for the private key of the TSA]:source:_openssl_pass_phrase_options' \
'-signer[signer certificate of the TSA in PEM format]:file:_files' \
- '-inkey[signer private key in PEM format]:file:_files' \
- '-chain[signer certificate chain in PEM format]:file:_files' \
- '-policy[default policy to use for response]:policy ID: ' \
- '-in[use the previously created time stamp response in DER format]:file:_files' \
- '-token_in[the parameter to -in is a time stamp token in DER format]' \
- '-out[name of the output file to which the response will be written]:file:_files' \
- '-token_out[output a time stamp token instead of a time stamp response]' \
- '-text[output in human-readable format instead of DER]' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines'
+ '-inkey[signer private key file or URI of the TSA in PEM format]:file_or_uri:_files' \
+ $digest_flags[@] \
+ '-chain[certificate chain]:file:_files' \
+ '-tspolicy[policy to use for the response]:oid' \
+ '-in[previously created timestamp response or timestamp token]:file:_files' \
+ '-token_in[input is a DER encoded timestamp token instead of a timestamp response]' \
+ '-out[output file name to write the response]:file:_files' \
+ '-token_out[output is a timestamp token instead of timestamp response]' \
+ '-text[output human-readable text format instead of DER]' \
+ $openssl_provider_options[@]
;;
- -verify)
- _arguments -C \
- '(-digest -queryfile)-data[verify response against the specified file]:file:_files' \
- '(-data -queryfile)-digest[verify the response against the specified message digest]:digest bytes: ' \
- '(-data -digest)-queryfile[the original time stamp request in DER format]:file:_files' \
- '-in[time stamp response that needs to be verified in DER format]:file:_files' \
- '-token_in[the parameter to -in is a time stamp token in DER format]' \
- '-CApath[directory containing the trusted CA certificates of the client]:directory:_files -/' \
- '-CAFile[file containing a set of trusted self-signed CA certificates in PEM format]:file:_files' \
- '-untrusted[set of additional untrusted certificates in PEM format which may be needed when building the certificate chain]:file:_files'
+ (-verify)
+ _arguments \
+ '-data[file to hash to be verified against response or token]:file_to_hash:_files' \
+ '-digest[message digest to be verified against reponse or token]:bytes' \
+ '-queryfile[original timestamp request file in DER format]:file:_files' \
+ '-in[timestamp response file in DER format]:file:_files' \
+ '-token_in[input is a DER encoded timestamp token instead of a timestamp response]' \
+ '-untrusted[set of additional untrusted certificates files or URIs]:file_or_uri:_files' \
+ $openssl_trusted_certificate_options[@] \
+ $openssl_verification_options[@]
;;
esac
fi
}
-
_openssl_verify() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-CApath[a directory of trusted certificates]:directory:_files -/' \
- '-CAfile[file A file of trusted certificates]:file:_files' \
- '-purpose[the intended use for the certificate]:purpose:(sslclient sslserver nssslserver smimesign smimeencrypt crlsign any ocsphelper timestampsign)' \
- '*-policy[enable policy processing and add arg to the user-initial-policy-set]:object name or OID: ' \
- '-ignore_critical[ignore critical extensions]' \
- '-attime[perform validation checks using the given time]:timestamp: ' \
- '-check_ss_sig[verify the signature on the self-signed root CA]' \
- "-crlfile[file containing one or more CRL's (in PEM format) to load]:file:_files" \
- '-crl_check[check end entity certificate in CRL]' \
- '-crl_check_all[check all certificates in CRL]' \
- '-policy_check[enables certificate policy processing]' \
- '-explicit_policy[set policy variable require-explicit-policy]' \
- '-inhibit_any[set policy variable inhibit-any-policy]' \
- '-inhibit_map[set policy variable inhibit-policy-mapping]' \
- '-x509_strict[strict X.509-compliance]' \
- '-extended_crl[enable extended CRL features]' \
- '-use_deltas[enable support for delta CRLs]' \
- '-policy_print[print out diagnostics related to policy processing]' \
- '-untrusted[a file of untrusted certificates]:file:_files' \
- '(-*)-help[print out a usage message]' \
- '-issuer_checks[print out diagnostics relating to searches for the issuer certificate of the current certificate]' \
+ _arguments -S \
+ '(- *)-help[print help message]' \
+ '-CRLfile[file or URL should contains one or more CRLs in PEM or DER format]:file_or_uri:_files' \
+ '-crl_download[attempt to download CRL information for certificates via their CDP entries]' \
+ '-show_chain[display information about the certificate chain that has been built]' \
'-verbose[print extra information about the operations being performed]' \
- '*:certificate:_files'
- # TODO: - may be used to separate certificates from options
- # TODO: Do not hardcode purposes
+ '-trusted[file or URI of trusted certificates]:file_or_uri:_files' \
+ '-untrusted[file or URI of untrusted certificates to use for chain building]:file_or_uri:_files' \
+ '-vfyopt[pass options to the signature algorithms during verify operations]:options' \
+ '-nameopt[specify how the subject or issuer names are displayed]:nameopt:_openssl_nameopts' \
+ $openssl_trusted_certificate_options[@] \
+ $openssl_verification_options[@] \
+ $openssl_provider_options[@] \
+ '*::certificate:_files'
}
-
_openssl_version() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-a[all information, this is the same as setting all the other flags]' \
- '-v[the current OpenSSL version]' \
- '-b[the date the current version of OpenSSL was built]' \
- '-o[option information: various options set when the library was built]' \
+ _arguments \
+ '(- *)-help[print help message]' \
+ '-a[all information]' \
+ '-v[current OpenSSL version]' \
+ '-b[date the current version of OpenSSL was built]' \
+ '-o[option information, options set when the library was built]' \
'-f[compilation flags]' \
'-p[platform setting]' \
- '-d[OPENSSLDIR setting]'
+ '-d[OPENSSLDIR setting]' \
+ '-e[ENGINESDIR settings]' \
+ '-m[MODULESDIR settings]' \
+ '-r[random number generator source settings]' \
+ '-c[OpenSSL CPU settings info]' \
+ '-w[OPENSSL OSSL_WINCTX build time variable]'
}
-
_openssl_x509() {
- # written for openssl 1.0.1k
- _arguments -C \
- '-inform[input format - default PEM (one of DER, NET or PEM)]:format:(DER NET PEM)' \
- '-outform[output format - default PEM (one of DER, NET or PEM)]:arg:(DER NET PEM)' \
- '-keyform[private key format - default PEM]:arg:(DER PEM)' \
- '-CAform[CA format - default PEM]:arg:(DER PEM)' \
- '-CAkeyform[CA key format - default PEM]:arg:(DER PEM)' \
- '-in[input file - default stdin]:file:_files' \
- '-out[output file - default stdout]:file:_files' \
- '-passin[private key password source]:pass phrase source:_pass_phrase_source' \
- '-serial[print serial number value]' \
- '-subject_hash[print subject hash value]' \
- '-subject_hash_old[print old-style (MD5) subject hash value]' \
- '-issuer_hash[print issuer hash value]' \
- '-issuer_hash_old[print old-style (MD5) issuer hash value]' \
- '-hash[synonym for -subject_hash]' \
- '-subject[print subject DN]' \
- '-issuer[print issuer DN]' \
- '-email[print email address(es)]' \
- '-startdate[notBefore field]' \
- '-enddate[notAfter field]' \
- '-purpose[print out certificate purposes]' \
- '-dates[both Before and After dates]' \
- '-modulus[print the RSA key modulus]' \
- '-pubkey[output the public key]' \
- '-fingerprint[print the certificate fingerprint]' \
- '-alias[output certificate alias]' \
- '-noout[no certificate output]' \
- '-ocspid[print OCSP hash values for the subject name and public key]' \
- '-ocsp_uri[print OCSP Responder URL(s)]' \
- '-trustout[output a "trusted" certificate]' \
- '-clrtrust[clear all trusted purposes]' \
- '-clrreject[clear all rejected purposes]' \
- '-addtrust[trust certificate for a given purpose]:purpose:(clientAuth serverAuth emailProtection)' \
- '-addreject[reject certificate for a given purpose]:purpose:(clientAuth serverAuth emailProtection)' \
- '-setalias[set certificate alias]:alias: ' \
- '-days[how long till expiry of a signed certificate (default 30 days)]:days: ' \
- '-checkend[check whether the cert expires in the specified time]:seconds: ' \
- '-signkey[self sign cert with arg]:file:_files' \
- '-x509toreq[output a certification request object]' \
- '-req[input is a certificate request, sign and output]' \
- '-CA[set the CA certificate, must be PEM format]:file:_files' \
- '-CAkey[set the CA key, must be PEM format]:file:_files' \
- '-CAcreateserial[create serial number file if it does not exist]' \
- '-CAserial[serial file]:file:_files' \
- '-set_serial[serial number to use]' \
- '-text[print the certificate in text form]' \
- '-C[print out C code forms]' \
- '(-md5 -sha1 -mdc2)-md2[digest to use]' \
- '(-md2 -sha1 -mdc2)-md5[digest to use]' \
- '(-md2 -md5 -mdc2)-sha1[digest to use]' \
- '(-md2 -md5 -sha1)-mdc2[digest to use]' \
- '-extfile[configuration file with X509V3 extensions to add]' \
- '-extensions[section from config file with X509V3 extensions to add]' \
- '-clrext[delete extensions before signing and input certificate]' \
- '*-nameopt[various certificate name options]:options:_nameopts' \
- '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \
- '*-certopt[various certificate text options]:options:_certopts'
+ local -a digests=($(openssl dgst -list | tail -n +2))
+ local -a digest_flags=()
+ for digest in $digests[@]
+ do
+ digest_flags+=("${digest}[use ${digest:1} message digest algorithm]")
+ done
+
+ _arguments \
+ '(- *)-help[print help message]' \
+ '(-in -new)-in[input file or URI for reading a certificate request]:file_or_uri:_files' \
+ '-passin[key and certificate file password source]:source:_openssl_pass_phrase_options' \
+ '(-in -new)-new[generate a certificate from scratch]' \
+ '-x509toreq[output a PKCS#10 certificate request]' \
+ '-req[expect a PKCS#10 certificate request]' \
+ '-copy_extensions[how to handle X.509 extensions when converting from a certificate to a request]:how:(none copy copyall)' \
+ '-inform[input file format]:format:(DER PEM)' \
+ '-vfyopt[options of the signature algorithm during verify operations]:option' \
+ '(-key -signkey)'{-key,-signkey}'[private key file or URI for a new certificate or certificate request]:file_or_uri:_files' \
+ '-keyform[key input format]:format:(DER PEM P12 ENGINE)' \
+ '-out[output file name]:file:_files' \
+ '-outform[output format]:format:(DER PEM)' \
+ '-nocert[do not output a certificate]' \
+ '-noout[prevent output except for printing as requested]' \
+ '-dataopt[data output format(default: rfc_822)]:format:(rfc_822 iso_8601)' \
+ '-text[print out the certificate in text form]' \
+ '-certopt[option to customize the print format used with -text]:option:_openssl_text_printing_options' \
+ '-fingerprint[calculate and print the digest of the DER encoded version of the entire certificate]' \
+ '-alias[print the certificate "alias"(nickname) if any]' \
+ '-serial[print the certificate serial number]' \
+ '-startdate[print out the start date of the certificate]' \
+ '-enddate[print out the expiry date of the certificate]' \
+ '-dates[print out the start and expiry dates of a certificate]' \
+ '-subject[print the subject name]' \
+ '-issuer[print the issuer name]' \
+ '-nameopt[how the subject or issuer names are displayed]:option:_openssl_nameopts' \
+ '-email[print the email address(es) if any]' \
+ '(-hash -subject_hash)'{-hash,-subject_hash}'[print the "hash" of the certificate subject name]' \
+ '-subject_hash_old[print the "hash" of the certificate subject name using the older algorithm]' \
+ '-issuer_hash[print the "hash" of the certificate issuer name]' \
+ '-issuer_hash_old[print the "hash" of the certificate issuer name using the older algorithm]' \
+ '-ext[print out the certificate extensions in text form]:extensions:_openssl_certificate_extensions' \
+ '-ocspid[print the OCSP hash values for the subject name and public key]' \
+ '-ocsp_uri[print the OCSP responder address(es) if any]' \
+ '-purpose[perform tests on the certificate extensions and output the result]' \
+ "-pubkey[print the certificate's SubjectPublicKeyInfo block in PEM format]" \
+ '-modulus[print out the value of the modulus of the public key contained in the certificate]' \
+ '-checkend[check if the certificate expires within the given seconds]:seconds' \
+ '-checkhost[check that the certificate matches the specified host]:host' \
+ '-checkemail[check that the certificate matches the specified email address]:email' \
+ '-checkip[check that the certificate matches the specified IP address]:ip' \
+ '-set_serial[serial number to use]:serial_number' \
+ '-next_serial[serial to be one more than the number in the certificate]' \
+ '-not_before[start date to be explicitly set]:date' \
+ '-not_after[expiry date to be explicitly set]:date' \
+ '-days[the number of days from today until a newly generated certificate expires]:days' \
+ '-preserve_dates[preserve "notBefore" and "notAfter" dates of any input certificate]' \
+ '-set_issuer[issuer name for certicate created]:issuer' \
+ '(-set_subject -subj)'{-set_subject,-subj}'[subject name for certicate created]:subject' \
+ '-force_pubkey[public key file to be set in certicate created]:file:_files' \
+ '-clrext[prevents taking over any extensions from the source]' \
+ '-extfile[configuration file containing certificate and request X.509 extensions to add]:file:_files' \
+ '-extensions[section in the extfile to add X.509 extensions form]:section' \
+ '-sigopt[options to the signature algorithm during sign operations]:options' \
+ '-badsig[currupt the signature before writing it]' \
+ $digest_flags[@] \
+ '-CA["CA" certificate file or URI]:file_or_uri:_files' \
+ '-CAform[format for the CA certificate]:format:(DER PEM P12)' \
+ '-CAkey[CA private key file or URI to sign a certificate with]:file_or_uri:_files' \
+ '-CAkeyform[format for the CA key]:format:(DER PEM P12 ENGINE)' \
+ '-CAserial[CA serial number file to use]:file:_files' \
+ '-CAcreateserial[create CA serial number file if it does not exist]' \
+ '-trustout[mark any certificate PEM output as <trusted> certificate rather than ordinary]' \
+ '-setalias[set the "alias" of the certificate]:alias' \
+ '-clrtrust[clear all the permitted or trusted uses of the certificate]' \
+ '-addtrust[add a trusted certificate use]:name:(clientAuth serverAuth emailProtection anyExtendedKeyUsage)' \
+ '-clrreject[clear all the prohibited or rejected use of the certificate]' \
+ '-addreject[add a prohibited trust anchor purpose]:arg:(clientAuth serverAuth emailProtection anyExtendedKeyUsage)' \
+ $openssl_random_state_options[@] \
+ $openssl_provider_options[@]
}
+#
+# Utilities
+#
-_pass_phrase_source() {
- # pass:password
- # env:var
- # file:pathname
- # fd:number
- # stdin
- _values -S : 'pass phrase source' \
- 'pass[obtain the password from the command line]:password: ' \
- 'env[obtain the password from the environment variable var]:var:_parameters -g "*export*"' \
- 'file[obtain the password from a file]:file:_files' \
- 'fd[read the password from the file descriptor number]:number: ' \
- 'stdin[read the password from standard input]'
+_openssl_certificate_extensions() {
+ # See x509v3_config document
+
+ local -a extensions=(
+ basicConstraints keyUsage extendedKeyUsage subjectKeyIdentifier authorityKeyIdentifier
+ subjectAltName issuerAltName authorityInfoAccess crlDistributionPoints
+ issuingDistributionPoint certificatePolicies policyConstraints
+ inhibitAnyPolicy nameConstraints noCheck tlsfeature
+ )
+
+ _values -s , extensions $extensions
}
+_openssl_digests() {
+ # openssl list -digest-commands is deprecated, use another command instead
+ local -a digest_flags=($(openssl dgst -list | tail -n +2))
+ local -a digests=()
+
+ for flag in $digest_flags[@]
+ do
+ digests+=(${flag:1})
+ done
-_rand_files() {
- # FIXME: this does not allow using multiple files separated by :
- # the following would probably work, but how to generate $files?
- #_values -s : -S ' ' 'random source file or directory' ${files}
- _files
+ _values 'digests' ${digests}
}
+_openssl_cipher_algorithms() {
+ local -a encrypt_flags=($(openssl enc -list | tail -n +2))
+ local -a encrypts=()
-_engines() {
- # openssl engines
- local engines
- engines=(${${${(@f)"$(_call_program engines openssl engine)"}%)*}#\(})
- _values 'engines' ${engines}
+ for flag in $encrypt_flags[@]
+ do
+ encrypts+=(${flag:1})
+ done
+
+ _values 'encrypts' ${encrypts}
}
+_openssl_groups() {
+ local -a groups=(P-256 P-384 P-521 X25519 X448 ffdhe2048 ffdhe3072 ffdhe4096 ffdhe6144 ffdhe8192)
+ _values -s ':' groups $groups
+}
-_list_ciphers() {
+_openssl_list_ciphers() {
# openssl ciphers
local ciphers
# add cipher suites
@@ -1608,80 +2451,121 @@ _list_ciphers() {
_values -s : 'cipher suite' ${ciphers}
}
+_openssl_mac_algorithms() {
+ # openssl list -mac-algorithms
+ local algorithms=(
+ BLAKE2BMAC BLAKE2SMAC CMAC HMAC KMAC128 KMAC256 SIPHASH POLY1305
+ )
-_list_curves() {
- # openssl ecparam -list_curves
- local curves not_curves
- curves="$(_call_program list_curves openssl ecparam -list_curves)"
- # identify lines that do not contain curve names but only descriptions
- not_curves=(${${(f)curves[@]}:#*:*})
- # remove non-curve lines, trailing descriptions and leading spaces
- curves=(${${${${(f)curves[@]}:|not_curves}%:*}##* })
- _values 'named curves' ${curves}
+ _values algorithms $algorithms
}
+_openssl_macopts() {
+ local -a options=(
+ 'key\:[MAC key as an alphanumeric string]'
+ 'hexkey\:[MAC key in hexadecimal form]'
+ 'iv\:[IV as an alphanumeric string to be used by GMAC]'
+ 'hexiv\:[IV in hexadecimal form to be used by GMAC]'
+ 'size\:[output length to be used by KMAC128 or KMAC256]'
+ 'custom\:[customization string to be used by KMAC128 or KMAC256]'
+ 'digest\:[digest]'
+ 'cipher\:[cipher]'
+ )
-_list_message_digest_algorithms() {
- # openssl list-message-digest-algorithms
- local algorithms
- algorithms=(${${(@f)"$(_call_program message_digest_algorithms openssl list-message-digest-algorithms)"}%% *})
- _values 'message digest algorithms' ${algorithms}
+ _values 'options' ${options}
}
+_openssl_name_display_options() {
+ local -a options=(
+ 'compat:display the name using an old format from previous OpenSSL versions'
+ 'RFC2253:display the name using the format defined in RFC 2253'
+ 'oneline:display the name in one line more readable RFC 2253'
+ 'multiline:display the name using multiple lines'
+ 'esc_2253:escape the "special" characters in a field, as required by RFC 2253'
+ 'esc_2254:escape the "special" characters in a field as required by RFC 2254 in a field'
+ 'esc_ctrl:escape non-printable ASCII characters'
+ 'esc_msb:escape any characters with the most significant bit set'
+ 'use_quote:escapes some characters by surrounding the entire string with quotation marks'
+ 'utf8:convert all strings to UTF-8 format first as required by RFC 2253'
+ 'ignore_type:not attempt to interpret multibyte characters in any way'
+ 'show_type:display the type of the ASN1 character string before the value'
+ 'dump_der:output in hex format are displayed using the DER encoding of the field'
+ 'dump_nostr:dump non-character strings, such as ASN.1 OCTET STRING'
+ 'dump_all:dump all fields'
+ 'dump_unknown:dump any field whose OID is not recognised by OpenSSL'
+ 'sep_comma_plus:set comma as a separator'
+ 'sep_comma_plus_space:set comma as a separator and put space after the separator'
+ 'sep_semi_plus_space:set semi-colon as a separator and put space after the separator'
+ 'sep_multiline:start each field on its own line'
+ 'dn_rev:reverse the fields of the DN as required by RFC 2253'
+ 'nofname:does not display the field at all'
+ 'sname:use short name form'
+ 'lname:use long name form'
+ 'oid:represent the OID in numerical form'
+ 'align:align field values'
+ 'space_eq:place spaces round the equal sign'
+ )
-_nameopts() {
- _values -s ',' -w 'nameopts' \
- '(-compat compat)'{-compat,compat}'[use the old format. This is equivalent to specifying no name options at all]' \
- '(-RFC2253 RFC2253)'{-RFC2253,RFC2253}'[displays names compatible with RFC2253 equivalent to esc_2253, esc_ctrl, esc_msb, utf8, dump_nostr, dump_unknown, dump_der, sep_comma_plus, dn_rev and sname]' \
- '(-oneline oneline)'{-oneline,oneline}'[a oneline format which is more readable than RFC2253. Equivalent to esc_2253, esc_ctrl, esc_msb, utf8, dump_nostr, dump_der, use_quote, sep_comma_plus_space, space_eq and sname options]' \
- '(-multiline multiline)'{-multiline,multiline}'[a multiline format. Equivalent to esc_ctrl, esc_msb, sep_multiline, space_eq, lname and align]' \
- '(-esc_2253 esc_2253)'{-esc_2253,esc_2253}'[escape the "special" characters required by RFC2253 in a field]' \
- '(-esc_ctrl esc_ctrl)'{-esc_ctrl,esc_ctrl}'[escape control characters]' \
- '(-esc_msb esc_msb)'{-esc_msb,esc_msb}'[escape characters with the MSB set]' \
- '(-use_quote use_quote)'{-use_quote,use_quote}'[escapes some characters by surrounding the whole string with " characters]' \
- '(-utf8 utf8)'{-utf8,utf8}'[convert all strings to UTF8 format first]' \
- '(-ignore_type ignore_type)'{-ignore_type,ignore_type}'[this option does not attempt to interpret multibyte characters in any way]' \
- '(-show_type show_type)'{-show_type,show_type}'[show the type of the ASN1 character string]' \
- '(-dump_der dump_der)'{-dump_der,dump_der}'[use DER encoding when hexdumping fields]' \
- '(-dump_nostr dump_nostr)'{-dump_nostr,dump_nostr}'[dump non character string types]' \
- '(-dump_all dump_all)'{-dump_all,dump_all}'[dump all fields]' \
- '(-dump_unknown dump_unknown)'{-dump_unknown,dump_unknown}'[dump any field whose OID is not recognised by OpenSSL]' \
- '(-sep_comma_plus sep_comma_plus)'{-sep_comma_plus,sep_comma_plus}'[these options determine the field separators]' \
- '(-sep_comma_plus_space sep_comma_plus_space)'{-sep_comma_plus_space,sep_comma_plus_space}'[these options determine the field separators]' \
- '(-sep_semi_plus_space sep_semi_plus_space)'{-sep_semi_plus_space,sep_semi_plus_space}'[these options determine the field separators]' \
- '(-sep_multiline sep_multiline)'{-sep_multiline,sep_multiline}'[these options determine the field separators]' \
- '(-dn_rev dn_rev)'{-dn_rev,dn_rev}'[reverse the fields of the DN]' \
- '(-nofname nofname)'{-nofname,nofname}'[do not display field names]' \
- '(-sname sname)'{-sname,sname}'[display field names in short form]' \
- '(-lname lname)'{-lname,lname}'[display field names in long form]' \
- '(-oid oid)'{-oid,oid}'[display field names in numerical form]' \
- '(-align align)'{-align,align}'[align field values for a more readable output. Only usable with sep_multiline]' \
- '(-space_eq space_eq)'{-space_eq,space_eq}'[places spaces around the = character which follows the field name]'
+ _values 'options' ${options}
}
+_openssl_pass_phrase_options() {
+ local -a options=(
+ 'pass[actual password]:password'
+ 'env[obtain password from the environment variable]:var:_parameters -g "*export*"'
+ 'file[read the password from the file]:file:_files'
+ 'fd[read the password from the file descriptor number]:number'
+ 'stdin[read the password from standard input]'
+ )
-_certopts() {
- _values -s ',' -w 'certopts' \
- 'compatible[use the old format. This is equivalent to specifying no output options at all]' \
- "no_header[don't print header information: that is the lines saying \"Certificate\" and \"Data\"]" \
- "no_version[don't print out the version number]" \
- "no_serial[don't print out the serial number]" \
- "no_signame[don't print out the signature algorithm used]" \
- "no_validity[don't print the validity, that is the notBefore and notAfter fields]" \
- "no_subject[don't print out the subject name]" \
- "no_issuer[don't print out the issuer name]" \
- "no_pubkey[don't print out the public key]" \
- "no_sigdump[don't give a hexadecimal dump of the certificate signature]" \
- "no_aux[don't print out certificate trust information]" \
- "no_extensions[don't print out any X509V3 extensions]" \
- 'ext_default[retain default extension behaviour: attempt to print out unsupported certificate extensions]' \
- 'ext_error[print an error message for unsupported certificate extensions]' \
- 'ext_parse[ASN1 parse unsupported extensions]' \
- 'ext_dump[hex dump unsupported extensions]' \
- '(no_issuer no_pubkey no_header no_version no_sigdump no_signame)ca_default[the value used by the ca utility, equivalent to no_issuer, no_pubkey, no_header, no_version, no_sigdump and no_signame]'
+ _values -S : 'options' ${options}
}
+_openssl_signature_algorithms() {
+ local -a algorithms=(
+ RSA DSA ECDSA
+ SHA1 SHA224 SHA224 SHA384 SHA512
+ ecdsa_secp256r1_sha256 ed25519 rsa_pss_pss_sha256
+ )
+
+ _values -s ':' algorithms $algorithms
+}
+
+_openssl_text_printing_options() {
+ local -a options=(
+ 'compatible[use the old format]'
+ 'no_header[do not print header information]'
+ 'no_version[do not print out the version number]'
+ 'no_serial[do not print the serial number]'
+ 'no_signame[do not print out the signature algorithm used]'
+ 'no_validity[do not print the validity]'
+ 'no_subject[do not print out the subject name]'
+ 'no_issuer[do not print out the issuer name]'
+ 'no_pubkey[do not print out the public key]'
+ 'no_sigdump[do not give a hexadecimal dump of the certificate signature]'
+ 'no_aux[do not print out certificate trust information]'
+ 'no_extensions[do not print out any X509V3 extensions]'
+ 'ext_default[retain default extension behavior]'
+ 'ext_error[print an error message for unsupported certificate extensions]'
+ 'ext_parse[ASN1 parse unsupported extensions]'
+ 'ext_dump[Hex dump unsupported extensions]'
+ 'ca_default[equivalent to no_issuer, no_pubkey, no_header and no_version]'
+ )
+
+ _values -s , options $options
+}
+
+_openssl_tls_protocols() {
+ local -a protocols=(SSLv3 TLSv1 TLSv1.1 TLSv1.2 TLSv1.3 DTLSv1 DTLSv1.2 None)
+ _values protocols $protocols
+}
_openssl "$@"
+# 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
diff --git a/src/_pgsql_utils b/src/_pgsql_utils
deleted file mode 100644
index b6e8b59..0000000
--- a/src/_pgsql_utils
+++ /dev/null
@@ -1,590 +0,0 @@
-#compdef psql pg_dump pg_dumpall pg_restore createdb dropdb vacuumdb createuser dropuser initdb
-# ------------------------------------------------------------------------------
-# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users, Dominic Mitchell, Johann 'Myrkraverk' Oskarsson, Daniel Serodio, J Smith
-# 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 PostgreSQL utils (https://www.postgresql.org/).
-#
-# Source: https://www.zsh.org/mla/users/2004/msg01006.html
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Dominic Mitchell <dom+zsh@happygiraffe.net>
-#
-# * Johann 'Myrkraverk' Oskarsson <johann@2ndquadrant.com>
-#
-# * Daniel Serodio <dserodio@gmail.com> pg_dumpall completion
-#
-# * J Smith <dark.panda@gmail.com> various completion additions
-#
-# ------------------------------------------------------------------------------
-
-
-_pgsql_get_identity () {
- _pgsql_user=${(v)opt_args[(i)-U|--username]}
- _pgsql_port=${(v)opt_args[(i)-p|--port]}
- _pgsql_host=${(v)opt_args[(i)-h|--host]}
-
- _pgsql_params=(
- ${_pgsql_user:+"--username=$_pgsql_user"}
- ${_pgsql_port:+"--port=$_pgsql_port"}
- ${_pgsql_host:+"--host=$_pgsql_host"}
- )
-}
-
-# Postgres Allows specifying the path to the directory containing the
-# socket as well as a hostname.
-_pgsql_host_or_dir() {
- _alternative \
- 'hosts:host:_hosts' \
- 'directories:directory:_directories'
-}
-
-# This creates a port completion list based on socket files on the
-# local computer. Be default, Postgres puts them in /tmp/ but Debian
-# changed that to /var/run/postgresql/ in their packages.
-_pgsql_ports() {
- compadd "$@" - /tmp/.s.PGSQL.<->(N:e) /var/run/postgresql/.s.PGSQL.<->(N:e)
-}
-
-_pgsql_users () {
- local _pgsql_user _pgsql_port _pgsql_host _pgsql_params
- local _pgsql_user_sql
- _pgsql_get_identity
-
- # We use _pgsql_port and _pgsql_host directly here instead of
- # _pgsql_params so as to not pick up a partially completed
- # username.
- _pgsql_params=(
- ${_pgsql_port:+"--port=$_pgsql_port"}
- ${_pgsql_host:+"--host=$_pgsql_host"}
- )
-
- _pgsql_user_sql='select r.rolname from pg_catalog.pg_roles r where r.rolcanlogin = true'
-
- compadd "$@" - $( psql $_pgsql_params[@] -XAqt -c $_pgsql_user_sql template1 2>/dev/null )
-
-}
-
-_pgsql_tables () {
- local _pgsql_user _pgsql_port _pgsql_host _pgsql_params
- _pgsql_get_identity
-
- # Need to pull out the database name from the existing arguments.
- # This is going to vary between commands. Thankfully, it's only
- # used by pg_dump, which always has the dbname in arg1. If it's
- # not present it defaults to ${PGDATABASE:-$LOGNAME}, which
- # matches (I think) the PostgreSQL behaviour.
-
- local db
- db=${line[1]:-${PGDATABASE:-$LOGNAME}}
-
- ## Instead of parsing the output of the psql \ commands, we look
- ## up the tables ourselves. The following query has been tested
- ## with Postgres 8.2 - 9.2.
-
- local _pgsql_table_sql
- _pgsql_table_sql="select n.nspname || '.' || c.relname \
- from pg_catalog.pg_class c \
- left join pg_catalog.pg_namespace n on n.oid = c.relnamespace \
- where c.relkind in ('r', '') \
- and n.nspname <> 'pg_catalog' \
- and n.nspname <> 'information_schema' \
- and n.nspname !~ '^pg_toast' \
- and pg_catalog.pg_table_is_visible( c.oid ) \
- order by 1"
-
- compadd "$@" - \
- $( psql $_pgsql_params[@] -AXqt -c $_pgsql_table_sql $db 2>/dev/null )
-}
-
-_pgsql_schemas () {
- local _pgsql_user _pgsql_port _pgsql_host _pgsql_params
- _pgsql_get_identity
-
- local db
- db=${line[1]:-${PGDATABASE:-$LOGNAME}}
-
- local _pgsql_schema_sql="select n.nspname \
- from pg_catalog.pg_namespace n \
- where n.nspname !~ '^pg_' \
- and n.nspname <> 'information_schema' \
- order by 1;"
-
- compadd "$@" - \
- $( psql $_pgsql_params[@] -AXqt -c $_pgsql_schema_sql $db 2>/dev/null )
-}
-
-_pgsql_databases () {
- local _pgsql_user _pgsql_port _pgsql_host _pgsql_params
- _pgsql_get_identity
-
- local _pgsql_services _pgsql_service_files
- _pgsql_service_files=(~/.pg_service.conf)
- (( $+commands[pg_config] )) && _pgsql_service_files+=$(pg_config --sysconfdir)/pg_service.conf
-
- _pgsql_services=$( grep -h '^\[.*\]' $_pgsql_service_files 2>/dev/null \
- | sed -e 's/^\[/service=/' -e 's/\].*$//' )
-
- local _pgsql_db_sql
- _pgsql_db_sql="select d.datname from pg_catalog.pg_database d \
- where d.datname <> 'template0'"
-
- compadd "$@" - \
- ${(f)_pgsql_services} \
- $( psql $_pgsql_params[@] -AXtq -c $_pgsql_db_sql template1 2>/dev/null )
-}
-
-_pgsql_encodings () {
- local _pgsql_user
- _pgsql_get_identity
-
- local _pgsql_db_sql
- _pgsql_db_sql="select pg_encoding_to_char(i) from generate_series(0,100) i;"
-
- compadd "$@" - $( psql $_pgsql_params[@] -AXtq -c $_pgsql_db_sql template1 )
-}
-
-
-##
-## The actual completion code for the commands
-##
-
-_psql () {
- local curcontext="$curcontext" state line expl
- typeset -A opt_args
-
- _arguments -C -s "-*" \
- "$_pgsql_common_opts[@]" \
- {-c+,--command=}':execute SQL command:' \
- {-d+,--dbname=}':database to connect to:_pgsql_databases' \
- {-f+,--file=}':SQL file to read:_files' \
- {-l,--list}'[list databases]' \
- {-v+,--set=,--variable=}':set SQL variable:' \
- {-V,--version}'[output version information, then exit]' \
- {-X,--no-psqlrc}'[don'\''t read ~/.psqlrc]' \
- {-1,--single-transaction}'[restore as a single transaction]' \
- {-\?,--help=}':display help:' \
- \
- {-a,--echo-all}'[print commands read]' \
- {-b,--echo-errors}'[echo failed commands]' \
- {-e,--echo-queries}'[display queries submitted]' \
- {-E,--echo-hidden}'[display hidden queries]' \
- {-L,--log-file=}'[send session log to file]' \
- {-n,--no-readline}'[disable enhanced command line editing (readline)]' \
- {-o+,--output=}':query output:_files' \
- {-q,--quiet}'[non verbose mode]' \
- {-s,--single-step}'[prompt before each query]' \
- {-S,--single-line}'[newline sends query]' \
- \
- {-A,--no-align}'[unaligned output mode]' \
- --csv'[CSV (Comma-Separated Values) table output mode]' \
- {-F+,--field-separator=}':field separator char:' \
- {-H,--html}'[HTML output]' \
- {-P+,--pset=}':set psql variable:' \
- {-R+,--record-separator=}':record separator char:' \
- {-t,--tuples-only}'[don'\''t display header/footer]' \
- {-T+,--table-attr=}':HTML table options:' \
- {-x,--expanded}'[one column per line]' \
- {-z,--field-separator-zero}'[set field separator for unaligned output to zero byte]' \
- {-0,--record-separator-zero}'[set record separator for unaligned output to zero byte]' \
- -u'[prompt for username/password]' \
- ':PostgreSQL database:_pgsql_databases' \
- ':PostgreSQL user:_pgsql_users'
-}
-
-_pg_dump () {
- local curcontext="$curcontext" state line expl
- typeset -A opt_args
-
- _arguments -C -s \
- "$_pgsql_common_opts[@]" \
- {-f+,--file=}':output file:_files' \
- {-F+,--format=}':output format:_values "format" "p[plain text]" "t[tar]" "c[custom]"' \
- {-j,--jobs=}'[use this many parallel jobs to dump]' \
- {-v,--verbose}'[verbose mode]' \
- {-V,--version}'[output version information, then exit]' \
- {-Z+,--compress=}':compression level:_values "level" 9 8 7 6 5 4 3 2 1 0' \
- --lock-wait-timeout='[fail after waiting TIMEOUT for a table lock]' \
- --no-sync'[do not wait for changes to be written safely to disk]' \
- {-\?,--help}'[display help]' \
- \
- {-a,--data-only}'[dump only data]' \
- {-b,--blobs}'[dump blobs as well]' \
- {-B,--no-blobs}'[exclude large objects in dump]' \
- {-c,--clean}'[include clean cmds in dump]' \
- {-C,--create}'[include createdb cmds in dump]' \
- {-e+,--extension=}'[dump the specified extension(s) only]' \
- {-E+,--encoding=}':database encoding:_pgsql_encodings' \
- {-n+,--schema=}':schema to dump:_pgsql_schemas' \
- {-N+,--exclude-schema=}':schema to NOT dump:_pgsql_schemas' \
- {-O,--no-owner}'[don'\''t recreate as same owner]' \
- {-s,--schema-only}'[no data, only schema]' \
- {-S+,--superuser=}':superuser name:_pgsql_users' \
- {-t+,--table=}':table to dump:_pgsql_tables' \
- {-T+,--exclude-table=}':table to NOT dump:_pgsql_tables' \
- {-x,--no-{acl,privileges}}'[don'\''t dump ACLs]' \
- --binary-upgrade'[for use by upgrade utilities only]' \
- {-D,--{attribute,column}-inserts}'[use INSERT (cols) not COPY]' \
- --disable-dollar-quoting'[disable dollar quoting, use SQL standard quoting]' \
- --disable-triggers'[disable triggers during data-only restore]' \
- --enable-row-security'[enable row security (dump only content user has access to)]' \
- --exclude-table-data='[do NOT dump data for the named table(s)]' \
- --if-exists'[use IF EXISTS when dropping objects]' \
- --include-foreign-data='[include data of foreign servers]' \
- --inserts'[dump data as INSERT commands, rather than COPY]' \
- --load-via-partition-root'[load partitions via the root table]' \
- --no-comments'[do not dump comments]' \
- --no-publications'[do not dump publications]' \
- --no-security-labels'[do not dump security label assignments]' \
- --no-subscriptions'[do not dump subscriptions]' \
- --no-synchronized-snapshots'[do not use synchronized snapshots in parallel jobs]' \
- --no-tablespaces'[do not dump tablespace assignments]' \
- --no-toast-compression'[do not dump TOAST compression methods]' \
- --no-unlogged-table-data'[do not dump unlogged table data]' \
- --on-conflict-do-nothing'[add ON CONFLICT DO NOTHING to INSERT commands]' \
- --quote-all-identifiers'[quote all identifiers, even if not key words]' \
- --rows-per-insert=['number of rows per INSERT'] \
- --section=':dump named section:_values "section" pre-data data post-data' \
- --serializable-deferrable'[wait until the dump can run without anomalies]' \
- --snapshot='[use given snapshot for the dump]' \
- --strict-names'[require table and/or schema include patterns to match at least one entity each]' \
- --use-set-session-authorization'[use SET SESSION AUTHORIZATION commands instead of ALTER OWNER]' \
- \
- {-i,--ignore-version}'[ignore version mismatch]' \
- {-o,--oids}'[dump objects identifiers for every table]' \
- {-R,--no-reconnect}'[don'\''t output connect]' \
- -X+':option:_values "option" use-set-session-authorization disable-triggers' \
- ':PostgreSQL database:_pgsql_databases'
-}
-
-_pg_restore () {
- local curcontext="$curcontext" state line expl
- typeset -A opt_args
-
- _arguments -C -s \
- "$_pgsql_common_opts[@]" \
- {-d+,--dbname=}':database to connect to:_pgsql_databases' \
- {-f+,--file=}':output file:_files' \
- {-F+,--format=}':output format:_values "format" "p[plain text]" "t[tar]" "c[custom]"' \
- {-l,--list}'[list databases]' \
- {-v,--verbose}'[verbose mode]' \
- {-V,--version}'[output version information, then exit]' \
- {-\?,--help}'[display help]' \
- \
- {-a,--data-only}'[dump only data]' \
- {-c,--clean}'[include clean (drop) cmds before recreating]' \
- {-C,--create}'[include createdb cmds in dump]' \
- {-e,--exit-on-error}'[exit on error, default is to continue]' \
- {-I,--index=}':index name:' \
- {-j,--jobs=}':use this many parallel jobs to restore:' \
- {-L,--use-list=}':use table of contents from this file for selecting/ordering output:' \
- {-n,--schema=}':restore only objects in this schema:' \
- {-O,--no-owner}'[skip restoration of object ownership]' \
- {-P,--function=}':restore named function:' \
- {-s,--schema-only}'[restore only the schema, no data]' \
- {-S,--superuser=}':superuser user name to use for disabling triggers:' \
- {-t,--table=}':restore named table:' \
- {-T,--trigger=}':restore named trigger:' \
- {-x,--no-privileges}'[skip restoration of access privileges (grant/revoke)]' \
- {-1,--single-transaction}'[restore as a single transaction]' \
- --disable-triggers'[disable triggers during data-only restore]' \
- --enable-row-security'[enable row security]' \
- --if-exists'[use IF EXISTS when dropping objects]' \
- --no-comments'[do not restore comments]' \
- --no-data-for-failed-tables'[do not restore data of tables that could not be created]' \
- --no-publications'[do not restore publications]' \
- --no-security-labels'[do not restore security labels]' \
- --no-subscriptions'[do not restore subscriptions]' \
- --no-tablespaces'[do not restore tablespace assignments]' \
- --section=':dump named section:_values "section" pre-data data post-data' \
- --strict-names'[require table and/or schema include patterns to match at least one entity each]' \
- --use-set-session-authorization'[use SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to set ownership]' \
- \
- {-b,--blobs}'[include large objects in dump]' \
- {-B,--no-blobs}'[exclude large objects in dump]' \
- \
- "1: :_files"
-}
-
-_pg_dumpall () {
- local curcontext="$curcontext" state line expl
- typeset -A opt_args
-
- _arguments -C -s \
- "$_pgsql_common_opts[@]" \
- {-f+,--file=}':output file:_files' \
- {-v,--verbose}'[verbose mode]' \
- {-V,--version}'[output version information, then exit]' \
- --lock-wait-timeout='[fail after waiting TIMEOUT for a table lock]' \
- {-\?,--help}'[display help]' \
- \
- {-a,--data-only}'[dump only data]' \
- {-c,--clean}'[include clean (drop) cmds before recreating]' \
- {-E,--encoding=}'[dump the data in encoding]' \
- {-g,--globals-only}'[dump only global objects, no databases]' \
- {-O,--no-owner}'[don'\''t recreate as same owner]' \
- {-r,--roles-only}'[no databases or tablespaces, only roles]' \
- {-s,--schema-only}'[no data, only schema]' \
- {-S+,--superuser=}':superuser name:_pgsql_users' \
- {-t,--tablespaces-only}'[no databases or roles, only tablespaces]' \
- {-x,--no-privileges}'[don'\''t dump ACLs]' \
- --binary-upgrade'[for use by upgrade utilities only]' \
- --column-inserts'[use INSERT with column names not COPY]' \
- --disable-dollar-quoting'[disable dollar quoting, use SQL standard quoting]' \
- --disable-triggers'[disable triggers during data-only restore]' \
- --exclude-database=':exclude databases:_pgsql_databases' \
- --extra-float-digits='[override default setting for extra_float_digits]' \
- --if-exists'[use IF EXISTS when dropping objects]' \
- --inserts'[use INSERT not COPY]' \
- --load-via-partition-root'[pload partitions via the root table]' \
- --no-comments'[do not dump comments]' \
- --no-publications'[do not dump publications]' \
- --no-role-passwords'[do not dump passwords for roles]' \
- --no-security-labels'[do not dump security label assignments]' \
- --no-subscriptions'[do not dump subscriptions]' \
- --no-sync'[do not wait for changes to be written safely to disk]' \
- --no-tablespaces'[do not dump tablespace assignments]' \
- --no-toast-compression'[do not dump TOAST compression methods]' \
- --no-unlogged-table-data'[do not dump unlogged table data]' \
- --on-conflict-do-nothing'[add ON CONFLICT DO NOTHING to INSERT commands]' \
- --quote-all-identifiers'[quote all identifiers, even if not key words]' \
- --rows-per-insert='[number of rows per INSERT]' \
- --use-set-session-authorization'[use SET SESSION AUTHORIZATION cmds instead of ALTER OWNER]' \
- {-o,--oids}'[dump objects identifiers for every table]' \
-}
-
-_createdb () {
- local curcontext="$curcontext" state line expl
- typeset -A opt_args
-
- _arguments -C -s \
- "$_pgsql_common_opts[@]" \
- {-D+,--tablespace=}'[default tablespace for the database]' \
- {-e,--echo}'[display SQL queries]' \
- {-E+,--encoding=}':database encoding:_pgsql_encodings' \
- {-l+,--locale=}'[locale settings for the database]' \
- --lc-collate='[LC_COLLATE setting for the database]' \
- --lc-ctype='[LC_CTYPE setting for the database]' \
- {-O+,--owner=}':database user to own the new database:_pgsql_users' \
- {-T+,--template=}':database template:_pgsql_databases' \
- '--version[output version information, then exit]' \
- {-\?,--help}'[display help]' \
- \
- --maintenance-db=':alternate maintenance database:_pgsql_databases' \
- {-q,--quiet}'[non verbose mode]' \
- --location=':database location (unsupported since PostgreSQL 8.0):_directories' \
- ':PostgreSQL database:' \
- ':comment:'
-}
-
-_dropdb () {
- local curcontext="$curcontext" state line expl
- typeset -A opt_args
-
- _arguments -C -s \
- "$_pgsql_common_opts[@]" \
- {-e,--echo}'[display SQL queries]' \
- {-f,--force}'[try to terminate other connections before dropping]' \
- {-i,--interactive}'[confirm before drop]' \
- {-V,--version}'[output version information, then exit]' \
- --if-exists'[don'\''t report error if database does'\''t exist]' \
- --maintenance-db=':alternate maintenance database:_pgsql_databases' \
- {-q,--quiet}'[non verbose mode]' \
- ':PostgreSQL database:_pgsql_databases'
-}
-
-_vacuumdb () {
- local curcontext="$curcontext" state line expl
- typeset -A opt_args
-
- _arguments -C -s \
- "$_pgsql_common_opts[@]" \
- {-a,--all}'[vacuum all databases]' \
- {-d+,--dbname=}':database to connect to:_pgsql_databases' \
- --disable-page-skipping'[disable all page-skipping behavior]' \
- {-e,--echo}'[show the commands being sent to the server]' \
- {-f,--full}'[do full vacuuming]' \
- {-F,--freeze}'[freeze row transaction information]' \
- --force-index-cleanup'[always remove index entries that point to dead tuples]' \
- {-j,--jobs=}'[use this many concurrent connections to vacuum]' \
- '--min-mxid-age=[minimum multixact ID age of tables to vacuum]' \
- '--min-xid-age=[minimum transaction ID age of tables to vacuum]' \
- --no-index-cleanup'[don'\''t remove index entries that point to dead tuples]' \
- --no-process-toast'[skip the TOAST table associated with the table to vacuum]' \
- --no-truncate'[don'\''t truncate empty pages at the end of the table]' \
- {-P+,--parallel=}'[use this many background workers for vacuum, if available]' \
- {-q,--quiet}'[do not write any messages]' \
- '--skip-locked[skip relations that cannot be immediately locked]' \
- {-t+,--table=}':table to dump:_pgsql_tables' \
- {-v,--verbose}'[write a lot of output]' \
- {-V,--version}'[output version information, then exit]' \
- {-z,--analyze}'[update optimizer hints]' \
- {-Z,--analyze-only}'[only update optimizer statistics; no vacuum]' \
- --analyze-in-stages'[only update optimizer statistics, in multiple stages for faster results; no vacuum]' \
- {-\?,--help}'[display help]' \
- --maintenance-db='[alternate maintenance database]' \
- '1:PostgreSQL database:_pgsql_databases'
-}
-
-_createuser () {
- local curcontext="$curcontext" state line expl
- typeset -A opt_args
-
- _arguments -C -s \
- "$_pgsql_common_opts[@]" \
- {-c,--connection-limit=}'[connection limit for role (default: no limit)]' \
- {-d,--createdb}'[role can create new databases]' \
- {-D,--no-createdb}'[role cannot create databases]' \
- {-e,--echo}'[display SQL queries]' \
- {-g,--role=}'[new role will be a member of this role]' \
- {-i,--inherit}'[role inherits privileges of roles it is a member of (default)]' \
- {-I,--no-inherit}'[role does not inherit privileges]' \
- {-l,--login}'[role can login (default)]' \
- {-L,--no-login}'[role cannot login]' \
- {-P,--pwprompt}'[assign a password to new role]' \
- {-r,--createrole}'[role can create new roles]' \
- {-R,--no-createrole}'[role cannot create roles]' \
- {-s,--superuser}'[role will be superuser]' \
- {-S,--no-superuser}'[role will not be superuser]' \
- --interactive'[prompt for missing role name and attributes rather than using defaults]' \
- --replication'[role can initiate replication]' \
- --no-replication'[role cannot initiate replication]' \
- {-E,--encrypted}'[encrypt stored password]' \
- {-N,--unencrypted}'[do not encrypt stored password]' \
- {-\?,--help}'[display help]'
-}
-
-_dropuser () {
- local curcontext="$curcontext" state line expl
- typeset -A opt_args
-
- _arguments -C -s \
- "$_pgsql_common_opts[@]" \
- {-e,--echo}'[display SQL queries]' \
- {-q,--quiet}'[non verbose mode]' \
- {-i,--interactive}'[prompt before deleting anything, and prompt for role name if not specified]' \
- {-V,--version}'[output version information, then exit]' \
- --if-exists'[don'\''t report error if user doesn'\''t exist]' \
- ':PostgreSQL user:_pgsql_users'
-}
-
-_initdb () {
- local curcontext="$curcontext" state line expl
- typeset -A opt_args
-
- _arguments -C -s \
- {--auth=,-A+}':default authentication method for local connections:_values "auth methods" $_pgsql_auth_methods[@]' \
- --auth-host=':default authentication method for local TCP/IP connections:_values "auth methods" $_pgsql_auth_methods[@]' \
- --auth-local=':default authentication method for local-socket connections:_values "auth methods" $_pgsql_auth_methods[@]' \
- {-D+,--pgdata=}':location for this database cluster:_files' \
- {-E+,--encoding=}':set default encoding for new databases:_pgsql_encodings' \
- {-g,--allow-group-access}'[allow group readexecute on data directory]' \
- {-k,--data-checksums}':use data page checksums:' \
- --locale=':set default locale for new databases:' \
- --lc-collate=':set the default locale for collate:' \
- --lc-ctype=':set the default locale for ctype:' \
- --lc-messages=':set the default locale for messages:' \
- --lc-monetary=':set the default locale for monetary:' \
- --lc-numeric=':set the default locale for numeric:' \
- --lc-time=':set the default local for time:' \
- --no-locale'[equivalent to --locale=C]' \
- --pwfile=':read password for the new superuser from file:_files' \
- {-T+,--text-search-config=}'[default text search configuration]' \
- {-U+,--username=NAME}':database superuser name:' \
- {-W,--pwprompt}'[prompt for a password for the new superuser]' \
- {-X+,--waldir=}':location for the write-ahead log directory:_files' \
- --xlogdir=':location for the transaction log directory (unsupported since PostgreSQL 10):_files' \
- --wal-segsize='[size of WAL segments, in megabytes]' \
- {-d,--debug}'[generate lots of debugging output]' \
- --discard-caches'[set debug_discard_caches=1]' \
- -L+':where to find the input files:_files' \
- {-n,--no-clean}'[do not clean up after errors]' \
- {-N,--no-sync}':do not wait for changes to be written safely to disk:' \
- --instructions'[do not print instructions for next steps]' \
- {-s,--show}'[show internal settings]' \
- {-S,--sync-only}'[only sync data directory]' \
- {-V,--version}'[output version information, then exit]' \
- {-\?,--help}'[display help]' \
- ':location for this database cluster:_files'
-}
-
-_pgsql_utils () {
- local _pgsql_common_opts _pgsql_auth_methods
-
- _pgsql_common_opts=(
- {-\?,--help}'[display help]'
- {-h+,--host=}':database host:_pgsql_host_or_dir'
- {-p+,--port=}':database port number:_pgsql_ports'
- {-U+,--username=}':connect as user:_pgsql_users'
- {-W,--password}'[prompt for password]'
- {-w,--no-password}'[never prompt for password]'
- --role='[do SET ROLE before restore]'
- )
-
- _pgsql_auth_methods=(
- trust
- reject
- md5
- password
- gss
- sspi
- krb5
- ident
- peer
- ldap
- radius
- cert
- pam
- )
-
- case "$service" in
- psql) _psql "$@" ;;
- pg_dump) _pg_dump "$@" ;;
- pg_dumpall) _pg_dumpall "$@" ;;
- pg_restore) _pg_restore "$@" ;;
- createdb) _createdb "$@" ;;
- dropdb) _dropdb "$@" ;;
- vacuumdb) _vacuumdb "$@" ;;
- createuser) _createuser "$@" ;;
- dropuser) _dropuser "$@" ;;
- initdb) _initdb "$@" ;;
- esac
-}
-
-_pgsql_utils "$@"
-
-# 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
diff --git a/src/_phing b/src/_phing
index eab4f98..83ce274 100644
--- a/src/_phing
+++ b/src/_phing
@@ -23,7 +23,7 @@
# Description
# -----------
#
-# Completion script for Phing (https://www.phing.info/).
+# Completion script for Phing 3.1.0 (https://www.phing.info/).
#
# ------------------------------------------------------------------------------
# Authors
@@ -39,36 +39,53 @@ _phing() {
typeset -A opt_args
# Follow https://www.phing.info/guide/chunkhtml/sec.commandlineargs.html for more information
- _arguments \
+ _arguments -C \
'(-h -help)'{-h,-help}'[display the help screen]' \
'(-v -version)'{-v,-version}'[print version information and exit]' \
- '(-l -list)'{-l,-list}'[list all available targets in buildfile (excluding targets that have their hidden attribute set to true)]' \
+ '(-l -list)'{-l,-list}'[list all available targets in buildfile]' \
+ '(-i -init)'{-i,-init}'[generates an initial buildfile]:file:_files' \
'(-q -quiet)'{-q,-quiet}'[quiet operation, no output at all]' \
+ '(-S -silent)'{-S,-silent}'[print nothing but task outputs and build failures]' \
'-verbose[verbose, give some more output]' \
'-debug[output debug information]' \
- '-logfile [use given file for log]:file:_files' \
- '-D[set the property to the specified value to be used in the buildfile]' \
- '-find []:file:_files' \
- '-buildfile [specify an alternate buildfile name. Default is build.xml]:file:_files' \
- '-logger [specify an alternate logger. Default is phing.listener.DefaultLogger. Other options include phing.listener.NoBannerLogger, phing.listener.AnsiColorLogger, phing.listener.XmlLogger, phing.listener.TargetLogger and phing.listener.HtmlColorLogger]' \
- '-propertyfile [load properties from the specified file]:file:_files' \
- '(-v --version)'{-v,--version}'[show version]' \
+ '(-e -emacs)'{-e,-emacs}'[produce logging information without adornments]' \
+ '-diagnostics[print diagnostics information]' \
+ '(-strict -no-strict)-strict[run build in strict mode]' \
+ '(-strict -no-strict)-no-strict[run build normally]' \
+ '-longtargets[show target descriptions during build]' \
+ '-logfile[use given file for log]:file:_files' \
+ '-logger[the class which is to perform logging]:class' \
+ '*-listener[add an instance of class as a project listener]:class' \
+ '(-f -buildfile)'{-f,-buildfile}'[build file]:file:_files' \
+ '*-D[set the property to the specified value to be used in the buildfile]' \
+ '(-k -keep-going)'{-k,-keep-going}'[execute all targets that do not depend on failed target(s)]' \
+ '-propertyfile[load all properties from the specified file]:file:_files' \
+ '-propertyfileoverride[values in property file override existing values]' \
+ '-find[search for buildfile towards the root of the filesystem and use it]:file:_files' \
+ '-inputhandler[the class to use to handle user input]:class' \
+ '(- *)'{-v,-version}'[show version]' \
'1: :->targets' \
'*:: :->args' \
&& ret=0
case $state in
- targets)
- local buildfile; buildfile=build.xml
+ (targets)
+ local buildfile=build.xml
+ if (( $+opt_args[-buildfile] )); then
+ buildfile=${opt_args[-buildfile]}
+ elif (($+opt_args[-f] )); then
+ buildfile=${opt_args[-f]}
+ fi
+
if [[ ! -f $buildfile ]]
then
ret=0
else
- local targets; targets=($(sed -nE "/<target /s/.*name=[\"'](\w+)[\"'].*/\1/p" $buildfile))
+ local -a targets=($(sed -nE "/<target /s/.*name=[\"'](\w+)[\"'].*/\1/p" $buildfile))
_describe -t 'targets' 'target' targets && ret=0
fi
;;
- args)
+ (args)
if [[ CURRENT -eq NORMARG && ${+opt_args[--match]} -eq 0 ]]
then
# If the current argument is the first non-option argument
diff --git a/src/_play b/src/_play
deleted file mode 100644
index 6b35899..0000000
--- a/src/_play
+++ /dev/null
@@ -1,190 +0,0 @@
-#compdef play
-# ------------------------------------------------------------------------------
-# Description
-# -----------
-#
-# Completion script for Play! framework 1.2.2 (https://www.playframework.com/).
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
-# * Mario Fernandez (https://github.com/sirech)
-#
-# ------------------------------------------------------------------------------
-
-
-_play() {
- local context curcontext="$curcontext" state line
- typeset -A opt_args
-
- local ret=1
-
- _arguments -C \
- '1: :_play_cmds' \
- '*::arg:->args' \
- && ret=0
-
- case $state in
- (args)
- curcontext="${curcontext%:*:*}:play-cmd-$words[1]:"
- case $line[1] in
- (build-module|list-modules|lm|check|id)
- _message 'no more arguments' && ret=0
- ;;
- (dependencies|deps)
- _arguments \
- '1:: :_play_apps' \
- '(--debug)--debug[Debug mode (even more information logged than in verbose mode)]' \
- '(--jpda)--jpda[Listen for JPDA connection. The process will be suspended until a client is plugged to the JPDA port.]' \
- '(--sync)--sync[Keep lib/ and modules/ directory synced. Delete unknown dependencies.]' \
- '(--verbose)--verbose[Verbose Mode]' \
- && ret=0
- ;;
- (clean|javadoc|jd|out|pid|secret|stop)
- _arguments '1:: :_play_apps' && ret=0
- ;;
- (help)
- _arguments '1: :_play_cmds -F "(cp deps ec idea jd st lm nb nm help antify evolutions evolutions:apply evolutions:markApplied evolutions:resolve)"' && ret=0
- ;;
- (status|st)
- _arguments \
- '1:: :_play_apps' \
- '(--url)--url[If you want to monitor an application running on a remote server, specify the application URL using this option]:URL:_urls' \
- '(--secret)--secret[You can provide your own secret key using this option]:Secret key' \
- && ret=0
- ;;
- (new)
- _arguments \
- '1: :_play_apps' \
- '(--with)--with[Automatically enable this set of module for the newly created application]:Modules list:_play_modules_list' \
- && ret=0
- ;;
- (install)
- _arguments '1:Play! module:_play_modules_dash_versions' && ret=0
- ;;
- (new-module)
- _arguments '1:Module directory:_files -/' && ret=0
- ;;
- (test|precompile|run|start|war|auto-test|classpath|cp|eclipsify|ec|idealize|idea|modules|netbeansify|nb)
- local cmd_args; cmd_args=(
- '1:: :_play_apps'
- '(--deps)--deps[Resolve and install dependencies before running the command]'
- )
- case $line[1] in
- (precompile|run|start|restart|war)
- local app_dir="$line[2]"
- [[ -d "$app_dir" ]] || app_dir=.
- [[ -f "$app_dir/conf/application.conf" ]] && cmd_args+=('--'${(u)${(M)$(<$app_dir/conf/application.conf):#%*}%%.*}'[Use this ID to run the application (override the default framework ID)]')
- ;|
- (test|run)
- cmd_args+=('(-f)-f[Disable the JPDA port checking and force the jpda.port value]')
- ;|
- (war)
- cmd_args+=(
- '(-o --output)'{-o,--output}'[The path where the WAR directory will be created. The contents of this directory will first be deleted]:output directory:_files -/'
- '(--zip)--zip[By default, the script creates an exploded WAR. If you want a zipped archive, specify the --zip option]'
- '(--exclude)--exclude[Excludes a list of colon separated directories]:excluded directories list:_play_colon_dirs_list'
- )
- ;|
- (test|run|start|restart|war)
- cmd_args+=('*:Java option')
- ;;
- esac
- _arguments "$cmd_args[@]" && ret=0
- ;;
- *)
- _call_function ret _play_cmd_$words[1] && ret=0
- (( ret )) && _message 'no more arguments'
- ;;
- esac
- ;;
- esac
-}
-
-# FIXME Completes only core commands, some modules add commands too (eg Maven). Where do we get them ?
-# FIXME Parse 'play help' and 'play help <command>' (for aliases) instead of hard-coding.
-(( $+functions[_play_cmds] )) ||
-_play_cmds() {
- local commands; commands=(
- 'antify:Create a build.xml file for this project'
- 'auto-test:Automatically run all application tests'
- 'build-module:Build and package a module'
- 'check:Check for a release newer than the current one'
- {classpath,cp}':Display the computed classpath'
- 'clean:Delete temporary files (including the bytecode cache)'
- {dependencies,deps}':Resolve and retrieve project dependencies'
- {eclipsify,ec}':Create all Eclipse configuration files'
- 'evolutions:Run the evolution check'
- 'evolutions\:apply:Automatically apply pending evolutions'
- 'evolutions\:mark:AppliedMark pending evolutions as manually applied'
- 'evolutions\:resolve:Resolve partially applied evolution'
- 'help:Display help on a specific command'
- 'id:Define the framework ID'
- {idealize,idea}':Create all IntelliJ Idea configuration files'
- 'install:Install a module'
- {javadoc,jd}':Generate your application Javadoc'
- {list-modules,lm}':List modules available from the central modules repository'
- 'modules:Display the computed modules list'
- {netbeansify,nb}':Create all NetBeans configuration files'
- 'new:Create a new application'
- {new-module,nm}':Create a module'
- 'out:Follow logs/system.out file'
- 'pid:Show the PID of the running application'
- 'precompile:Precompile all Java sources and templates to speed up application start-up'
- 'restart:Restart the running application'
- 'run:Run the application in the current shell'
- 'secret:Generate a new secret key'
- 'start:Start the application in the background'
- {status,st}':Display the running application status'
- 'stop:Stop the running application'
- 'test:Run the application in test mode in the current shell'
- 'war:Export the application as a standalone WAR archive'
- )
- _describe -t commands 'Play! command' commands "$@"
-}
-
-(( $+functions[_play_apps] )) ||
-_play_apps() {
- _wanted application expl 'Play! application directory' _files -/
-}
-
-(( $+functions[_play_modules] )) ||
-_play_modules() {
- local modules; modules=(${(ps:,:)${${${(S)${(f)$(_call_program modules $service list-modules)}//\]*\[/,}%%\]*}##*\[}})
- _describe -t modules 'Play! module' modules "$@"
-}
-
-(( $+functions[_play_modules_dash_versions] )) ||
-_play_modules_dash_versions() {
- local ret=1
- if compset -P '*-'; then
- local versions; versions=(${(ps:,:)${${${${${(f)$(_call_program versions $service list-modules)}##*${IPREFIX%-}\]}#*Versions:}%%"~"*}//[[:space:]]/}})
- _describe -t module-versions "${IPREFIX%-} module versions" versions && ret=0
- else
- _wanted modules expl 'Play! module' _play_modules -qS- && ret=0
- fi
-}
-
-(( $+functions[_play_modules_list] )) ||
-_play_modules_list() {
- compset -P '*,'; compset -S ',*'
- _wanted module-list expl 'Play! modules list' _play_modules -qS,
-}
-
-(( $+functions[_play_colon_dirs_list] )) ||
-_play_colon_dirs_list() {
- compset -P '*:'; compset -S ':*'
- _wanted directories-list expl 'Directories list' _files -/ -qS:
-}
-
-_play "$@"
-
-# 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
diff --git a/src/_rkt b/src/_rkt
deleted file mode 100644
index d4ce021..0000000
--- a/src/_rkt
+++ /dev/null
@@ -1,369 +0,0 @@
-#compdef rkt
-# ------------------------------------------------------------------------------
-# 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 rkt (https://coreos.com/rkt/).
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
-#
-# ------------------------------------------------------------------------------
-
-typeset -A opt_args
-autoload -U regexp-replace
-
-_rkt() {
- _arguments \
- '--debug[print out more debug information to stderr]' \
- '--dir=[rkt data directory]:data directory:_files -/' \
- '--insecure-options=[comma-separated list of security features to disable]:option:{_values -s , none image tls ondisk http all}' \
- '--local-config=[local configuration directory]:configuration directory:_files -/' \
- '--system-config=[system configuration directory]:configuration directory:_files -/' \
- '--trust-keys-from-https[automatically trust gpg keys fetched from https]' \
- '--user-config=[user configuration directory]:configuration directory:_files -/' \
- '--help' \
- '1: :_rkt_cmds' \
- '*:: :->rkt_cmd_args'
-
- case $state in
- rkt_cmd_args)
- case $words[1] in
- help)
- _arguments \
- '1: :_rkt_cmds' \
- '*:: :->rkt_help_args' \
- ;;
-
- api-service)
- _arguments \
- '--listen=[address to listen for client API requests]:address' \
- ;;
-
- cat-manifest)
- _arguments \
- '--pretty-print[apply indent to format the output]' \
- '--uuid-file=[read pod UUID from file instead of argument]:uuid file:_files' \
- '1:POD:_rkt_pods' \
- ;;
-
- config)
- _arguments \
- '--pretty-print[apply indent to format the output]' \
- ;;
-
- enter)
- _arguments \
- '--app=:appname' \
- '1:POD:_rkt_pods' \
- ;;
-
- export)
- _arguments \
- '--app=:appname' \
- '--overwrite[overwrite output ACI]' \
- '1:POD:_rkt_pods' \
- '2:OUTPUT_ACI_FILE:_files' \
- ;;
-
- fetch)
- _arguments \
- '--full[print the full image hash after fetching]' \
- '--no-store[fetch images ignoring the local store]' \
- '--signature=[local signature file to use in validating the preceding image]:signature:_files' \
- '--store-only[use only available images in the store]' \
- ;;
-
- gc)
- _arguments \
- '--grace-period=[duration to wait before discarding inactive pods from garbage]:duration' \
- '--expire-prepared=[duration to wait before expiring prepared pods]:duration' \
- '--mark-only[move to the garbage directories without actually deleting]' \
- ;;
-
- image)
- _arguments \
- '1: :_rkt_image_cmds' \
- '*:: :->rkt_image_args'
- ;;
-
- list)
- _arguments \
- '--full[use long output format]' \
- '--no-legend[suppress a legend with the list]' \
- ;;
-
- metadata-service)
- _arguments \
- '--listen-port=[listen port]:port' \
- ;;
-
- prepare)
- # TODO: autocomplete stage1 images
- _arguments \
- '--caps-remove=[capability to remove]:capability' \
- '--caps-retain=[capability to retain]:capability' \
- '--cpu=[cpu limit for the preceding image]:cpu limit' \
- '--cpu-shares=[assign the specified CPU time share weight]:weight' \
- "--environment=[set the app's environment variables]:variable key=value" \
- '--exec=[override the exec command for the preceding image]:command' \
- '--group=[group override for the preceding image]:group' \
- '--inherit-env[inherit all environment variables not set by apps]' \
- '--memory=[memory limit for the preceding image]:memory' \
- '--mount=[mount point binding a volume to a path within an app]:mount point' \
- '--name=[set the name of the app]:name' \
- '--no-overlay[disable overlay filesystem]' \
- '--oom-score-adj=[oom-score-adj isolator override]:oom-score-adj' \
- '--pod-manifest=[the path to the pod manifest]:manifest:_files' \
- '--port=[ports to expose on the host]:NAME\:HOSTPORT' \
- '--private-users[run within user namespaces]' \
- '--quiet[suppress superfluous output on stdout, print only the UUID on success]' \
- '--readonly-rootfs=[mount rootfs read-only]:fs' \
- '--set-env=[an environment variable to set for apps]:NAME=VALUE' \
- '--set-env-file=[the path to an environment variables file]:file:_files' \
- '--signature=[local signature file to use in validating the preceding image]:signature:_files' \
- '--stage1-from-dir=[a filename of an image in stage1 images directory to use as stage1]:image' \
- '--stage1-hash=[a hash of an image to use as stage1]:image hash' \
- '--stage1-name=[a name of an image to use as stage1]:image name' \
- '--stage1-path=[a path to an image to use as stage1]:image path:_files' \
- '--stage1-url=[a URL to an image to use as stage1]:image url' \
- '--supplementary-gids=[supplementary group IDs override for the preceding image]:group IDs' \
- '--user=[user override for the preceding image]:user' \
- "--user-annotation=[set the app's annotations]:annotation key=value" \
- "--user-label=[set the app's labels]:label key=value" \
- '--volume=[volumes to make available in the pod]:volume' \
- '--working-dir=[override the working directory of the preceding image]:working directory:_files -/' \
- '1:IMAGE:_rkt_images' \
- ;;
-
- rm)
- _arguments \
- '--uuid-file=[read pod UUID from file instead of argument]:uuid file:_files' \
- '1:POD:_rkt_pods' \
- ;;
-
- run)
- _arguments \
- '--caps-remove=[capability to remove]:capability' \
- '--caps-retain=[capability to retain]:capability' \
- '--cpu=[cpu limit for the preceding image]:cpu limit' \
- '--cpu-shares=[assign the specified CPU time share weight]:weight' \
- '--dns=[name servers to write in /etc/resolv.conf]:name servers' \
- '--dns-domain=[DNS domain to write in]:domain' \
- '--dns-opt=[DNS options to write in /etc/resolv.conf]:dns options' \
- '--dns-search=[DNS search domains to write in /etc/resolv.conf]:search domains' \
- "--environment=[set the app's environment variables]:variable key=value" \
- '--exec=[override the exec command for the preceding image]:command' \
- '--group=[group override for the preceding image]:group' \
- "--hostname=[pod's hostname]:hostname" \
- "--hosts-entry=[entries to add to the pod-wide /etc/hosts. Pass 'host' to use the host's /etc/hosts]:hosts entry" \
- '--inherit-env[inherit all environment variables not set by apps]' \
- '--interactive[run pod interactively]' \
- '--mds-register[register pod with metadata service]' \
- '--memory=[memory limit for the preceding image]:memory limit' \
- '--mount=[mount point binding a volume to a path within an app]:mount point' \
- '--name=[set the name of the app]:name' \
- "--net=[configure the pod's networking]:networks" \
- '--no-overlay[disable overlay filesystem]' \
- '--pod-manifest=[the path to the pod manifest]:manifest:_files' \
- '--port=[ports to expose on the host]:NAME\:HOSTPORT' \
- '--private-users[run within user namespaces]' \
- '--set-env=[an environment variable to set for apps]:NAME=VALUE' \
- '--set-env-file=[the path to an environment variables file]:file:_files' \
- '--signature=[local signature file to use in validating the preceding image]:signature:_files' \
- '--stage1-from-dir=[a filename of an image in stage1 images directory to use as stage1]:image' \
- '--stage1-hash=[a hash of an image to use as stage1]:image hash' \
- '--stage1-name=[a name of an image to use as stage1]:image name' \
- '--stage1-path=[a path to an image to use as stage1]:image path:_files' \
- '--stage1-url=[a URL to an image to use as stage1]:image url' \
- '--supplementary-gids=[supplementary group IDs override for the preceding image]:group IDs' \
- '--user=[user override for the preceding image]:user' \
- "--user-annotation=[set the app's annotations]:annotation key=value" \
- "--user-label=[set the app's labels]:label key=value" \
- '--uuid-file-save=[write out pod UUID to specified file]:uuid file:_files' \
- '--volume=[volumes to make available in the pod]:volume' \
- '--working-dir=[override the working directory of the preceding image]:working directory:_files -/' \
- '1:IMAGE:_rkt_images' \
- ;;
-
- run-prepared)
- _arguments \
- '--dns=[name servers to write in /etc/resolv.conf]:name servers' \
- '--dns-domain=[DNS domain to write in]:domain' \
- '--dns-opt=[DNS options to write in /etc/resolv.conf]:dns options' \
- '--dns-search=[DNS search domains to write in /etc/resolv.conf]:search domains' \
- "--hostname=[pod's hostname]:hostname" \
- "--hosts-entry=[entries to add to the pod-wide /etc/hosts. Pass 'host' to use the host's /etc/hosts]:hosts entry" \
- '--interactive[run pod interactively]' \
- '--mds-register[register pod with metadata service]' \
- "--net=[configure the pod's networking]:networks" \
- '1:POD:_rkt_pods' \
- ;;
-
- status)
- _arguments \
- '--format=[choose the output format]:format:(json json-pretty)' \
- '--wait[toggles waiting for the pod to exit]' \
- '--wait-ready[toggles waiting until the pod is ready]' \
- '1:POD:_rkt_pods' \
- ;;
-
- stop)
- _arguments \
- '--force[forced stopping]' \
- '--uuid-file=[read pod UUID from file instead of argument]:uuid file:_files' \
- '1:POD:_rkt_pods' \
- ;;
-
- trust)
- _arguments \
- '--insecure-allow-http[allow HTTP use for key discovery and/or retrieval]' \
- '--prefix=[prefix to limit trust to]:prefix' \
- '--root[add root key from filesystem without a prefix]' \
- '--skip-fingerprint-review[accept key without fingerprint confirmation]' \
- ;;
- esac
- ;;
- esac
-
- case $state in
- rkt_help_args)
- case $words[1] in
- image)
- _arguments \
- '1: :_rkt_image_cmds'
- ;;
- esac
- ;;
-
- rkt_image_args)
- case $words[1] in
- cat-manifest)
- _arguments \
- '--pretty-print[apply indent to format the output]' \
- '1:IMAGE:_rkt_images' \
- ;;
-
- export)
- _arguments \
- '--overwrite[overwrite output ACI]' \
- '1:IMAGE:_rkt_images' \
- '2:OUTPUT_ACI_FILE:_files' \
- ;;
-
- extract|render)
- _arguments \
- '--overwrite[overwrite output ACI]' \
- '--rootfs-only[extract rootfs only]' \
- '1:IMAGE:_rkt_images' \
- '2:OUTPUT_DIR:_files -/' \
- ;;
-
- gc)
- _arguments \
- '--grace-period=[duration to wait before discarding inactive pods from garbage]:duration' \
- ;;
-
- list)
- _arguments \
- '--fields=[comma-separated list of fields to display]:fields:{_values -s , id name importtime lastused size latest}' \
- '--full[use long output format]' \
- '--no-legend[suppress a legend with the list]' \
- ;;
-
- rm)
- _arguments \
- '*:IMAGE:_rkt_images' \
- ;;
- esac
- ;;
- esac
-}
-
-_rkt_cmds() {
- local -a commands
- commands=(
- 'api-service:Run API service'
- 'cat-manifest:Inspect and print the pod manifest'
- 'config:Print configuration for each stage in JSON format'
- 'enter:Enter the namespaces of an app within a rkt pod'
- 'export:Export an app from an exited pod to an ACI file'
- 'fetch:Fetch image(s) and store them in the local store'
- 'gc:Garbage collect rkt pods no longer in use'
- 'image:Operate on image(s) in the local store'
- 'list:List pods'
- 'metadata-service:Run metadata service'
- 'prepare:Prepare to run image(s) in a pod in rkt'
- 'rm:Remove all files and resources associated with an exited pod'
- 'run:Run image(s) in a pod in rkt'
- 'run-prepared:Run a prepared application pod in rkt'
- 'status:Check the status of a rkt pod'
- 'stop:Stop a pod'
- 'trust:Trust a key for image verification'
- 'version:Print the version and exit'
- 'help:Help about any command'
- )
- _describe 'command' commands
-}
-
-_rkt_image_cmds() {
- local -a commands
- commands=(
- 'cat-manifest:Inspect and print the image manifest'
- 'export:Export a stored image to an ACI file'
- 'extract:Extract a stored image to a directory'
- 'gc:Garbage collect local store'
- 'list:List images in the local store'
- 'render:Render a stored image to a directory with all its dependencies'
- 'rm:Remove image(s) with the given ID(s) or name(s) from the local store'
- )
- _describe 'command' commands
-}
-
-_rkt_images() {
- local -a images
- images=($(rkt image list --fields id,name --no-legend | sed 's/\t/\n/;s/:/\\:/g' | sort | uniq))
- _describe 'IMAGE' images
-}
-
-_rkt_pods() {
- local -a pods
- IFS=$'\n'
- pods=($(rkt list --full --no-legend | sed 's/:/\\:/g;s/\t/:/;s/\t/ /g'))
- _describe 'POD' pods
-}
-
-_rkt "$@"
-
-# 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
diff --git a/src/_rslsync b/src/_rslsync
index c72fb75..f3907ba 100644
--- a/src/_rslsync
+++ b/src/_rslsync
@@ -28,7 +28,7 @@
# Description
# -----------
#
-# Completion script for resilio sync 2.7.3 (https://www.resilio.com/individuals/).
+# Completion script for resilio sync 3.1.2 (https://www.resilio.com/individuals/).
#
# ------------------------------------------------------------------------------
# Authors
@@ -38,30 +38,21 @@
#
# ------------------------------------------------------------------------------
-_rslsync(){
- integer ret=1
- local -a args
- args+=(
- '(- *)--help[Print help]'
- '--config[Use a configuration file]:file:_files'
- '--storage[Storage path for identity and license]:path:_files -/'
- '--identity[Creates user identity]:name:'
- '--license[Apply owner license]:file:_files'
- '--decrypt[Decrypt encrypted folder]:'
- '--upgradedb[Upgrade databases in specified storage or upgrade a single db]:db:_files'
- '--nodaemon[Do not daemonize]'
- '--dump-sample-config[Print a sample configuration file]'
- '--log[Set log file]:file:_files'
- '(--help)--webui.listen[Set the webui listening interface]:ip\:port:'
- '--generate-secret[Generate a read/write key]::version:(2)'
- '--get-ro-secret[Get the read-only key associated to a read/write key]:key:'
- '--server[Set Management Console address]:ip\:port:'
- )
- _arguments $args[@] && ret=0
- return ret
-}
-
-_rslsync
+_arguments \
+ '(- *)--help[Print help]' \
+ '--config[Use a configuration file]:file:_files' \
+ '--storage[Storage path for identity and license]:path:_files -/' \
+ '--identity[Creates user identity]:name' \
+ '--license[Apply owner license]:file:_files' \
+ '--decrypt[Decrypt encrypted folder]:secret_dbpath_encrypted_folder_output_folder' \
+ '--upgradedb[Upgrade databases in specified storage or upgrade a single db]:db:_files' \
+ '--nodaemon[Do not daemonize]' \
+ '--dump-sample-config[Print a sample configuration file]' \
+ '--log[Set log file]:file:_files' \
+ '(--help)--webui.listen[Set the webui listening interface]:ip_port:' \
+ '--generate-secret[Generate a read/write key]::version:(2)' \
+ '--get-ro-secret[Get the read-only key associated to a read/write key]:key' \
+ '--server[Set Management Console address]:ip_port'
# Local Variables:
# mode: Shell-Script
diff --git a/src/_rsvm b/src/_rsvm
deleted file mode 100644
index 3840eb2..0000000
--- a/src/_rsvm
+++ /dev/null
@@ -1,88 +0,0 @@
-#compdef rsvm
-# ------------------------------------------------------------------------------
-# 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 rsvm (https://github.com/sdepold/rsvm).
-# Adapted from Docker Machine completion by hhatto (https://github.com/ilkka)
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * michaelmior (https://github.com/michaelmior)
-#
-# ------------------------------------------------------------------------------
-
-# helper function for completing available rusts
-__rusts() {
- declare -a rusts_cmd
- rusts_cmd=($(ls "$HOME/.rsvm/versions"))
- _describe 'rusts' rusts_cmd
-}
-
-# subcommands
-local -a _rsvm_cmds
-
-_rsvm_cmds=(
- 'help:Show a help message' \
- 'install:Download and install a version' \
- 'uninstall:Uninstall a version' \
- 'use:Activate a version for now and the future' \
- 'ls:List all installed versions of rust' \
- 'ls-remote:List remote versions available for install' \
- 'ls-channel:Print a channel version available for install' \
-)
-
-# subcommand completion functions
-__uninstall() {
- __rusts
-}
-
-__use() {
- __rusts
-}
-
-# common args
-_arguments \
- '--help[show help]' \
- '--version[print the version]' \
- '*:: :->command'
-
-# start rusts!
-if (( CURRENT == 1 )); then
- _describe -t commands 'rsvm command' _rsvm_cmds
-fi
-
-local -a _command_args
-case "$words[1]" in
- uninstall)
- __uninstall ;;
- use)
- __use ;;
-esac
diff --git a/src/_screencapture b/src/_screencapture
index 43b4830..874d8b1 100644
--- a/src/_screencapture
+++ b/src/_screencapture
@@ -34,7 +34,7 @@
#
# ------------------------------------------------------------------------------
-_arguments \
+_arguments -s \
'-c[force screen capture to go to the clipboard]' \
'(-i -J -s -w -W)-b[capture touch bar only non interactive modes]' \
'(-b -i -J -s -w -W)-C[capture the cursor as well as the screen only in non interactive modes]' \
diff --git a/src/_sfdx b/src/_sfdx
deleted file mode 100644
index 613fc9e..0000000
--- a/src/_sfdx
+++ /dev/null
@@ -1,935 +0,0 @@
-#compdef sfdx
-
-# DESCRIPTION: Zsh completion script for the Salesforce CLI
-# AUTHOR: Wade Wegner (@WadeWegner)
-# REPO: https://github.com/wadewegner/salesforce-cli-zsh-completion
-# LICENSE: https://github.com/wadewegner/salesforce-cli-zsh-completion/blob/master/LICENSE
-
-local -a _1st_arguments
-
-_1st_arguments=(
- "force\:alias\:list":"list username aliases for the Salesforce CLI"
- "force\:alias\:set":"set username aliases for the Salesforce CLI"
- "force\:apex\:class\:create":"create an Apex class"
- "force\:apex\:execute":"execute anonymous Apex code"
- "force\:apex\:log\:get":"fetch a debug log"
- "force\:apex\:log\:list":"list debug logs"
- "force\:apex\:test\:report":"display test results"
- "force\:apex\:test\:run":"invoke Apex tests"
- "force\:apex\:trigger\:create":"create an Apex trigger"
- "force\:auth\:jwt\:grant":"authorize an org using the JWT flow"
- "force\:auth\:sfdxurl\:store":"authorize an org using an SFDX auth URL"
- "force\:auth\:web\:login":"authorize an org using the web login flow"
- "force\:config\:get":"get config var values for given names"
- "force\:config\:list":"list config vars for the Salesforce CLI"
- "force\:config\:set":"set config vars for the Salesforce CLI"
- "force\:data\:bulk\:delete":"bulk delete records from a csv file"
- "force\:data\:bulk\:status":"view the status of a bulk data load job or batch"
- "force\:data\:bulk\:upsert":"bulk upsert records from a CSV file"
- "force\:data\:record\:create":"create a record"
- "force\:data\:record\:delete":"delete a record"
- "force\:data\:record\:get":"view a record"
- "force\:data\:record\:update":"update a record"
- "force\:data\:soql\:query":"execute a SOQL query"
- "force\:data\:tree\:export":"export data from an org into sObject tree format for force:data:tree:import consumption"
- "force\:data\:tree\:import":"import data into an org using SObject Tree Save API"
- "force\:doc\:commands\:display":"display help for force commands"
- "force\:doc\:commands\:list":"list the force commands"
- "force\:lightning\:app\:create":"create a Lightning app"
- "force\:lightning\:component\:create":"create a Lightning component"
- "force\:lightning\:event\:create":"create a Lightning event"
- "force\:lightning\:interface\:create":"create a Lightning interface"
- "force\:lightning\:lint":"analyse (lint) Lightning component code"
- "force\:lightning\:test\:create":"create a Lightning test"
- "force\:lightning\:test\:install":"install Lightning Testing Service unmanaged package in your org"
- "force\:lightning\:test\:run":"invoke Lightning component tests"
- "force\:limits\:api\:display":"display current org’s limits"
- "force\:mdapi\:convert":"convert Metadata API source into the Salesforce DX source format"
- "force\:mdapi\:deploy":"deploy metadata to an org using Metadata API"
- "force\:mdapi\:deploy\:report":"check the status of a metadata deployment"
- "force\:mdapi\:retrieve":"retrieve metadata from an org using Metadata API"
- "force\:mdapi\:retrieve\:report":"check the status of a metadata retrieval"
- "force\:org\:create":"create a scratch org"
- "force\:org\:delete":"mark a scratch org for deletion"
- "force\:org\:display":"get org description"
- "force\:org\:list":"list all orgs you’ve created or authenticated to"
- "force\:org\:open":"open an org in your browser"
- "force\:org\:shape\:create":"create a snapshot of org edition, features, and licenses"
- "force\:org\:shape\:delete":"delete all org shapes for a target org"
- "force\:org\:shape\:list":"list all org shapes you’ve created"
- "force\:package1\:version\:create":"create a first-generation package version in the release org"
- "force\:package1\:version\:create\:get":"retrieve the status of a package version creation request"
- "force\:package1\:version\:display":"display details about a first-generation package version"
- "force\:package1\:version\:list":"list package versions for the specified first-generation package or for the org"
- "force\:package2\:create":"create a second-generation package"
- "force\:package2\:list":"list all second-generation packages in the Dev Hub org"
- "force\:package2\:update":"update a second-generation package"
- "force\:package2\:version\:create":"create a second-generation package version"
- "force\:package2\:version\:create\:get":"retrieve a package version creation request"
- "force\:package2\:version\:create\:list":"list package version creation requests"
- "force\:package2\:version\:get":"retrieve a package version in the Dev Hub org"
- "force\:package2\:version\:list":"list all package versions in the Dev Hub org"
- "force\:package2\:version\:update":"update a second-generation package version"
- "force\:package\:install":"install a package in the target org"
- "force\:package\:install\:get":"retrieve the status of a package installation request"
- "force\:package\:installed\:list":"list the org’s installed packages"
- "force\:package\:uninstall":"uninstall a second-generation package from the target org"
- "force\:package\:uninstall\:get":"retrieve status of package uninstall request"
- "force\:project\:create":"create a new SFDX project"
- "force\:project\:upgrade":"update project config files to the latest format"
- "force\:schema\:sobject\:describe":"describe an object"
- "force\:schema\:sobject\:list":"list all objects of a specified category"
- "force\:source\:convert":"convert Salesforce DX source into the Metadata API source format"
- "force\:source\:open":"edit a Lightning Page with Lightning App Builder"
- "force\:source\:pull":"pull source from the scratch org to the project"
- "force\:source\:push":"push source to an org from the project"
- "force\:source\:status":"list local changes and/or changes in a scratch org"
- "force\:user\:create":"create a user for a scratch org"
- "force\:user\:display":"displays information about a user of a scratch org"
- "force\:user\:list":"lists all users of a scratch org"
- "force\:user\:password\:generate":"generate a password for scratch org users"
- "force\:user\:permset\:assign":"assign a permission set to one or more users of an org"
- "force\:visualforce\:component\:create":"create a Visualforce component"
- "force\:visualforce\:page\:create":"create a Visualforce page"
-)
-
-_arguments '*:: :->command'
-
-if (( CURRENT == 1 )); then
- _describe -t commands "sfdx command" _1st_arguments
- return
-fi
-
-local -a _command_args
-case "$words[1]" in
- force:limits:api:display)
- _command_args=(
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:lightning:app:create)
- _command_args=(
- '(-n|--appname)'{-n,--appname}'[name of the generated Lightning app]' \
- '(-t|--template)'{-t,--template}'[template to use for file creation (DefaultLightningApp*)]' \
- '(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
- '(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
- '(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
- '(--json)--json[JSON output]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:data:bulk:delete)
- _command_args=(
- '(-s|--sobjecttype)'{-s,--sobjecttype}'[the sObject type of the records you’re deleting]' \
- '(-f|--csvfile)'{-f,--csvfile}'[the path to the CSV file containing the ids of the records to delete]:file:_files' \
- '(-w|--wait)'{-w,--wait}'[the number of minutes to wait for the command to complete before displaying the results]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:data:bulk:status)
- _command_args=(
- '(-i|--jobid)'{-i,--jobid}'[the ID of the job you want to view or of the job whose batch you want to view]' \
- '(-b|--batchid)'{-b,--batchid}'[the ID of the batch whose status you want to view]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:data:bulk:upsert)
- _command_args=(
- '(-s|--sobjecttype)'{-s,--sobjecttype}'[the sObject type of the records you want to upsert]' \
- '(-f|--csvfile)'{-f,--csvfile}'[the path to the CSV file that defines the records to upsert]:file:_files' \
- '(-i|--externalid)'{-i,--externalid}'[the column name of the external ID; if not provided, an arbitrary ID is used]' \
- '(-w|--wait)'{-w,--wait}'[the number of minutes to wait for the command to complete before displaying the results]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:apex:class:create)
- _command_args=(
- '(-n|--classname)'{-n,--classname}'[name of the generated Apex class]' \
- '(-t|--template)'{-t,--template}'[template to use for file creation (DefaultApexClass*,ApexException,ApexUnitTest,InboundEmailService)]' \
- '(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
- '(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
- '(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
- '(--json)--json[JSON output]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:doc:commands:display)
- _command_args=(
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:doc:commands:list)
- _command_args=(
- '(-u|--usage)'{-u,--usage}'[list only docopts usage strings]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:visualforce:component:create)
- _command_args=(
- '(-t|--template)'{-t,--template}'[template to use for file creation (DefaultVFComponent*)]' \
- '(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
- '(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
- '(-n|--componentname)'{-n,--componentname}'[name of the generated Visualforce component]' \
- '(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
- '(-l|--label)'{-l,--label}'[Visualforce component label]' \
- '(--json)--json[JSON output]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:lightning:component:create)
- _command_args=(
- '(-n|--componentname)'{-n,--componentname}'[name of the generated Lightning component]' \
- '(-t|--template)'{-t,--template}'[template to use for file creation (DefaultLightningCmp*)]' \
- '(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
- '(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
- '(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
- '(--json)--json[JSON output]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:mdapi:convert)
- _command_args=(
- '(-r|--rootdir)'{-r,--rootdir}'[the root directory containing the Metadata API source]:file:_files' \
- '(-d|--outputdir)'{-d,--outputdir}'[the output directory to store the sfdx source]:file:_files' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:source:convert)
- _command_args=(
- '(-r|--rootdir)'{-r,--rootdir}'[the source directory for the source to be converted]:file:_files' \
- '(-d|--outputdir)'{-d,--outputdir}'[the output directory to export the Metadata API source to]:file:_files' \
- '(-n|--packagename)'{-n,--packagename}'[the name of the package to associate with the Metadata API source]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:org:create)
- _command_args=(
- '(-f|--definitionfile)'{-f,--definitionfile}'[path to a scratch org definition file]:file:_files' \
- '(-j|--definitionjson)'{-j,--definitionjson}'[scratch org definition in json format ]' \
- '(-n|--nonamespace)'{-n,--nonamespace}'[creates the scratch org with no namespace]' \
- '(-c|--noancestors)'{-c,--noancestors}'[do not include second-generation package ancestors in the scratch org]' \
- '(-i|--clientid)'{-i,--clientid}'[connected app consumer key]' \
- '(-s|--setdefaultusername)'{-s,--setdefaultusername}'[set the created org as the default username]' \
- '(-a|--setalias)'{-a,--setalias}'[set an alias for the created scratch org]' \
- '(-e|--env)'{-e,--env}'[environment where the scratch org is created: \[sandbox*,virtual,prototype\] (sandbox*,virtual,prototype)]' \
- '(-w|--wait)'{-w,--wait}'[the streaming client socket timeout (in minutes) (default:6, min:2)]' \
- '(-d|--durationdays)'{-d,--durationdays}'[duration of the scratch org (in days) (default:7, min:1, max:30)]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package2:create)
- _command_args=(
- '(-n|--name)'{-n,--name}'[package name]' \
- '(-o|--containeroptions)'{-o,--containeroptions}'[\[*Managed | Unlocked | Locked\] container options for the package (Managed=DeveloperManagedSubscriberManaged, Unlocked=DeveloperControlledSubscriberEditable, Locked=DeveloperControlledSubscriberLocked)]' \
- '(-d|--description)'{-d,--description}'[package description]' \
- '(-e|--nonamespace)'{-e,--nonamespace}'[creates the package with no namespace; available only for developer-controlled packages.]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:user:create)
- _command_args=(
- '(-f|--definitionfile)'{-f,--definitionfile}'[file path to a user definition]:file:_files' \
- '(-a|--setalias)'{-a,--setalias}'[set an alias for the created username to reference within the CLI]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:project:create)
- _command_args=(
- '(-n|--projectname)'{-n,--projectname}'[name of the generated project]' \
- '(-t|--template)'{-t,--template}'[template to use for file creation (Defaultsfdx-project.json*)]' \
- '(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
- '(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
- '(-l|--loginurl)'{-l,--loginurl}'[Salesforce instance login URL (https://login.salesforce.com*)]' \
- '(-x|--sourceapiversion)'{-x,--sourceapiversion}'[source API version number (41.0*)]' \
- '(-s|--namespace)'{-s,--namespace}'[project associated namespace]' \
- '(-p|--defaultpackagedir)'{-p,--defaultpackagedir}'[default package directory name (force-app*)]:file:_files' \
- '(--json)--json[JSON output]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:org:delete)
- _command_args=(
- '(-p|--noprompt)'{-p,--noprompt}'[no prompt to confirm deletion]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:mdapi:deploy)
- _command_args=(
- '(-c|--checkonly)'{-c,--checkonly}'[validate deploy but don’t save to the org (default:false)]' \
- '(-d|--deploydir)'{-d,--deploydir}'[root of directory tree of files to deploy]:file:_files' \
- '(-w|--wait)'{-w,--wait}'[wait time for command to finish in minutes (default: 0)]' \
- '(-i|--jobid)'{-i,--jobid}'[WARNING: The flag "jobid" has been deprecated and will be removed in v41.01.0 or later. Instead, use "sfdx force:mdapi:deploy:report -i <jobId>".]' \
- '(-l|--testlevel)'{-l,--testlevel}'[deployment testing level (NoTestRun,RunSpecifiedTests,RunLocalTests,RunAllTestsInOrg)]' \
- '(-r|--runtests)'{-r,--runtests}'[tests to run if --testlevel RunSpecifiedTests]' \
- '(-e|--rollbackonerror)'{-e,--rollbackonerror}'[WARNING: The flag "rollbackonerror" has been deprecated and will be removed in v41.01.0 or later. Instead, use "ignoreerrors".]' \
- '(-o|--ignoreerrors)'{-o,--ignoreerrors}'[ignore any errors and do not roll back deployment (default:false)]' \
- '(-g|--ignorewarnings)'{-g,--ignorewarnings}'[whether a warning will allow a deployment to complete successfully (default:false)]' \
- '(-f|--zipfile)'{-f,--zipfile}'[path to .zip file of metadata to deploy]:file:_files' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- '(--verbose)--verbose[verbose output of deploy results]' \
- )
- ;;
- force:mdapi:deploy:report)
- _command_args=(
- '(-w|--wait)'{-w,--wait}'[wait time for command to finish in minutes (default: 0)]' \
- '(-i|--jobid)'{-i,--jobid}'[job ID of the deployment you want to check]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- '(--verbose)--verbose[verbose output of deploy results]' \
- )
- ;;
- force:org:display)
- _command_args=(
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- '(--verbose)--verbose[emit additional command output to stdout]' \
- )
- ;;
- force:user:display)
- _command_args=(
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:lightning:event:create)
- _command_args=(
- '(-n|--eventname)'{-n,--eventname}'[name of the generated Lightning event]' \
- '(-t|--template)'{-t,--template}'[template to use for file creation (DefaultLightningEvt*)]' \
- '(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
- '(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
- '(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
- '(--json)--json[JSON output]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:apex:execute)
- _command_args=(
- '(-f|--apexcodefile)'{-f,--apexcodefile}'[path to a local file containing Apex code]:file:_files' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:config:get)
- _command_args=(
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- '(--verbose)--verbose[emit additional command output to stdout]' \
- )
- ;;
- force:package:install)
- _command_args=(
- '(-i|--id)'{-i,--id}'[ID of the package version to install (starts with 04t)]' \
- '(-w|--wait)'{-w,--wait}'[number of minutes to wait for installation status]' \
- '(-k|--installationkey)'{-k,--installationkey}'[installation key for key-protected package (default: null)]' \
- '(-p|--publishwait)'{-p,--publishwait}'[number of minutes to wait for subscriber package version ID to become available in the target org]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package:install:get)
- _command_args=(
- '(-i|--requestid)'{-i,--requestid}'[ID of the package install request you want to check]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package:installed:list)
- _command_args=(
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:lightning:interface:create)
- _command_args=(
- '(-n|--interfacename)'{-n,--interfacename}'[name of the generated Lightning interface]' \
- '(-t|--template)'{-t,--template}'[template to use for file creation (DefaultLightningIntf*)]' \
- '(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
- '(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
- '(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
- '(--json)--json[JSON output]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:auth:jwt:grant)
- _command_args=(
- '(-u|--username)'{-u,--username}'[authentication username]' \
- '(-f|--jwtkeyfile)'{-f,--jwtkeyfile}'[path to a file containing the private key]:file:_files' \
- '(-i|--clientid)'{-i,--clientid}'[OAuth client ID (sometimes called the consumer key)]' \
- '(-r|--instanceurl)'{-r,--instanceurl}'[the login URL of the instance the org lives on]' \
- '(-d|--setdefaultdevhubusername)'{-d,--setdefaultdevhubusername}'[set the authenticated org as the default dev hub org for scratch org creation]' \
- '(-s|--setdefaultusername)'{-s,--setdefaultusername}'[set the authenticated org as the default username that all commands run against]' \
- '(-a|--setalias)'{-a,--setalias}'[set an alias for the authenticated org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:lightning:lint)
- _command_args=(
- '(-i|--ignore)'{-i,--ignore}'[pattern used to ignore some folders]' \
- '(--files)--files[pattern used to include specific files]:file:_files' \
- '(-j|--json)'{-j,--json}'[format output as JSON]' \
- '(--config)--config[path to a custom ESLint configuration file]:file:_files' \
- '(--verbose)--verbose[report warnings in addition to errors]' \
- '(--exit)--exit[exit with error code 1 if there are lint issues]' \
- )
- ;;
- force:alias:list)
- _command_args=(
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:config:list)
- _command_args=(
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:org:list)
- _command_args=(
- '(--all)--all[include expired, deleted, and unknown-status scratch orgs]' \
- '(--clean)--clean[remove all local org authorizations for non-active orgs]' \
- '(-p|--noprompt)'{-p,--noprompt}'[do not prompt for confirmation]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- '(--verbose)--verbose[list more information about each org]' \
- )
- ;;
- force:package2:list)
- _command_args=(
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:user:list)
- _command_args=(
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:apex:log:get)
- _command_args=(
- '(-i|--logid)'{-i,--logid}'[ID of the log to display]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:apex:log:list)
- _command_args=(
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:org:open)
- _command_args=(
- '(-p|--path)'{-p,--path}'[navigation URL path]:file:_files' \
- '(-r|--urlonly)'{-r,--urlonly}'[display navigation URL, but don’t launch browser]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:source:open)
- _command_args=(
- '(-f|--sourcefile)'{-f,--sourcefile}'[file to edit]:file:_files' \
- '(-r|--urlonly)'{-r,--urlonly}'[generate a navigation URL; don’t launch the editor]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:visualforce:page:create)
- _command_args=(
- '(-t|--template)'{-t,--template}'[template to use for file creation (DefaultVFPage*)]' \
- '(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
- '(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
- '(-n|--pagename)'{-n,--pagename}'[name of the generated Visualforce page]' \
- '(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
- '(-l|--label)'{-l,--label}'[Visualforce page label]' \
- '(--json)--json[JSON output]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:user:password:generate)
- _command_args=(
- '(-o|--onbehalfof)'{-o,--onbehalfof}'[comma-separated list of usernames for which to generate passwords]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:user:permset:assign)
- _command_args=(
- '(-n|--permsetname)'{-n,--permsetname}'[the name of the permission set to assign]' \
- '(-o|--onbehalfof)'{-o,--onbehalfof}'[comma-separated list of usernames or aliases to assign the permission set to]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:source:pull)
- _command_args=(
- '(-w|--wait)'{-w,--wait}'[wait time for command to finish in minutes (default: 33) (default:33, min:1)]' \
- '(-f|--forceoverwrite)'{-f,--forceoverwrite}'[ignore conflict warnings and overwrite changes to the project]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:source:push)
- _command_args=(
- '(-f|--forceoverwrite)'{-f,--forceoverwrite}'[ignore conflict warnings and overwrite changes to scratch org]' \
- '(-g|--ignorewarnings)'{-g,--ignorewarnings}'[deploy changes even if warnings are generated]' \
- '(-w|--wait)'{-w,--wait}'[wait time for command to finish in minutes (default: 33) (default:33, min:1)]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:data:record:create)
- _command_args=(
- '(-s|--sobjecttype)'{-s,--sobjecttype}'[the type of the record you’re creating]' \
- '(-v|--values)'{-v,--values}'[the <fieldName>=<value> pairs you’re creating]' \
- '(-t|--usetoolingapi)'{-t,--usetoolingapi}'[create the record with tooling api]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:data:record:delete)
- _command_args=(
- '(-s|--sobjecttype)'{-s,--sobjecttype}'[the type of the record you’re deleting]' \
- '(-i|--sobjectid)'{-i,--sobjectid}'[the ID of the record you’re deleting]' \
- '(-w|--where)'{-w,--where}'[a list of <fieldName>=<value> pairs to search for]' \
- '(-t|--usetoolingapi)'{-t,--usetoolingapi}'[delete the record with Tooling API]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:data:record:get)
- _command_args=(
- '(-s|--sobjecttype)'{-s,--sobjecttype}'[the type of the record you’re retrieving]' \
- '(-i|--sobjectid)'{-i,--sobjectid}'[the ID of the record you’re retrieving]' \
- '(-w|--where)'{-w,--where}'[a list of <fieldName>=<value> pairs to search for]' \
- '(-t|--usetoolingapi)'{-t,--usetoolingapi}'[retrieve the record with Tooling API]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:data:record:update)
- _command_args=(
- '(-s|--sobjecttype)'{-s,--sobjecttype}'[the type of the record you’re updating]' \
- '(-i|--sobjectid)'{-i,--sobjectid}'[the ID of the record you’re updating]' \
- '(-w|--where)'{-w,--where}'[a list of <fieldName>=<value> pairs to search for]' \
- '(-v|--values)'{-v,--values}'[the <fieldName>=<value> pairs you’re updating]' \
- '(-t|--usetoolingapi)'{-t,--usetoolingapi}'[update the record with Tooling API]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:mdapi:retrieve)
- _command_args=(
- '(-a|--apiversion)'{-a,--apiversion}'[target API version for the retrieve (default 41.0)]' \
- '(-w|--wait)'{-w,--wait}'[wait time for command to finish in minutes (default: -1 (no limit))]' \
- '(-r|--retrievetargetdir)'{-r,--retrievetargetdir}'[directory root for the retrieved files]:file:_files' \
- '(-k|--unpackaged)'{-k,--unpackaged}'[file path of manifest of components to retrieve]:file:_files' \
- '(-d|--sourcedir)'{-d,--sourcedir}'[source dir to use instead of default manifest sfdx-project.xml]' \
- '(-p|--packagenames)'{-p,--packagenames}'[a comma-separated list of packages to retrieve]' \
- '(-s|--singlepackage)'{-s,--singlepackage}'[a single-package retrieve (default: false)]' \
- '(-i|--jobid)'{-i,--jobid}'[WARNING: The flag "jobid" has been deprecated and will be removed in v41.01.0 or later. Instead, use "sfdx force:mdapi:retrieve:report -i <jobId> -r <targetDir>".]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- '(--verbose)--verbose[verbose output of retrieve result]' \
- )
- ;;
- force:mdapi:retrieve:report)
- _command_args=(
- '(-w|--wait)'{-w,--wait}'[wait time for command to finish in minutes (default: -1 (no limit))]' \
- '(-r|--retrievetargetdir)'{-r,--retrievetargetdir}'[directory root for the retrieved files]:file:_files' \
- '(-i|--jobid)'{-i,--jobid}'[job ID of the retrieve you want to check]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- '(--verbose)--verbose[verbose output of retrieve result]' \
- )
- ;;
- force:alias:set)
- _command_args=(
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:config:set)
- _command_args=(
- '(-g|--global)'{-g,--global}'[set config var globally (to be used from any directory)]:file:_files' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:auth:sfdxurl:store)
- _command_args=(
- '(-f|--sfdxurlfile)'{-f,--sfdxurlfile}'[path to a file containing the sfdx url]:file:_files' \
- '(-d|--setdefaultdevhubusername)'{-d,--setdefaultdevhubusername}'[set the authenticated org as the default dev hub org for scratch org creation]' \
- '(-s|--setdefaultusername)'{-s,--setdefaultusername}'[set the authenticated org as the default username that all commands run against]' \
- '(-a|--setalias)'{-a,--setalias}'[set an alias for the authenticated org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:org:shape:create)
- _command_args=(
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:org:shape:delete)
- _command_args=(
- '(-p|--noprompt)'{-p,--noprompt}'[do not prompt for confirmation]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username for the target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:org:shape:list)
- _command_args=(
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- '(--verbose)--verbose[list more information about each org shape]' \
- )
- ;;
- force:schema:sobject:describe)
- _command_args=(
- '(-s|--sobjecttype)'{-s,--sobjecttype}'[the API name of the object to describe]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:schema:sobject:list)
- _command_args=(
- '(-c|--sobjecttypecategory)'{-c,--sobjecttypecategory}'[the type of objects to list (all|custom|standard)]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:data:soql:query)
- _command_args=(
- '(-q|--query)'{-q,--query}'[SOQL query to execute]' \
- '(-t|--usetoolingapi)'{-t,--usetoolingapi}'[execute query with Tooling API]' \
- '(-r|--resultformat)'{-r,--resultformat}'[query result format emitted to stdout; --json flag overrides this parameter (human*,csv,json)]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:source:status)
- _command_args=(
- '(-a|--all)'{-a,--all}'[list all the changes that have been made]' \
- '(-l|--local)'{-l,--local}'[list the changes that have been made locally]' \
- '(-r|--remote)'{-r,--remote}'[list the changes that have been made in the scratch org]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:lightning:test:create)
- _command_args=(
- '(-n|--testname)'{-n,--testname}'[name of the generated Lightning test]' \
- '(-t|--template)'{-t,--template}'[template to use for file creation (DefaultLightningTest*)]' \
- '(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
- '(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
- '(--json)--json[JSON output]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:lightning:test:install)
- _command_args=(
- '(-w|--wait)'{-w,--wait}'[number of minutes to wait for installation status (default:2)]' \
- '(-r|--releaseversion)'{-r,--releaseversion}'[release version of Lightning Testing Service (default:latest)]' \
- '(-t|--packagetype)'{-t,--packagetype}'[type of unmanaged package. 'full' option contains both jasmine and mocha, plus examples (full*,jasmine,mocha)]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:apex:test:report)
- _command_args=(
- '(-i|--testrunid)'{-i,--testrunid}'[ID of test run]' \
- '(-c|--codecoverage)'{-c,--codecoverage}'[retrieve code coverage results]' \
- '(-d|--outputdir)'{-d,--outputdir}'[directory to store test run files]:file:_files' \
- '(-r|--resultformat)'{-r,--resultformat}'[test result format emitted to stdout; --json flag overrides this parameter (human*,tap,junit,json)]' \
- '(-w|--wait)'{-w,--wait}'[the streaming client socket timeout (in minutes) (default:6, min:2)]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- '(--verbose)--verbose[display Apex test processing details]' \
- )
- ;;
- force:apex:test:run)
- _command_args=(
- '(-n|--classnames)'{-n,--classnames}'[comma-separated list of Apex test class names to execute]' \
- '(-s|--suitenames)'{-s,--suitenames}'[comma-separated list of Apex test suite names to execute]' \
- '(-c|--codecoverage)'{-c,--codecoverage}'[retrieve code coverage results]' \
- '(-d|--outputdir)'{-d,--outputdir}'[directory to store test run files]:file:_files' \
- '(-l|--testlevel)'{-l,--testlevel}'[testlevel enum value (RunLocalTests,RunAllTestsInOrg,RunSpecifiedTests)]' \
- '(-r|--resultformat)'{-r,--resultformat}'[test result format emitted to stdout; --json flag overrides this parameter (human*,tap,junit,json)]' \
- '(-w|--wait)'{-w,--wait}'[the streaming client socket timeout (in minutes) (default:6, min:2)]' \
- '(--precompilewait)--precompilewait[how long to wait (in minutes) for Apex pre-compilation (default:3, min:3)]' \
- '(-y|--synchronous)'{-y,--synchronous}'[run tests from a single class synchronously]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- '(--verbose)--verbose[display Apex test processing details]' \
- )
- ;;
- force:lightning:test:run)
- _command_args=(
- '(-a|--appname)'{-a,--appname}'[name of your Lightning test application]' \
- '(-d|--outputdir)'{-d,--outputdir}'[directory path to store test run artifacts: for example, log files and test results]:file:_files' \
- '(-r|--resultformat)'{-r,--resultformat}'[test result format emitted to stdout; --json flag overrides this parameter (human*,tap,junit,json)]' \
- '(-f|--configfile)'{-f,--configfile}'[path to config file for the test]:file:_files' \
- '(-o|--leavebrowseropen)'{-o,--leavebrowseropen}'[leave browser open]' \
- '(-t|--timeout)'{-t,--timeout}'[time (ms) to wait for results element in dom (default:60000)]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:data:tree:export)
- _command_args=(
- '(-q|--query)'{-q,--query}'[soql query, or filepath of file containing a soql query, to retrieve records]:file:_files' \
- '(-p|--plan)'{-p,--plan}'[generate multiple sObject tree files and a plan definition file for aggregated import]' \
- '(-x|--prefix)'{-x,--prefix}'[prefix of generated files]' \
- '(-d|--outputdir)'{-d,--outputdir}'[directory to store files]:file:_files' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:data:tree:import)
- _command_args=(
- '(-f|--sobjecttreefiles)'{-f,--sobjecttreefiles}'[comma-delimited, ordered paths of json files containing collection of record trees to insert]:file:_files' \
- '(-p|--plan)'{-p,--plan}'[path to plan to insert multiple data files that have master-detail relationships]:file:_files' \
- '(-c|--contenttype)'{-c,--contenttype}'[if data file extension is not .json, provide content type (applies to all files)]' \
- '(--confighelp)--confighelp[display schema information for the --plan configuration file to stdout; if you use this option, all other options except --json are ignored]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:apex:trigger:create)
- _command_args=(
- '(-n|--triggername)'{-n,--triggername}'[name of the generated Apex trigger]' \
- '(-t|--template)'{-t,--template}'[template to use for file creation (ApexTrigger*)]' \
- '(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
- '(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
- '(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
- '(-s|--sobject)'{-s,--sobject}'[sObject to create a trigger on (SOBJECT*)]' \
- '(-e|--triggerevents)'{-e,--triggerevents}'[events that fire the trigger (before insert*,before upsert,before delete,after insert,after upsert,after delete,after undelete)]' \
- '(--json)--json[JSON output]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package:uninstall)
- _command_args=(
- '(-i|--id)'{-i,--id}'[ID of the package to uninstall (starts with 04t)]' \
- '(-w|--wait)'{-w,--wait}'[number of minutes to wait for uninstall status]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package:uninstall:get)
- _command_args=(
- '(-i|--requestid)'{-i,--requestid}'[ID of the package uninstall request you want to check]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package2:update)
- _command_args=(
- '(-i|--package2id)'{-i,--package2id}'[id of the package (starts with 0Ho)]' \
- '(-n|--name)'{-n,--name}'[package name]' \
- '(-d|--description)'{-d,--description}'[package description]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:project:upgrade)
- _command_args=(
- '(-f|--forceupgrade)'{-f,--forceupgrade}'[run all upgrades even if project has already been upgraded]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package1:version:create)
- _command_args=(
- '(-i|--packageid)'{-i,--packageid}'[ID of the metadata package (starts with 033) of which you’re creating a new version]' \
- '(-n|--name)'{-n,--name}'[package version name]' \
- '(-d|--description)'{-d,--description}'[package version description]' \
- '(-v|--version)'{-v,--version}'[package version in major.minor format, for example, 3.2]' \
- '(-m|--managedreleased)'{-m,--managedreleased}'[create a managed package version]' \
- '(-r|--releasenotesurl)'{-r,--releasenotesurl}'[release notes URL]' \
- '(-p|--postinstallurl)'{-p,--postinstallurl}'[post install URL]' \
- '(-k|--installationkey)'{-k,--installationkey}'[installation key for key-protected package (default: null)]' \
- '(-w|--wait)'{-w,--wait}'[minutes to wait for the package version to be created (default: 2 minutes)]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package2:version:create)
- _command_args=(
- '(-i|--package2id)'{-i,--package2id}'[ID of the parent package (starts with 0Ho)]' \
- '(-d|--directory)'{-d,--directory}'[path to directory that contains the contents of the package version]:file:_files' \
- '(-b|--branch)'{-b,--branch}'[the package version’s branch]' \
- '(-t|--tag)'{-t,--tag}'[the package version’s tag]' \
- '(-k|--installationkey)'{-k,--installationkey}'[installation key for key-protected package (default: null)]' \
- '(-p|--preserve)'{-p,--preserve}'[temp files are preserved that would otherwise be deleted]' \
- '(-j|--validateschema)'{-j,--validateschema}'[sfdx-project.json is validated against JSON schema]' \
- '(-w|--wait)'{-w,--wait}'[minutes to wait for the package version to be created (default:0)]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package1:version:create:get)
- _command_args=(
- '(-i|--requestid)'{-i,--requestid}'[PackageUploadRequest ID]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package2:version:create:get)
- _command_args=(
- '(-i|--package2createrequestid)'{-i,--package2createrequestid}'[package2 version creation request ID (starts with 08c)]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package2:version:create:list)
- _command_args=(
- '(-c|--createdlastdays)'{-c,--createdlastdays}'[created in the last specified number of days (starting at 00:00:00 of first day to now; 0 for today)]' \
- '(-s|--status)'{-s,--status}'[filter the list by version creation request status (Queued,InProgress,Success,Error)]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package1:version:display)
- _command_args=(
- '(-i|--packageversionid)'{-i,--packageversionid}'[metadata package version ID (starts with 04t)]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package2:version:get)
- _command_args=(
- '(-i|--package2versionid)'{-i,--package2versionid}'[the package version ID (starts with 05i)]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package1:version:list)
- _command_args=(
- '(-i|--packageid)'{-i,--packageid}'[metadata package ID (starts with 033)]' \
- '(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:package2:version:list)
- _command_args=(
- '(-c|--createdlastdays)'{-c,--createdlastdays}'[created in the last specified number of days (starting at 00:00:00 of first day to now; 0 for today)]' \
- '(-m|--modifiedlastdays)'{-m,--modifiedlastdays}'[list items modified in the specified last number of days (starting at 00:00:00 of first day to now; 0 for today)]' \
- '(-i|--package2ids)'{-i,--package2ids}'[filter results on specified comma-delimited package2 ids (start with 0Ho)]' \
- '(-r|--released)'{-r,--released}'[display released versions only]' \
- '(-o|--orderby)'{-o,--orderby}'[order by the specified package2 version fields]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--concise)--concise[display limited package2 version details]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- '(--verbose)--verbose[display extended package2 versions detail]' \
- )
- ;;
- force:package2:version:update)
- _command_args=(
- '(-i|--package2versionid)'{-i,--package2versionid}'[the package version ID (starts with 05i)]' \
- '(-n|--name)'{-n,--name}'[the package version name]' \
- '(-d|--description)'{-d,--description}'[the package version description]' \
- '(-b|--branch)'{-b,--branch}'[the package version branch]' \
- '(-t|--tag)'{-t,--tag}'[the package version tag]' \
- '(-k|--installationkey)'{-k,--installationkey}'[installation key for key-protected package (default: null)]' \
- '(-s|--setasreleased)'{-s,--setasreleased}'[set the package version as released (can’t be undone)]' \
- '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- force:auth:web:login)
- _command_args=(
- '(-i|--clientid)'{-i,--clientid}'[OAuth client ID (sometimes called the consumer key)]' \
- '(-r|--instanceurl)'{-r,--instanceurl}'[the login URL of the instance the org lives on]' \
- '(-d|--setdefaultdevhubusername)'{-d,--setdefaultdevhubusername}'[set the authenticated org as the default dev hub org for scratch org creation]' \
- '(-s|--setdefaultusername)'{-s,--setdefaultusername}'[set the authenticated org as the default username that all commands run against]' \
- '(-a|--setalias)'{-a,--setalias}'[set an alias for the authenticated org]' \
- '(--disablemasking)--disablemasking[disable masking of user input (for use with problematic terminals)]' \
- '(--json)--json[format output as json]' \
- '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
- )
- ;;
- esac
-
-_arguments \
- $_command_args \
- && return 0
diff --git a/src/_stack b/src/_stack
deleted file mode 100644
index 847328c..0000000
--- a/src/_stack
+++ /dev/null
@@ -1,134 +0,0 @@
-#compdef stack
-# ------------------------------------------------------------------------------
-# Copyright (c) 2015 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 stack (https://github.com/commercialhaskell/stack).
-#
-# ------------------------------------------------------------------------------
-# Authors
-# ------------------------------------------------------------------------------
-#
-# * Toshiki Teramura <toshiki.teramura@gmail.com>
-# * Nikita Ursol <nikita20001116@gmail.com>
-#
-# ------------------------------------------------------------------------------
-
-_stack () {
- _arguments \
- --help'[show usage information]' \
- --version'[show version]' \
- --numeric-version'[show only version number]' \
- --hpack-numeric-version"[show only hpack's version number]" \
- '--docker[enable using a Docker container, run "stack --docker-help" for details]' \
- '--no-docker[disable using a Docker container, run "stack --docker-help" for details]' \
- '--nix[enable use of a Nix-shell, run "stack --nix-help" for details]' \
- '--no-nix[disable use of a Nix-shell, run "stack --nix-help" for details]' \
- --verbosity'[verbosity: silent, error, warn, info, debug]' \
- {-v,--verbose}'[enable verbose mode: verbosity level "debug"]' \
- --silent'[enable silent mode: verbosity level "silent"]' \
- --time-in-log'[enable inclusion of timings in logs, to use diff with logs]' \
- --no-time-in-log'[disable inclusion of timings in logs, to use diff with logs]' \
- --stack-root'[absolute path to the global stack root directory]' \
- --work-dir'[relative path of work directory]' \
- --system-ghc'[enable using the system installed GHC if available and a matching version]' \
- --no-system-ghc'[disable using the system installed GHC if available and a matching version]' \
- --install-ghc'[enable downloading and installing GHC if necessary]' \
- --no-install-ghc'[disable downloading and installing GHC if necessary]' \
- --arch'[system architecture, e.g. i386, x86_64]' \
- --ghc-variant'[specialized GHC variant, e.g. integersimple (incompatible with --system-ghc)]' \
- --ghc-build'[specialized GHC build, e.g. "gmp4" or "standard" (usually auto-detected)]' \
- {-j,--jobs}'[number of concurrent jobs to run]' \
- --extra-include-dirs'[extra directories to check for C header files]' \
- --extra-lib-dirs'[extra directories to check for libraries]' \
- --with-gcc'[use custom path to gcc executable]' \
- --with-hpack'[use custom path to hpack executable]' \
- --skip-ghc-check'[enable skipping the GHC version and architecture check]' \
- --no-skip-ghc-check'[disable skipping the GHC version and architecture check]' \
- --skip-msys'[enable skipping the local MSYS installation (Windows only)]' \
- --no-skip-msys'[disable skipping the local MSYS installation (Windows only)]' \
- --local-bin-path'[install binaries to specified location]' \
- --setup-info-yaml'[alternate URL or relative / absolute path for stack dependencies]' \
- --modify-code-page'[enable setting the codepage to support UTF-8 (Windows only)]' \
- --no-modify-code-page'[disable setting the codepage to support UTF-8 (Windows only)]' \
- --allow-different-user'[enable permission for non-owners to use a stack installation (POSIX only)]' \
- --no-allow-different-user'[disable permission for non-owners to use a stack installation (POSIX only)]' \
- --dump-logs'[enable dump the build output logs for local packages to the console]' \
- --no-dump-logs'[disable dump the build output logs for local packages to the console]' \
- {--color,--colour}'[specify when to use color in output; accepts "always", "never", "auto"]' \
- --resolver'[override resolver in project file]' \
- --terminal'[enable overriding terminal detection in the case of running in a false terminal]' \
- --no-terminal'[disable overriding terminal detection in the case of running in a false terminal]' \
- {--stack-colors,--stack-colours}"[specify stack's output styles]" \
- --terminal-width'[specify the width of the terminal, used for pretty-print messages]' \
- --stack-yaml'[override project stack.yaml file]' \
- --lock-file'[specify how to interact with lock files.]' \
- '*: :__stack_modes'
-}
-
-__stack_modes () {
- _values \
- 'subcommand' \
- 'build[build the project(s) in this directory/configuration]' \
- 'install[build executables and install to a user path]' \
- 'test[build and test the project(s) in this directory/configuration]' \
- 'bench[build and benchmark the project(s) in this directory/configuration]' \
- 'haddock[generate haddocks for the project(s) in this directory/configuration]' \
- 'new[create a brand new project]' \
- 'templates[show how to find templates available for "stack new".]' \
- 'init[create stack project config from cabal or hpack package specifications]' \
- 'setup[get the appropriate ghc for your project]' \
- 'path[print out handy path information]' \
- "ls[list command. (supports snapshots, dependencies and stack's styles)]" \
- 'unpack[unpack one or more packages locally]' \
- 'update[update the package index]' \
- 'upgrade[upgrade to the latest stack]' \
- 'upload[upload a package to Hackage]' \
- 'sdist[create source distribution tarballs]' \
- 'dot[visualize your projects dependency graph using Graphviz dot]' \
- 'ghc[run ghc]' \
- 'hoogle[run hoogle, the Haskell API search engine.]' \
- 'exec[execute a command]' \
- 'run[build and run an executable.]' \
- 'ghci[run ghci in the context of package(s) (experimental)]' \
- "repl[run ghci in the context of package(s) (experimental) (alias for 'ghci')]" \
- 'runghc[run runghc]' \
- "runhaskell[run runghc (alias for 'runghc')]" \
- 'script[run a Stack Script]' \
- 'eval[evaluate some haskell code inline.]' \
- 'clean[delete build artefacts for the project packages.]' \
- 'purge[delete the project stack working directories.]' \
- 'query[query general build information (experimental)]' \
- 'ide[ide-specific commands]' \
- 'docker[subcommands specific to Docker use]' \
- 'config[subcommands for accessing and modifying configuration values]' \
- 'hpc[subcommands specific to Haskell Program Coverage]'
-
-}
-
-_stack "$@"
diff --git a/src/_supervisorctl b/src/_supervisorctl
deleted file mode 100644
index 4c5c42b..0000000
--- a/src/_supervisorctl
+++ /dev/null
@@ -1,237 +0,0 @@
-#compdef supervisorctl
-# ------------------------------------------------------------------------------
-# Copyright (c) 2015 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 supervisorctl 4.2.5 from Supervisord (https://github.com/Supervisor/supervisor)
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Matt Black (https://github.com/mafrosis)
-# * dongweiming (https://github.com/dongweiming)
-# * Shohei Yoshida (https://github.com/syohex)
-#
-# ------------------------------------------------------------------------------
-
-_supervisorctl() {
- local -a procs
- typeset -A opt_args
- local context state line
- local curcontext="$curcontext"
- local ret=1
-
- _arguments -C \
- {--configuration,-c}='[configuration file path (default /etc/supervisor.conf)]:filename:_files' \
- '(- *)'{--help,-h}'[print usage message and exit]:' \
- {--interactive,-i}'[start an interactive shell after executing commands]' \
- {--serverurl,-s}='[URL on which supervisord server is listening (default "http://localhost:9001")]:url:_urls' \
- {--username,-u}='[username to use for authentication with server]:username:_users' \
- {--password,-p}='[password to use for authentication with server]:password' \
- {--history-file,-r}'[keep a readline history (if readline is available)]:filename:_files' \
- '1: :_supervisorctl_subcommands' \
- '*:: :->subcmds' && ret=0
-
- case $state in
- (subcmds)
- case "$words[1]" in
- (help)
- _arguments \
- '1: :_supervisorctl_subcommands' \
- && ret=0
- ;;
- (add|remove)
- _arguments \
- '1: :_supervisorctl_procs_groups' \
- && ret=0
- ;;
- (fg)
- _arguments \
- '1: :_supervisorctl_processes' \
- && ret=0
- ;;
- (pid|clear)
- _arguments \
- '*: :_supervisorctl_processes_all' \
- && ret=0
- ;;
- (restart|status)
- _arguments \
- '*:process_or_group:_supervisorctl_procs_and_group_prefixes' \
- && ret=0
- ;;
- (update)
- _arguments \
- '*: :_supervisorctl_groups' \
- && ret=0
- ;;
- (stop)
- _arguments \
- '*:running process or group:_supervisorctl_running_procs' \
- && ret=0
- ;;
- (start)
- _arguments \
- '*:stopped process or group:_supervisorctl_stopped_procs' \
- && ret=0
- ;;
- (signal)
- _arguments \
- '1:signal:_signals -s' \
- '*:running process or group:_supervisorctl_running_procs' \
- && ret=0
- ;;
- (tail)
- _arguments \
- '-f[Continuous tail of named process stdout]' \
- '-[last N *bytes* of process stdout]:number' \
- '1: :_supervisorctl_processes' \
- '2:output:(stdout stderr)' \
- && ret=0
- ;;
- (maintail)
- _arguments \
- '-f[Continuous tail of named process stdout]' \
- '-[last N *bytes* of process stdout]:number' \
- && ret=0
- ;;
- esac
- esac
-
- return 0
-}
-
-(( $+functions[_supervisorctl_subcommands] )) ||
-_supervisorctl_subcommands() {
- local -a commands=(
- 'add:Activates any updates in config for process/group'
- 'avail:Display all configured processes'
- 'clear:Clear single/multiple/all process log files'
- 'exit:Exit the supervisor shell'
- 'fg:Connect to a process in foreground mode'
- 'maintail:tail of supervisor main log file'
- 'open:Connect to a remote supervisord process. (for UNIX domain socket, use unix:///socket/path)'
- 'pid:Get the PID of process/supervisord'
- 'quit:Exit the supervisor shell'
- 'reload:Restart the remote supervisord'
- 'remove:Removes process/group from active config'
- "reread:Reload the daemon's configuration files"
- 'restart:Restart process, group or all'
- 'signal:Send signal to a process'
- 'shutdown:Shut the remote supervisord down'
- 'start:Start process, group or all'
- 'status:Get process/group status info'
- 'stop:Stop process, group or all'
- 'tail:tail of process stdout'
- 'update:Reload config and add/remove as necessary'
- 'version:Show the version of the remote supervisord process'
- 'help:Show help'
- )
-
- _describe -t commands 'command' commands "$@"
-}
-
-(( $+functions[_supervisorctl_processes] )) ||
-_supervisorctl_processes() {
- local -a procs
- procs=(${(f)"$(_call_program processes supervisorctl avail | awk '{gsub(":","\\:", $1); print $1 }')"})
- if [[ "$1" = 'all' ]]; then
- procs+=(all)
- fi
- _describe 'processes' procs
-}
-
-(( $+functions[_supervisorctl_processes_all] )) ||
-_supervisorctl_processes_all() {
- _supervisorctl_processes all
-}
-
-(( $+functions[_supervisorctl_procs_groups] )) ||
-_supervisorctl_procs_groups() {
- local -a procs
- procs=(${(f)"$(_call_program processes supervisorctl status \
- | awk '{n=$1;gsub(":","\\:",n); printf "%s\n%s\n",n,substr($1,1,index($1,":")-1)}' \
- | uniq)"})
- _describe 'process and groups' procs
-}
-
-(( $+functions[_supervisorctl_procs_and_group_prefixes] )) ||
-_supervisorctl_procs_and_group_prefixes() {
- _supervisorctl_collect_procs '.'
-}
-
-(( $+functions[_supervisorctl_running_procs] )) ||
-_supervisorctl_running_procs() {
- _supervisorctl_collect_procs 'RUNNING'
-}
-
-(( $+functions[_supervisorctl_stopped_procs] )) ||
-_supervisorctl_stopped_procs() {
- _supervisorctl_collect_procs 'STOPPED'
-}
-
-(( $+functions[_supervisorctl_collect_procs] )) ||
-_supervisorctl_collect_procs() {
- if (( $words[(I)all] )); then
- return
- fi
-
- local pattern=$1
-
- local -a procs
- procs=(${(f)"$(_call_program processes supervisorctl status \
- | awk "/$pattern/"'{n=$1;gsub(":","\\:",n); printf "%s\n%s\\:\n",n,substr($1,1,index($1,":")-1)}' \
- | uniq)"})
- procs+=(all)
- _describe 'stooped processes or groups' procs
-}
-
-(( $+functions[_supervisorctl_groups] )) ||
-_supervisorctl_groups() {
- if (( $words[(I)all] )); then
- return
- fi
-
- local -a groups
- groups=(${(f)"$(_call_program processes supervisorctl status \
- | awk '{printf "%s\n",substr($1,1,index($1,":")-1)}' \
- | uniq)"})
- groups+=(all)
- _describe 'groups' groups
-}
-
-_supervisorctl "$@"
-
-# 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
diff --git a/src/_supervisord b/src/_supervisord
index 98210a0..50f9c0f 100644
--- a/src/_supervisord
+++ b/src/_supervisord
@@ -1,4 +1,4 @@
-#compdef supervisord
+#compdef supervisord supervisorctl pidproxy
# ------------------------------------------------------------------------------
# Copyright (c) 2023 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
@@ -25,36 +25,237 @@
# Description
# -----------
#
-# Completion script for supervisord. (https://github.com/Supervisor/supervisor)
+# Completion script for supervisord tools v4.3.0 (https://github.com/Supervisor/supervisor)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
+# * Matt Black (https://github.com/mafrosis)
+# * dongweiming (https://github.com/dongweiming)
# * Shohei YOSHIDA (https://github.com/syohex)
#
# ------------------------------------------------------------------------------
-_arguments \
- '(-c --configuration)'{-c,--configuration}'[configuration file path]:config file:_files' \
- '(-n --nodaemon)'{-n,--nodaemon}'[run in the foreground]' \
- '(-s --silent)'{-s,--silent}'[no longs to stdout]' \
- '(- *)'{-h,--help}'[print this usage message and exit]' \
- '(- *)'{-v,--version}'[print supervisord version number and exit]' \
- '(-u --user)'{-u,--user}'[run supervisord as given user]:user:_users' \
- '(-m --umask)'{-m,--umask}'[use given umask for daemon subprocess]:umask' \
- '(-d --directory)'{-d,--directory}'[directory to chdir to when daemonized]:directory:_files -/' \
- '(-l --logfile)'{-l,--logfile}'[logfile path]:logfile:_files' \
- '(-y --logfile_maxbytes)'{-y,--logfile_maxbytes}'[limit the max size of logfile]:max bytes' \
- '(-z --logfile_backups)'{-z,--logfile_backups}'[number of backups to keep when max bytes reached]:number of backups' \
- '(-e --loglevel)'{-e,--loglevel}'[log level]:level:(debug info warn error critical)' \
- '(-j --pidfile)'{-j,--pidfile}'[pid file path]:pid file:_files' \
- '(-i --identifier)'{-i,--identifier}'[identifier used for this instance of supervisord]:id' \
- '(-q --childlogdir)'{-q,--childlogdir}'[the log directory for child process logs]:log dir:_files -/' \
- '(-k --nocleanup)'{-k,--nocleanup}'[prevent the process from performing cleanup]' \
- '(-a --minfds)'{-m,--minfds}'[the minimum number of file descriptors for start success]:min fds' \
- '(-t --strip_ansi)'{-t,--strip_ansi}'[strip ansi escape codes from process output]' \
- '--profile_options[profile options]:profile option:_values -s , "field" cumulative calls callers'
+_supervisorctl() {
+ local -a procs
+ typeset -A opt_args
+ local context state line
+ local curcontext="$curcontext"
+ local ret=1
+
+ _arguments -C \
+ {--configuration,-c}='[configuration file path (default /etc/supervisor.conf)]:filename:_files' \
+ '(- *)'{--help,-h}'[print usage message and exit]:' \
+ {--interactive,-i}'[start an interactive shell after executing commands]' \
+ {--serverurl,-s}='[URL on which supervisord server is listening (default "http://localhost:9001")]:url:_urls' \
+ {--username,-u}='[username to use for authentication with server]:username:_users' \
+ {--password,-p}='[password to use for authentication with server]:password' \
+ {--history-file,-r}'[keep a readline history (if readline is available)]:filename:_files' \
+ '1: :_supervisorctl_subcommands' \
+ '*:: :->subcmds' && ret=0
+
+ case $state in
+ (subcmds)
+ case "$words[1]" in
+ (help)
+ _arguments \
+ '1: :_supervisorctl_subcommands' \
+ && ret=0
+ ;;
+ (add|remove)
+ _arguments \
+ '1: :_supervisorctl_procs_groups' \
+ && ret=0
+ ;;
+ (fg)
+ _arguments \
+ '1: :_supervisorctl_processes' \
+ && ret=0
+ ;;
+ (pid|clear)
+ _arguments \
+ '*: :_supervisorctl_processes_all' \
+ && ret=0
+ ;;
+ (restart|status)
+ _arguments \
+ '*:process_or_group:_supervisorctl_procs_and_group_prefixes' \
+ && ret=0
+ ;;
+ (update)
+ _arguments \
+ '*: :_supervisorctl_groups' \
+ && ret=0
+ ;;
+ (stop)
+ _arguments \
+ '*:running process or group:_supervisorctl_running_procs' \
+ && ret=0
+ ;;
+ (start)
+ _arguments \
+ '*:stopped process or group:_supervisorctl_stopped_procs' \
+ && ret=0
+ ;;
+ (signal)
+ _arguments \
+ '1:signal:_signals -s' \
+ '*:running process or group:_supervisorctl_running_procs' \
+ && ret=0
+ ;;
+ (tail)
+ _arguments \
+ '-f[Continuous tail of named process stdout]' \
+ '-[last N *bytes* of process stdout]:number' \
+ '1: :_supervisorctl_processes' \
+ '2:output:(stdout stderr)' \
+ && ret=0
+ ;;
+ (maintail)
+ _arguments \
+ '-f[Continuous tail of named process stdout]' \
+ '-[last N *bytes* of process stdout]:number' \
+ && ret=0
+ ;;
+ esac
+ esac
+
+ return 0
+}
+
+(( $+functions[_supervisorctl_subcommands] )) ||
+_supervisorctl_subcommands() {
+ local -a commands=(
+ 'add:Activates any updates in config for process/group'
+ 'avail:Display all configured processes'
+ 'clear:Clear single/multiple/all process log files'
+ 'exit:Exit the supervisor shell'
+ 'fg:Connect to a process in foreground mode'
+ 'maintail:tail of supervisor main log file'
+ 'open:Connect to a remote supervisord process. (for UNIX domain socket, use unix:///socket/path)'
+ 'pid:Get the PID of process/supervisord'
+ 'quit:Exit the supervisor shell'
+ 'reload:Restart the remote supervisord'
+ 'remove:Removes process/group from active config'
+ "reread:Reload the daemon's configuration files"
+ 'restart:Restart process, group or all'
+ 'signal:Send signal to a process'
+ 'shutdown:Shut the remote supervisord down'
+ 'start:Start process, group or all'
+ 'status:Get process/group status info'
+ 'stop:Stop process, group or all'
+ 'tail:tail of process stdout'
+ 'update:Reload config and add/remove as necessary'
+ 'version:Show the version of the remote supervisord process'
+ 'help:Show help'
+ )
+
+ _describe -t commands 'command' commands "$@"
+}
+
+(( $+functions[_supervisorctl_processes] )) ||
+_supervisorctl_processes() {
+ local -a procs
+ procs=(${(f)"$(_call_program processes supervisorctl avail | awk '{gsub(":","\\:", $1); print $1 }')"})
+ if [[ "$1" = 'all' ]]; then
+ procs+=(all)
+ fi
+ _describe 'processes' procs
+}
+
+(( $+functions[_supervisorctl_processes_all] )) ||
+_supervisorctl_processes_all() {
+ _supervisorctl_processes all
+}
+
+(( $+functions[_supervisorctl_procs_groups] )) ||
+_supervisorctl_procs_groups() {
+ local -a procs
+ procs=(${(f)"$(_call_program processes supervisorctl status \
+ | awk '{n=$1;gsub(":","\\:",n); printf "%s\n%s\n",n,substr($1,1,index($1,":")-1)}' \
+ | uniq)"})
+ _describe 'process and groups' procs
+}
+
+(( $+functions[_supervisorctl_procs_and_group_prefixes] )) ||
+_supervisorctl_procs_and_group_prefixes() {
+ _supervisorctl_collect_procs '.'
+}
+
+(( $+functions[_supervisorctl_running_procs] )) ||
+_supervisorctl_running_procs() {
+ _supervisorctl_collect_procs 'RUNNING'
+}
+
+(( $+functions[_supervisorctl_stopped_procs] )) ||
+_supervisorctl_stopped_procs() {
+ _supervisorctl_collect_procs 'STOPPED'
+}
+
+(( $+functions[_supervisorctl_collect_procs] )) ||
+_supervisorctl_collect_procs() {
+ if (( $words[(I)all] )); then
+ return
+ fi
+
+ local pattern=$1
+
+ local -a procs
+ procs=(${(f)"$(_call_program processes supervisorctl status \
+ | awk "/$pattern/"'{n=$1;gsub(":","\\:",n); printf "%s\n%s\\:\n",n,substr($1,1,index($1,":")-1)}' \
+ | uniq)"})
+ procs+=(all)
+ _describe 'stooped processes or groups' procs
+}
+
+(( $+functions[_supervisorctl_groups] )) ||
+_supervisorctl_groups() {
+ if (( $words[(I)all] )); then
+ return
+ fi
+
+ local -a groups
+ groups=(${(f)"$(_call_program processes supervisorctl status \
+ | awk '{printf "%s\n",substr($1,1,index($1,":")-1)}' \
+ | uniq)"})
+ groups+=(all)
+ _describe 'groups' groups
+}
+
+case $service in
+ (supervisord)
+ _arguments \
+ '(-c --configuration)'{-c,--configuration}'[configuration file path]:config file:_files' \
+ '(-n --nodaemon)'{-n,--nodaemon}'[run in the foreground]' \
+ '(-s --silent)'{-s,--silent}'[no longs to stdout]' \
+ '(- *)'{-h,--help}'[print this usage message and exit]' \
+ '(- *)'{-v,--version}'[print supervisord version number and exit]' \
+ '(-u --user)'{-u,--user}'[run supervisord as given user]:user:_users' \
+ '(-m --umask)'{-m,--umask}'[use given umask for daemon subprocess]:umask' \
+ '(-d --directory)'{-d,--directory}'[directory to chdir to when daemonized]:directory:_files -/' \
+ '(-l --logfile)'{-l,--logfile}'[logfile path]:logfile:_files' \
+ '(-y --logfile_maxbytes)'{-y,--logfile_maxbytes}'[limit the max size of logfile]:max bytes' \
+ '(-z --logfile_backups)'{-z,--logfile_backups}'[number of backups to keep when max bytes reached]:number of backups' \
+ '(-e --loglevel)'{-e,--loglevel}'[log level]:level:(debug info warn error critical)' \
+ '(-j --pidfile)'{-j,--pidfile}'[pid file path]:pid file:_files' \
+ '(-i --identifier)'{-i,--identifier}'[identifier used for this instance of supervisord]:id' \
+ '(-q --childlogdir)'{-q,--childlogdir}'[the log directory for child process logs]:log dir:_files -/' \
+ '(-k --nocleanup)'{-k,--nocleanup}'[prevent the process from performing cleanup]' \
+ '(-a --minfds)'{-m,--minfds}'[the minimum number of file descriptors for start success]:min fds' \
+ '(-t --strip_ansi)'{-t,--strip_ansi}'[strip ansi escape codes from process output]' \
+ '--profile_options[profile options]:profile option:_values -s , "field" cumulative calls callers'
+ ;;
+ (supervisorctl)
+ _supervisorctl "$@"
+ ;;
+ (pidproxy)
+ _arguments \
+ '1:pid_file:_files' \
+ '2:cmd:_command_names -e' \
+ '*::argument:_normal'
+ ;;
+esac
# Local Variables:
# mode: Shell-Script
diff --git a/src/_svm b/src/_svm
index 7782397..1fc6475 100644
--- a/src/_svm
+++ b/src/_svm
@@ -28,7 +28,7 @@
# Description
# -----------
#
-# Completion script for svm (https://github.com/yuroyoro/svm)
+# Completion script for svm, Scala2 version manager (https://github.com/yuroyoro/svm)
#
# ------------------------------------------------------------------------------
# Authors
@@ -38,130 +38,120 @@
#
# ------------------------------------------------------------------------------
-local context curcontext="$curcontext" state line ret=1
-typeset -A opt_args
+_svm() {
+ local context curcontext="$curcontext" state line ret=1
+ typeset -A opt_args
+ _arguments -C \
+ '(- *)-h[show this usage information]' \
+ '-c[show the currently use scala version]' \
+ "-l[show the scala version installed in svm_path(default is ${HOME}/.svm)]" \
+ '-v[show the available scala version not installed]' \
+ '-i[install specific scala version]: :_svm_completion_not_installed_scala_versions' \
+ '-r[uninstall specific scala version and remove their sources]: :_svm_installed_scala_versions' \
+ '(-s -u)'{-s,-u}'[setup to use a specific scala version]: :_svm_not_selected_scala_versions' \
+ '1: :_svm_commands' \
+ '*:: :->args' && ret=0
-local -a _1st_arguments
-_1st_arguments=(
- 'help:show this usage information'
- 'current:show the currently use scala version'
- "list:show the scala version installed in svm_path(default is ${HOME}/.svm)"
- "versions:show the available scala version not installed"
- 'install:install specific scala version'
- 'remove:uninstall specific scala version and remove their sources'
- 'switch:setup to use a specific scala version'
- 'update-latest:install or update nightly build scala version'
- 'latest:setup to use nightly build scala version'
- 'stable:setup to use stable(x.x.x.final) scala version'
- 'self-update:update svm itself'
-)
+ case $state in
+ (args)
+ # scala version number
+ case $words[1] in
+ (install)
+ # install not installed version
+ _arguments \
+ '--docs[download scala-devel-docs]' \
+ '--sources[download scala-sources]' \
+ '1: :_svm_not_installed_scala_versions' \
+ && ret=0
+ ;;
+ (update-latest)
+ # update nightly build scala version
+ _arguments \
+ '--docs[download scala-devel-docs]' \
+ '--sources[download scala-sources]' \
+ && ret=0
+ ;;
+ (remove|uninstall)
+ # remove installed version
+ _arguments \
+ '1: :_svm_installed_scala_versions' \
+ && ret=0
+ ;;
+ (switch|use)
+ # use installed version
+ _arguments \
+ '1: :_svm_not_selected_scala_versions' \
+ && ret=0
+ ;;
+ esac
-_arguments -C \
- '(-)-h[show this usage information]' \
- '-c[show the currently use scala version]' \
- "-l[show the scala version installed in svm_path(default is ${HOME}/.svm)]" \
- '-v[show the available scala version not installed]' \
- '-i[install specific scala version]: :_svm_completion_not_installed_scala_versions' \
- '-r[uninstall specific scala version and remove their sources]: :_svm_completion_installed_scala_versions' \
- '(-s -u)'{-s,-u}'[setup to use a specific scala version]: :_svm_completion_not_selected_scala_versions' \
- '1: :->cmds' \
- '*:: :->args' && ret=0
+ ;; # end args
+ esac
+ return ret
+}
-# installed scala versions
-(( $+functions[_svm_completion_installed_scala_versions] )) ||
-_svm_completion_installed_scala_versions() {
- local -a _installed_versions
- _current_version="${$(_call_program installed svm current)#currently version is[[:space:]]*}"
+(( $+functions[_svm_commands] )) ||
+_svm_commands() {
+ case $PREFIX in
+ (u*)
+ local -a synonyms=(
+ 'uninstall:uninstall specific scala version and remove their sources'
+ 'use:setup to use a specific scala version'
+ 'update-latest:install or update nightly build scala version'
+ )
- # collect lines starts with digit
- _installed_versions=( ${(M)${(@f)"$(_call_program installed svm list)"}:#[[:digit:]]*} )
+ _describe -t actions 'svm actions' synonyms
+ ;;
+ (*)
+ local -a commands=(
+ 'help:show this usage information'
+ 'current:show the currently use scala version'
+ "list:show the scala version installed in svm_path(default is ${HOME}/.svm)"
+ "versions:show the available scala version not installed"
+ 'install:install specific scala version'
+ 'remove:uninstall specific scala version and remove their sources'
+ 'switch:setup to use a specific scala version'
+ 'update-latest:install or update nightly build scala version'
+ 'latest:setup to use nightly build scala version'
+ 'stable:setup to use stable(x.x.x.final) scala version'
+ 'self-update:update svm itself'
+ )
- _describe -t installed "installed versions" _installed_versions
+ _describe -t actions 'svm actions' commands
+ ;;
+ esac
}
-# installed and not selected scala versions
-(( $+functions[_svm_completion_not_selected_scala_versions] )) ||
-_svm_completion_not_selected_scala_versions() {
- local _current_version
- local -a _not_selected_versions
-
- _current_version="${$(_call_program installed svm current)#currently version is[[:space:]]*}"
-
+# installed scala versions
+(( $+functions[_svm_installed_scala_versions] )) ||
+_svm_installed_scala_versions() {
# collect lines starts with digit
- _not_selected_versions=( ${(M)${(@f)"$(_call_program installed svm list)"}:#[[:digit:]]*} )
+ local -a installed_versions=( ${(M)${(@f)"$(_call_program installed svm list)"}:#[[:digit:]]*} )
+ _describe -t installed "installed versions" installed_versions
+}
+
+# installed and not selected scala versions
+(( $+functions[_svm_not_selected_scala_versions] )) ||
+_svm_not_selected_scala_versions() {
+ local current_version=$(_call_program current svm current | sed 's/currently version is //')
+ local -a not_selected_versions=( ${(M)${(@f)"$(_call_program installed svm list)"}:#[[:digit:]]*} )
# remove current version
- _not_selected_versions=( ${_not_selected_versions:#$_current_version})
- _describe -t installed "not selected versions" _not_selected_versions
+ not_selected_versions=( ${not_selected_versions:#$current_version})
+ _describe -t installed "not selected versions" not_selected_versions
}
# not installed scala versions
-(( $+functions[_svm_completion_not_installed_scala_versions] )) ||
-_svm_completion_not_installed_scala_versions() {
- local -a _not_installed_versions
- # collect lines starts with digit
- _not_installed_versions=( ${(M)${(@f)"$(_call_program installed svm versions)"}:#[[:digit:]]*} )
+(( $+functions[_svm_not_installed_scala_versions] )) ||
+_svm_not_installed_scala_versions() {
+ local -a not_installed_versions=( ${(M)${(@f)"$(_call_program installed svm versions)"}:#[[:digit:]]*} )
- _describe -t notinstalled "not installed versions" _not_installed_versions
+ _describe -t notinstalled "not installed versions" not_installed_versions
}
-
-case $state in
- cmds)
- # action
- case $PREFIX in
- u*)
- # complete command synonyms
- local -a _synonym_arguments
- _synonym_arguments=(
- 'uninstall:uninstall specific scala version and remove their sources'
- 'use:setup to use a specific scala version'
- 'update-latest:install or update nightly build scala version'
- )
- _describe -t actions 'svm actions' _synonym_arguments && ret=0
- ;;
-
- *)
- _describe -t actions 'svm actions' _1st_arguments
- _svm_completion_not_selected_scala_versions && ret=0
- ;;
- esac
- ;; # end action
-
- args)
- # scala version number
- case $words[1] in
- (install)
- # install not installed version
- _arguments \
- '1: :_svm_completion_not_installed_scala_versions' \
- '--docs[download scala-devel-docs]' \
- '--sources[download scala-sources]' && ret=0
- ;;
- (update-latest)
- # update nightly build scala version
- _arguments \
- '--docs[download scala-devel-docs]' \
- '--sources[download scala-sources]' && ret=0
- ;;
- (remove|uninstall)
- # remove installed version
- _arguments \
- '1: :_svm_completion_installed_scala_versions' && ret=0
- ;;
- (switch|use)
- # use installed version
- _arguments \
- '1: :_svm_completion_not_selected_scala_versions' && ret=0
- ;;
- esac
-
- ;; # end args
-esac
-
-return ret
+_svm "$@"
# Local Variables:
# mode: Shell-Script
diff --git a/src/_textutil b/src/_textutil
index 938222e..abfc75c 100644
--- a/src/_textutil
+++ b/src/_textutil
@@ -39,15 +39,15 @@ local -a format=(txt html rtf rtfd doc docx wordml odt webarchive)
_arguments -S \
'-help[Show the usage information for the command and exit]' \
'-info[Display information about the specified files]' \
- '-convert[Convert the specified files to the indicated format and write]:format:'"($format)" \
- '-cat[Read the specified files, concatenate them in the indicated format]:format:'"($format)" \
+ '-convert[Convert the specified files to the indicated format and write]:format:(($format))' \
+ '-cat[Read the specified files, concatenate them in the indicated format]:format:(($format))' \
'-extension[Specify an extension to be used for output files]:ext' \
'-output[Specify the file name to be used for the first output file]:path:_files' \
'-stdin[Specify that input should be read from stdin rather than from files]' \
'-stdout[Specify that the first output file should go to stdout]' \
- '-encoding[Specify the encoding to be used for plain text or HTML output files]:encode' \
+ '-encoding[Specify the encoding to be used for plain text or HTML output files]:name' \
'-inputencoding[Force all plain text input files to be interpreted using the specified encoding]' \
- '-format[Force all input files to be interpreted using the indicated format]:format:'"($format)" \
+ '-format[Force all input files to be interpreted using the indicated format]:format:(($format))' \
'-font[Specify the name of the font to be used for converting plain to rich text]:font' \
'-fontsize[Specify the size in points of the font to be used for converting plain to rich text]:size' \
'-noload[Do not load subsidiary resources]' \
diff --git a/src/_tsx b/src/_tsx
new file mode 100644
index 0000000..e54c772
--- /dev/null
+++ b/src/_tsx
@@ -0,0 +1,58 @@
+#compdef tsx
+# ------------------------------------------------------------------------------
+# 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 tsx v4.21.0. (https://github.com/privatenumber/tsx)
+#
+# ------------------------------------------------------------------------------
+# Authors
+# -------
+#
+# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
+#
+# ------------------------------------------------------------------------------
+
+_tsx_completion() {
+ _arguments \
+ '(- *)'{-h,--help}'[show help]' \
+ '(- *)'{-v,--version}'[show version]' \
+ '--no-cache[disable caching]' \
+ '--tsconfig[custom tsconfig.json path]:path:_files -g "*.json"' \
+ '1: :(watch)'
+}
+
+_tsx() {
+ _alternative 'tsx: :_tsx_completion' 'node: :_node'
+}
+
+_tsx "$@"
+
+# 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
diff --git a/src/_zcash-cli b/src/_zcash-cli
index 5859b2f..6f21fe2 100644
--- a/src/_zcash-cli
+++ b/src/_zcash-cli
@@ -28,7 +28,7 @@
# Description
# -----------
#
-# Completion script for zcash-cli (https://z.cash).
+# Completion script for zcash-cli v6.10.0 (https://z.cash).
#
# ------------------------------------------------------------------------------
# Authors
@@ -38,139 +38,148 @@
#
# ------------------------------------------------------------------------------
-local state line curcontext="$curcontext" ret=1
+_zcash_cli_commands() {
+ local -a commands=(
+ 'addmultisigaddress:Add a nrequired-to-sign transparent multisignature address to the wallet'
+ 'addnode:Attempts to add or remove a node from the addnode list'
+ 'backupwallet:Safely copies current wallet file to destination filename'
+ 'clearbanned:Clear all banned IPs'
+ 'createmultisig:Creates a multi-signature address with n signature of m keys required'
+ 'decoderawtransaction:Return a JSON object representing the serialized, hex-encoded transaction'
+ 'decodescript:Decode a hex-encoded script'
+ 'disconnectnode:Immediately disconnects from the specified node'
+ 'dumpprivkey:Reveals the private key corresponding to "t-addr"'
+ 'encryptwallet:Encrypts the wallet with "passphrase"'
+ 'generate:Mine blocks immediately'
+ 'getaddednodeinfo:Returns information about the given added node, or all added nodes'
+ 'getaddressbalance:Returns the balance for addresses'
+ 'getaddressdeltas:Returns all changes for an address'
+ 'getaddressmempool:Returns all mempool deltas for an address'
+ 'getaddresstxids:Returns the txids for given transparent addresses within the given'
+ 'getaddressutxos:Returns all unspent outputs for an address'
+ "getbalance:Returns the wallet's available transparent balance"
+ 'getbestblockhash:Returns the hash of the best (tip) block in the longest block chain'
+ 'getblock:return data for the block'
+ 'getblockchaininfo:Returns an object containing various state info regarding block chain processing'
+ 'getblockcount:Returns the height of the most recent block in the best valid block chain'
+ 'getblockdeltas:Returns information about the given block and its transactions'
+ 'getblockhash:Returns hash of block in best-block-chain at index provided'
+ 'getblockhashes:Returns array of hashes of blocks within the timestamp range provided'
+ 'getblockheader:return block header'
+ 'getblocksubsidy:Returns block subsidy reward'
+ 'getblocktemplate:get block template'
+ 'getchaintips:Return information about all known tips in the block tree'
+ 'getconnectioncount:Returns the number of connections to other nodes'
+ 'getdeprecationinfo:Returns an object containing current version and deprecation block height'
+ 'getdifficulty:Returns the proof-of-work difficulty as a multiple of the minimum difficulty'
+ 'getexperimentalfeatures:Returns enabled experimental features'
+ 'getgenerate:Return if the server is set to generate coins or not'
+ 'getinfo:Returns an object containing various state info'
+ 'getlocalsolps:Returns the average local solutions per second since this node was started'
+ 'getmemoryinfo:Returns an object containing information about memory usage'
+ 'getmempoolinfo:Returns details on the active state of the TX memory pool'
+ 'getmininginfo:Returns a json object containing mining-related information'
+ 'getnettotals:Returns information about network traffic'
+ 'getnetworkinfo:Returns an object containing various state info regarding P2P networking'
+ 'getnetworksolps:Returns the estimated network solutions per second based on the last n blocks'
+ 'getnewaddress:Returns a new transparent Zcash address'
+ 'getpeerinfo:Returns data about each connected network node as a json array of objects'
+ 'getrawchangeaddress:Returns a new transparent Zcash address for receiving change'
+ 'getrawmempool:Returns all transaction ids in memory pool as a json array of string transaction ids'
+ 'getrawtransaction:Return the raw transaction data'
+ 'getreceivedbyaddress:Returns the total amount received by the given transparent Zcash address'
+ 'getspentinfo:Returns the txid and index where an output is spent'
+ 'gettransaction:Returns detailed information about in-wallet transaction'
+ 'gettxout:Returns details about an unspent transaction output'
+ 'gettxoutproof:Returns a hex-encoded proof that "txid" was included in a block'
+ 'gettxoutsetinfo:Returns statistics about the unspent transaction output set'
+ "getunconfirmedbalance:Returns the server's total unconfirmed transparent balance"
+ 'getwalletinfo:Returns wallet state information'
+ 'help:List all commands, or get help for a specified command'
+ 'importaddress:import address'
+ 'importprivkey:Adds a private key to your wallet'
+ 'importpubkey:Adds a public key'
+ 'importwallet:Imports taddr keys from a wallet dump file'
+ 'listaddresses:Lists the addresses managed by this wallet by source'
+ 'listaddressgroupings:Lists groups of transparent addresses'
+ 'listbanned:List all banned IPs/Subnets'
+ 'listlockunspent:Returns list of temporarily unspendable transparent outputs'
+ 'listreceivedbyaddress:List balances by transparent receiving address'
+ 'listsinceblock:Get all transactions in blocks'
+ "listtransactions:Returns up to 'count' of the most recent transactions"
+ 'listunspent:Returns array of unspent transparent transaction outputs'
+ 'lockunspent:Updates list of temporarily unspendable outputs'
+ 'ping:Requests that a ping be sent to all other nodes, to measure ping time'
+ 'prioritisetransaction:Accepts the transaction into mined blocks at a higher/lower priority'
+ 'sendmany:Send to multiple transparent recipient'
+ 'sendrawtransaction:Submits raw transaction to local node and network'
+ 'sendtoaddress:Send an amount to a given transparent address'
+ 'setban:Attempts to add or remove an IP/Subnet from the banned list'
+ 'setgenerate:Set "generate" true or false to turn generation on or off'
+ 'setlogfilter:Sets the filter to be used for selecting events to log'
+ 'signmessage:Sign a message with the private key of a t-addr'
+ 'stop:Stop Zcash server'
+ 'submitblock:Attempts to submit new block to network'
+ 'validateaddress:Return information about the given Zcash address'
+ 'verifychain:Verifies blockchain database'
+ 'verifymessage:Verify a signed message'
+ 'verifytxoutproof:Verifies that a proof points to a transaction in a block'
+ 'walletconfirmbackup:Notify the wallet that the user has backed up the emergency recovery phrase'
+ 'z_converttex:Converts a transparent Zcash address to a TEX address'
+ 'z_exportkey:Reveals the zkey corresponding to "zaddr"'
+ 'z_exportviewingkey:Returns the full viewing key corresponding to "zaddr"'
+ 'z_exportwallet:Exports all wallet keys, for taddr and zaddr, in a human-readable format'
+ 'z_getaddressforaccount:get address for account'
+ "z_getbalance:Returns the balance of a taddr or zaddr belonging to the node's wallet"
+ "z_getbalanceforaccount:Returns the account's spendable balance for each value pool"
+ 'z_getbalanceforviewingkey:Returns the balance viewable by a full viewing key'
+ 'z_getmigrationstatus:Returns information about the status of the Sprout to Sapling migration'
+ 'z_getnewaccount:Prepares and returns a new account'
+ 'z_getnewaddress:Returns a new shielded address for receiving payments'
+ 'z_getnotescount:Returns the number of notes available in the wallet for each shielded value pool'
+ 'z_getoperationresult:Retrieve the result and status of an operation which has finished'
+ 'z_getoperationstatus:Get operation status and any associated result or error data'
+ 'z_getpaymentdisclosure:Generate a payment disclosure for a given joinsplit output'
+ "z_getsubtreesbyindex:Returns roots of subtrees of the given pool's note commitment tree"
+ "z_gettreestate:Return information about the given block's tree state"
+ 'z_importkey:Adds a zkey (as returned by z_exportkey) to your wallet'
+ 'z_importviewingkey:Adds a viewing key to your wallet'
+ 'z_importwallet:Imports taddr and zaddr keys from a wallet export file'
+ 'z_listaccounts:Returns the list of accounts created with z_getnewaccount'
+ 'z_listaddresses:Returns the list of shielded addresses belonging to the wallet'
+ 'z_listoperationids:Returns the list of operation ids currently known to the wallet'
+ "z_listreceivedbyaddress:Return a list of amounts received by a zaddr belonging to the node's wallet"
+ 'z_listunifiedreceivers:Returns a record of the individual receivers contained within the provided UA'
+ 'z_listunspent:Returns an array of unspent shielded notes'
+ 'z_mergetoaddress:Merge multiple UTXOs and notes into a single UTXO or note'
+ 'z_sendmany:Send a transaction with multiple recipients'
+ "z_setmigration:attempt to migrate all funds from this wallet's Sprout addresses"
+ 'z_shieldcoinbase:Shield transparent coinbase funds by sending to a shielded zaddr'
+ 'z_validateaddress:Return information about the given address'
+ 'z_validatepaymentdisclosure:Validates a payment disclosure'
+ 'z_viewtransaction:Get detailed shielded information about in-wallet transaction'
+ 'zcbenchmark:Runs a benchmark of the selected benchmark type samplecount times'
+ 'zcsamplejoinsplit:Perform a joinsplit and return the JSDescription'
+ )
-_arguments -C \
- '-?[display usage information]' \
- -conf='[specify configuration file]:file [zcash.conf]:_files' \
- -datadir='[specify data directory]:directory:_directories' \
- -testnet'[use the test network]' \
- -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.]' \
- -rpcconnect='[send commands to node running on specified ip]:rpcconnect [127.0.0.1]:_hosts' \
- -rpcport='[connect to JSON-RPC on specified port]: :_guard "[[\:digit\:]]#" "port [8232 or testnet\: 18232]"' \
- -rpcwait'[wait for RPC server to start]' \
- -rpcuser='[username for JSON-RPC connections]:rpcuser' \
- -rpcpassword='[password for JSON-RPC connections]:rpcpassword' \
- -rpcclienttimeout='[specify timeout during HTTP requests, or 0 for no timeout]: :_guard "[[\:digit\:]]#" "timeout (seconds) [900]"' \
- ':subcommand:->subcommand' && ret=0
+ _describe -t commands 'command' commands "$@"
+}
-case $state in
- subcommand)
- subcommands=(
- 'getbestblockhash'
- 'getblock'
- 'getblockchaininfo'
- 'getblockcount'
- 'getblockhash'
- 'getblockheader'
- 'getchaintips'
- 'getdifficulty'
- 'getmempoolinfo'
- 'getrawmempool'
- 'gettxout'
- 'gettxoutproof'
- 'gettxoutsetinfo'
- 'verifychain'
- 'verifytxoutproof'
- 'getinfo'
- 'help'
- 'stop'
- 'generate'
- 'getgenerate'
- 'setgenerate'
- 'getblocksubsidy'
- 'getblocktemplate'
- 'getlocalsolps'
- 'getmininginfo'
- 'getnetworkhashps'
- 'getnetworksolps'
- 'prioritisetransaction'
- 'submitblock'
- 'addnode'
- 'clearbanned'
- 'disconnectnode'
- 'getaddednodeinfo'
- 'getconnectioncount'
- 'getnettotals'
- 'getnetworkinfo'
- 'getpeerinfo'
- 'listbanned'
- 'ping'
- 'setban'
- 'createrawtransaction'
- 'decoderawtransaction'
- 'decodescript'
- 'fundrawtransaction'
- 'getrawtransaction'
- 'sendrawtransaction'
- 'signrawtransaction'
- 'createmultisig'
- 'estimatefee'
- 'estimatepriority'
- 'validateaddress'
- 'verifymessage'
- 'z_validateaddress'
- 'addmultisigaddress'
- 'backupwallet'
- 'dumpprivkey'
- 'dumpwallet'
- 'encryptwallet'
- 'getaccount'
- 'getaccountaddress'
- 'getaddressesbyaccount'
- 'getbalance'
- 'getnewaddress'
- 'getrawchangeaddress'
- 'getreceivedbyaccount'
- 'getreceivedbyaddress'
- 'gettransaction'
- 'getunconfirmedbalance'
- 'getwalletinfo'
- 'importaddress'
- 'importprivkey'
- 'importwallet'
- 'keypoolrefill'
- 'listaccounts'
- 'listaddressgroupings'
- 'listlockunspent'
- 'listreceivedbyaccount'
- 'listreceivedbyaddress'
- 'listsinceblock'
- 'listtransactions'
- 'listunspent'
- 'lockunspent'
- 'move'
- 'sendfrom'
- 'sendmany'
- 'sendtoaddress'
- 'setaccount'
- 'settxfee'
- 'signmessage'
- 'z_exportkey'
- 'z_exportwallet'
- 'z_getbalance'
- 'z_getnewaddress'
- 'z_getoperationresult'
- 'z_getoperationstatus'
- 'z_gettotalbalance'
- 'z_importkey'
- 'z_importwallet'
- 'z_listaddresses'
- 'z_listoperationids'
- 'z_listreceivedbyaddress'
- 'z_sendmany'
- 'zcbenchmark'
- 'zcrawjoinsplit'
- 'zcrawkeygen'
- 'zcrawreceive'
- 'zcsamplejoinsplit'
- )
-
- _describe -t subcommands 'zcash-cli subcommand' subcommands && ret=0
- ;;
-esac
-
-return ret
+_arguments \
+ '(- *)-?[display usage information]' \
+ '(- *)-version[display version and exit]' \
+ '-conf=[specify configuration file]:file [zcash.conf]:_files' \
+ '-datadir=[specify data directory]:directory:_files -/' \
+ '-testnet[use the test network]' \
+ '-regtest[enter regression test mode]' \
+ '-rpcconnect=[send commands to node running on specified ip]:rpcconnect [127.0.0.1]:_hosts' \
+ '-rpcport=[connect to JSON-RPC on specified port]: :_guard "[[\:digit\:]]#" "port [8232 or testnet\: 18232]"' \
+ '-rpcwait[wait for RPC server to start]' \
+ '-rpcuser=[username for JSON-RPC connections]:rpcuser' \
+ '-rpcpassword=[password for JSON-RPC connections]:rpcpassword' \
+ '-rpcclienttimeout=[specify timeout during HTTP requests, or 0 for no timeout]: :_guard "[[\:digit\:]]#" "timeout (seconds) [900]"' \
+ '1: :_zcash_cli_commands' \
+ '*:: :_files'
# Local Variables:
# mode: Shell-Script