Compare commits

..

1 Commits

Author SHA1 Message Date
F.B. 3f03839448
Merge 5359bbf0e7 into 45e2c02492 2026-05-21 11:31:27 -05:00
4 changed files with 93 additions and 97 deletions

View File

@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for Bundler 4.0.13 (https://bundler.io/). # Completion script for Bundler 4.0.0 (https://bundler.io/).
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -66,7 +66,6 @@ _bundle() {
local -a policies=('HighSecurity' 'MediumSecurity' 'LowSecurity' 'AlmostNoSecurity' 'NoSecurity') local -a policies=('HighSecurity' 'MediumSecurity' 'LowSecurity' 'AlmostNoSecurity' 'NoSecurity')
_arguments \ _arguments \
'(- *)'{-h,--help}'[show help message]' \ '(- *)'{-h,--help}'[show help message]' \
'--cooldown=[only consider gem versions published at least number days ago when resolving]:num' \
'(--force --redownload)'{--force,--redownload}'[force reinstalling every gem]' \ '(--force --redownload)'{--force,--redownload}'[force reinstalling every gem]' \
'--full-index[download and cache the index file of all gems]' \ '--full-index[download and cache the index file of all gems]' \
'--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \ '--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \
@ -79,8 +78,7 @@ _bundle() {
'--quiet[only output warnings and errors]' \ '--quiet[only output warnings and errors]' \
'--retry=[retry number when network or git requests failed]:number' \ '--retry=[retry number when network or git requests failed]:number' \
'--standalone=-[create standalone bundles]:groups:_bundle_groups' \ '--standalone=-[create standalone bundles]:groups:_bundle_groups' \
'--trust-policy=-[apply the Rubygems security policy]:arg:($policies)' \ "--trust-policy=-[apply the Rubygems security policy]:arg:($policies)" \
'--target-rbconfig=[path to rbconfig.rb for the deployment target platform]:file:_files' \
&& ret=0 && ret=0
;; ;;
(update) (update)
@ -94,7 +92,6 @@ _bundle() {
'--bundler[update the locked version of bundler to invoked bundler version]' \ '--bundler[update the locked version of bundler to invoked bundler version]' \
'(--force --redownload)'{--force,--redownload}'[force reinstalling every gem]' \ '(--force --redownload)'{--force,--redownload}'[force reinstalling every gem]' \
'--full-index[fall back to using the single-file index of all gems]' \ '--full-index[fall back to using the single-file index of all gems]' \
'--gemfile[use the specified gemfile instaed of Gemfile]:file:_files' \
'(-j --jobs)'{-j,--jobs}'[specify the number of jobs to run in parallel]:number' \ '(-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' \ '--retry=-[retry failed network or git requests for number times]:number' \
'--quiet[only output warnings and errors]' \ '--quiet[only output warnings and errors]' \
@ -104,7 +101,6 @@ _bundle() {
'--pre[always choose the highest allowed version]' \ '--pre[always choose the highest allowed version]' \
'--strict[do not allow any gem to be updated past latest --patch | --minor | --major]' \ '--strict[do not allow any gem to be updated past latest --patch | --minor | --major]' \
'--conservative[use bundle install conservative update behavior]' \ '--conservative[use bundle install conservative update behavior]' \
'--cooldown=[only consider gem versions published at least number days ago when resolving]:num' \
'*:: :_bundle_gems' \ '*:: :_bundle_gems' \
&& ret=0 && ret=0
;; ;;
@ -150,7 +146,6 @@ _bundle() {
'--skip-install[adds the gem to the Gemfile but does not install it]' \ '--skip-install[adds the gem to the Gemfile but does not install it]' \
'--optimistic[adds optimistic declaration of version]' \ '--optimistic[adds optimistic declaration of version]' \
'--strict[adds strict declaration of version]' \ '--strict[adds strict declaration of version]' \
'--cooldown=[only consider gem versions published at least number days ago when resolving]:num' \
'1::gem' \ '1::gem' \
&& ret=0 && ret=0
;; ;;
@ -196,7 +191,6 @@ _bundle() {
'--filter-minor[only list minor new versions]' \ '--filter-minor[only list minor new versions]' \
'--filter-patch[only list patch new versions]' \ '--filter-patch[only list patch new versions]' \
'--only-explicit[only list gems specified in your Gemfile, not their dependencies]' \ '--only-explicit[only list gems specified in your Gemfile, not their dependencies]' \
'--cooldown=[annotate versions that are still inside the cooldown window]:num' \
'*:: :_bundle_gems' \ '*:: :_bundle_gems' \
&& ret=0 && ret=0
;; ;;

168
src/_dart
View File

@ -24,7 +24,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for dart 3.12.0 (https://dart.dev/) # Completion script for dart 3.11.0 (https://dart.dev/)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -89,7 +89,6 @@ _dart() {
'--host=[Hostname to serve DevTools on(defaults to localhost)]:host' \ '--host=[Hostname to serve DevTools on(defaults to localhost)]:host' \
'--port=[Port to serve DevTools on, specify 0 to automatically use any available port(defaults to 9100)]:port' \ '--port=[Port to serve DevTools on, specify 0 to automatically use any available port(defaults to 9100)]:port' \
'--dtd-uri=[A URI pointing to a Dart Tooling Daemon]:uri' \ '--dtd-uri=[A URI pointing to a Dart Tooling Daemon]:uri' \
'--dtd-exposed-uri=[An optional URI for DartTooling Daemon that has been exposed to the front-end]:uri' \
'(--no-launch-browser --launch-browser)--launch-browser[Launches DevTools in a browser immediately at start]' \ '(--no-launch-browser --launch-browser)--launch-browser[Launches DevTools in a browser immediately at start]' \
'(--no-launch-browser --launch-browser)--no-launch-browser[Do not launches DevTools in a browser immediately at start]' \ '(--no-launch-browser --launch-browser)--no-launch-browser[Do not launches DevTools in a browser immediately at start]' \
'--machine[Sets output format to JSON for consumption in tools]' \ '--machine[Sets output format to JSON for consumption in tools]' \
@ -97,15 +96,15 @@ _dart() {
'--app-size-base=[Path to the base app size file used for app size]' \ '--app-size-base=[Path to the base app size file used for app size]' \
'(--no-disable-cors --disable-cors)--disable-cors[Disable CORS]' \ '(--no-disable-cors --disable-cors)--disable-cors[Disable CORS]' \
'(--no-disable-cors --disable-cors)--no-disable-cors[Do not disable CORS]' \ '(--no-disable-cors --disable-cors)--no-disable-cors[Do not disable CORS]' \
'*::server_uri' \ '*:server_uri :' \
&& ret=0 && ret=0
;; ;;
(doc) (doc)
_arguments \ _arguments \
'(- *)'{-h,--help}'[Print this usage information]' \ '(- *)'{-h,--help}'[Print this usage information]' \
'(-o --output)'{-o,--output=}'[Configuration the output directory(defaults to "doc/api")]:dir:_files -/' \ '(-o --output)'{-o,--output=}'[Configuration the output directory(defaults to "doc/api")]:dir:_files -/' \
'(--dry-run --validate-links)--validate-links[Display warnings for broken links]' \ '(--dry-run)--validate-links[Display warnings for broken links]' \
'(--dry-run --validate-links)--dry-run[Try to generate the docs without saving them]' \ '(--validate-links)--dry-run[Try to generate the docs without saving them]' \
'*:dir:_files -/' \ '*:dir:_files -/' \
&& ret=0 && ret=0
;; ;;
@ -123,12 +122,27 @@ _dart() {
'(- *)'{-h,--help}'[Print this usage information]' \ '(- *)'{-h,--help}'[Print this usage information]' \
'(-v --verbose)'{-v,--verbose}'[Show all options and flags with --help]' \ '(-v --verbose)'{-v,--verbose}'[Show all options and flags with --help]' \
'(-o --output)'{-o,--output}'[Set where to write formatted output]:format:_dart_format_output' \ '(-o --output)'{-o,--output}'[Set where to write formatted output]:format:_dart_format_output' \
'--show[Set which filenames to print]:show type:(all changed none)' \
'--summary[Show the specified summary after formatting]:summary type:(line none profile)' \
'--set-exit-if-changed[Return exit code 1 if there are any formatting changes]' \ '--set-exit-if-changed[Return exit code 1 if there are any formatting changes]' \
'--page-width[Try to keep lines no longer than this(defaults to 80)]:width' \
'--trailing-commas[How trailing commas in input affect formatting]:style:(automate preserve)' \
'(-i --indent)'{-i,--indent}'[Add this many spaces of leading indentation]' \
'--follow-links[Follow links to files and directories]' \
'(- *)--version[Show dart_style version]' \
'--enable-experiment[Enable one or more experimental features]:features' \
'--selection[Track selection through formatting]:selection' \
'--stdin-name[Use this path in error messages when input is read from stdin]:name' \
'*:file_or_directory:_files' \ '*:file_or_directory:_files' \
&& ret=0 && ret=0
;; ;;
(info) (info)
_dart_info && ret=0 _arguments \
'(- *)'{-h,--help}'[Print this usage information]' \
'(--no-remove-file-paths --remove-file-paths)--remove-file-paths[Remove file paths in displayed information]' \
'(--no-remove-file-paths --remove-file-paths)--no-remove-file-paths[Do not remove file paths in displayed information]' \
'*: :_files' \
&& ret=0
;; ;;
(pub) (pub)
_dart_pub && ret=0 _dart_pub && ret=0
@ -136,17 +150,41 @@ _dart() {
(run) (run)
_arguments \ _arguments \
'(- *)'{-h,--help}'[Print this usage information]' \ '(- *)'{-h,--help}'[Print this usage information]' \
'(-r --resident)'{-r,--resident}'[Enable faster startup times with the resident frontend compiler]' \
'--resident-compiler-info-file[The path to an info file to use to communicate with a resident frontend compiler]:file:_files' \
'--observe=[Specify debug port and bind address]:port_address' \ '--observe=[Specify debug port and bind address]:port_address' \
'--enable-vm-service=[Enable the VM service and listens on the specified port for connections(default port 8181)]:port_address' \
'(--serve-devtools --no-serve-devtools)--serve-devtools[Serves an instance of the Dart DevTools debugger and profiler]' \
'(--serve-devtools --no-serve-devtools)--no-serve-devtools[Do not serve an instance of the Dart DevTools debugger and profiler]' \
'--pause-isolates-on-exit[Pause isolates on exit when running with --enable-vm-service]' \
'--pause-isolates-on-unhandled-exceptions[Pause isolates when an unhandled exception is encountered when running with --enable-vm-service]' \
'--warn-on-pause-with-no-debugger[Print a warning when an isolate pauses with no attached debugger when running with --enable-vm-service]' \
'--timeline-streams=[Enables recording for specific timeline streams]:stream:_dart_run_timeline_streams' \
'--pause-isolates-on-start[Pause isolates on start when running with --enable-vm-service]' \
'--profile-microtasks[Record information about each microtask]' \
'(--enable-asserts --no-enable-asserts)--enable-asserts[Enable assert statements]' \ '(--enable-asserts --no-enable-asserts)--enable-asserts[Enable assert statements]' \
'(--enable-asserts --no-enable-asserts)--no-enable-asserts[Do not enable assert statements]' \ '(--enable-asserts --no-enable-asserts)--no-enable-asserts[Do not enable assert statements]' \
'--verbosity[Set the verbosity level of the compilation]:verbosity:(error warning info all)' \ '--timeline-recorder=[Selects the timeline recorder to use]:recorder:(none ring endless startup systrace file callback)' \
'--verbosity[Sets the verbosity level of the compilation]:level:(all error info warning)' \
'*'{-d,--define=}'[Define an environment declaration]:key_value:' \
'--disable-service-auth-codes[Disables the requirement for an authentication code]' \
'--enable-service-port-fallback[Use 0 if binding port is failed]' \
'--root-certs-file=[The path to a file containing the trusted root certificates]:file:_files' \
'--root-certs-cache=[The path to a cache directory containing the trusted root certificates]:file:_files -/' \
'--trace-loading[Enable tracing of library and script loading]' \
'--packages=[The path to the package resolution configuration file]:file:_files'\
'--write-service-info=[Outputs information necessary to connect to the VM service]:service_info:_files' \
'(--no-dds --dds)--dds[Use the Dart Development Service for enhanced debugging functionality]' \
'(--no-dds --dds)--no-dds[Not use the Dart Development Service for enhanced debugging functionality]' \
'(--no-serve-observatory --serve-observatory)--serve-observatory[Enable hosting Observatory through the VM service]' \
'(--no-serve-observatory --serve-observatory)--no-serve-observatory[Disable hosting Observatory through the VM service]' \
'(--no-print-dtd --print-dtd)--print-dtd[Prints connection details for the Dart Tooling Daemon]' \
'(--no-print-dtd --print-dtd)--no-print-dtd[Not print connection details for the Dart Tooling Daemon]' \
'--enable-experiment=[Enable one or more experimental features]:features:_dart_run_enable_experiment' \
'*: :_files' \ '*: :_files' \
&& ret=0 && ret=0
;; ;;
(test) (test)
local -a test_platforms=(vm vm-asan vm-msan vm-tsan chrome firefox edge node)
local -a test_compilers=(dart2js dart2wasm exe kernel source)
_arguments \ _arguments \
'(- *)'{-h,--help}'[Print this usage information]' \ '(- *)'{-h,--help}'[Print this usage information]' \
'(- *)--version[Show the package:test version]' \ '(- *)--version[Show the package:test version]' \
@ -155,14 +193,14 @@ _dart() {
'*'{-t,--tags}'[Run only tests with all of the specified tags]:tag' \ '*'{-t,--tags}'[Run only tests with all of the specified tags]:tag' \
'*'{-x,--exclude-tags}'[Do not run tests with any of the specified tags]:tag' \ '*'{-x,--exclude-tags}'[Do not run tests with any of the specified tags]:tag' \
'--run-skipped[Run skipped tests instead of skipping them]' \ '--run-skipped[Run skipped tests instead of skipping them]' \
'(-p --platform)'{-p,--platform}'[The platform on which to run the tests]:platform:($test_platforms)' \ '(-p --platform)'{-p,--platform}'[The platform on which to run the tests]:platform:(vm chrome firefox edge node experimental-chrome-wasm)' \
'(-c --compiler)'{-c,--compiler}'[The compiler to use to run tests]:compiler:($test_compilers)' \ '(-c --compiler)'{-c,--compiler}'[The compiler to use to run tests]:compiler:(dart2js dart2wasm exe kernel source)' \
'(-P --preset)'{-P,--preset}'[The configuration preset to use]:preset' \ '(-P --preset)'{-P,--preset}'[The configuration preset to use]:preset' \
'(-j --concurrency)'{-j,--concurrency}'[The number of concurrent test suites run(defaults to 1)]:concurrency' \ '(-j --concurrency)'{-j,--concurrency}'[The number of concurrent test suites run(defaults to 1)]:concurrency' \
'--total-shards[The total number of invocations of the test runner being run]:number' \ '--total-shards[The total number of invocations of the test runner being run]:number' \
'--shard-index[The index of this test runner invocation]:index' \ '--shard-index[The index of this test runner invocation]:index' \
'(--suite-load-timeout --ignore-timeouts)--suite-load-timeout[The timeout for loading a test suite]:timeout' \ '(--ignore-timeouts --timeout)--timeout[The default test timeout]:timeout' \
'(--suite-load-timeout --ignore-timeouts)--ignore-timeouts[Ignore all timeouts]' \ '(--ignore-timeouts --timeout)--ignore-timeouts[Ignore all timeouts]' \
'--pause-after-load[Pause for debugging before any tests execute]' \ '--pause-after-load[Pause for debugging before any tests execute]' \
'--debug[Run the VM and Chrome tests in debug mode]' \ '--debug[Run the VM and Chrome tests in debug mode]' \
'--coverage=[Gather coverage and output it to the specified directory]:dir:_files -/' \ '--coverage=[Gather coverage and output it to the specified directory]:dir:_files -/' \
@ -260,7 +298,7 @@ _dart_compile() {
;; ;;
esac esac
return ret return $ret
} }
(( $+functions[_dart_compile_subcommands] )) || (( $+functions[_dart_compile_subcommands] )) ||
@ -287,60 +325,6 @@ _dart_format_output() {
_describe -t outputs 'output' outputs "$@" _describe -t outputs 'output' outputs "$@"
} }
(( $+functions[_dart_info] )) ||
_dart_info() {
local ret=1
local -a streams=(api compiler compilerVerbose dart debugger embedder gc isolate microtask vm all)
_arguments -C \
'(- *)'{-h,--help}'[Print this usage information]' \
'1: :_dart_info_subcommands' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
local -a opts=(
'(- *)'{-h,--help}'[Print this usage information]'
)
case $words[1] in
(dump)
opts+=(
'(--remove-file-paths --no-remove-file-paths)--remove-file-paths[Remove file paths in displayed information(default)]'
'(--remove-file-paths --no-remove-file-paths)--no-remove-file-paths[Do not remove file paths in displayed information(default)]'
)
;;
(record-performance)
opts+=(
'(-o --output-dir)'{-o,--output-dir}'[Output directory]:dir:_files -/'
'--tag[Tag to filter processes by]:tab'
'--record-new-processes[Record processes that start after the recorder]'
'--record-only-new-process[Record only processes that start after the recorder]'
'--enable-async-spans[Enable async spancs]'
'(--enable-profiler --no-enable-profiler)--enable-profiler[Enable profiler(default)]'
'(--enable-profiler --no-enable-profiler)--no-enable-profiler[Disable profiler(default)]'
'--streams[Streams to record]:type:($streams)'
)
;;
esac
_arguments "$opts[@]" && ret=0
;;
esac
return ret
}
(( $+functions[_dart_info_subcommands] )) ||
_dart_info_subcommands() {
local -a commands=(
'dump:Show diagnostic information about the installed tooling(default)'
'record-performance:Record performance data of running Dart tooling processes'
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_dart_pub] )) || (( $+functions[_dart_pub] )) ||
_dart_pub() { _dart_pub() {
local ret=1 local ret=1
@ -402,7 +386,6 @@ _dart_pub() {
;| ;|
(bump) (bump)
_dart_pub_bump && return 0 _dart_pub_bump && return 0
return 1
;; ;;
(cache) (cache)
_dart_pub_cache && return 0 _dart_pub_cache && return 0
@ -420,6 +403,7 @@ _dart_pub() {
;; ;;
(global) (global)
_dart_pub_global && return 0 _dart_pub_global && return 0
return 1
;; ;;
(outdated) (outdated)
opts+=( opts+=(
@ -440,17 +424,13 @@ _dart_pub() {
_dart_pub_token && return 0 _dart_pub_token && return 0
return 1 return 1
;; ;;
(workspace)
_dart_pub_workspace && return 0
return 1
;;
esac esac
_arguments "$opts[@]" && ret=0 _arguments "$opts[@]" && ret=0
;; ;;
esac esac
return ret return $ret
} }
(( $+functions[_dart_pub_subcommands] )) || (( $+functions[_dart_pub_subcommands] )) ||
@ -496,7 +476,7 @@ _dart_pub_bump() {
;; ;;
esac esac
return ret return $ret
} }
(( $+functions[_dart_pub_bump_subcommands] )) || (( $+functions[_dart_pub_bump_subcommands] )) ||
@ -544,7 +524,7 @@ _dart_pub_cache() {
;; ;;
esac esac
return ret return $ret
} }
(( $+functions[_dart_pub_cache_subcommands] )) || (( $+functions[_dart_pub_cache_subcommands] )) ||
@ -598,7 +578,7 @@ _dart_pub_global() {
;; ;;
esac esac
return ret return $ret
} }
(( $+functions[_dart_pub_global_subcommands] )) || (( $+functions[_dart_pub_global_subcommands] )) ||
@ -645,7 +625,7 @@ _dart_pub_token() {
;; ;;
esac esac
return ret return $ret
} }
(( $+functions[_dart_pub_token_subcommands] )) || (( $+functions[_dart_pub_token_subcommands] )) ||
@ -678,7 +658,7 @@ _dart_pub_workspace() {
;; ;;
esac esac
return ret return $ret
} }
(( $+functions[_dart_pub_workspace_subcommands] )) || (( $+functions[_dart_pub_workspace_subcommands] )) ||
@ -689,6 +669,34 @@ _dart_pub_workspace_subcommands() {
_describe -t commands 'command' commands "$@" _describe -t commands 'command' commands "$@"
} }
(( $+functions[_dart_run_timeline_streams] )) ||
_dart_run_timeline_streams() {
local -a streams=(all API Compiler CompilerVerbose Dart Debugger Embedder GC Isolate VM)
_values -s ',' streams $streams
}
(( $+functions[_dart_run_enable_experiment] )) ||
_dart_run_enable_experiment() {
local -a features=(
'augumentations:Augmentations - enhancing declarations from outside'
'const-function:Allow more of the Dart language to be executed in const expression'
'dot-shorthands:Shorter dot syntax for static accesses'
'enhanced-parts:Generalize parts to be nested and have exports/imports'
'getter-setter-error:Stop reporting errors about mismatching types in a getter/setter pair'
'inference-update-4:A bundle of updates to type inference'
'macros:Static meta-programming'
'native-asserts:Compile and bundle native asserts'
'null-aware-elements:Null-aware elements and map entries in collections'
'record-use:Output arguments used by static functions'
'sound-flow-analysis:Assume sound null safety when computing type promotion, reachability, definite assignment'
'test-experiment:Has no effect'
'unquoted-imports:Shorter import syntax'
'variance:Sound variance'
)
_describe -t features 'command' features "$@"
}
(( $+functions[_dart_test_reporter] )) || (( $+functions[_dart_test_reporter] )) ||
_dart_test_reporter() { _dart_test_reporter() {
local -a reporters=( local -a reporters=(

View File

@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for Elixir Mix 1.20.0 with Erlang/OTP 28 (https://github.com/elixir-lang/elixir) # Completion script for Elixir Mix 1.19.5 with Erlang/OTP 28 (https://github.com/elixir-lang/elixir)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -84,7 +84,6 @@ _mix() {
_arguments \ _arguments \
'*--exclude[exclude applications which you do not want to see printed]:app' \ '*--exclude[exclude applications which you do not want to see printed]:app' \
'--format[format type]:type:(pretty plain dot)' \ '--format[format type]:type:(pretty plain dot)' \
'--output[override the location of the file created by the "dot" format]:file:_files' \
&& ret=0 && ret=0
;; ;;
(archive.build) (archive.build)
@ -217,7 +216,6 @@ _mix() {
'*--exclude[exclude dependencies which you do not want to see printed]:dep:_mix_dependencies' \ '*--exclude[exclude dependencies which you do not want to see printed]:dep:_mix_dependencies' \
'--umbrella-only[only include the umbrella applications]' \ '--umbrella-only[only include the umbrella applications]' \
'--format[print format]:format:(pretty plain dot)' \ '--format[print format]:format:(pretty plain dot)' \
'--output[override the location of the file created by the "dot" format]:file:_files' \
&& ret=0 && ret=0
;; ;;
(deps.unlock) (deps.unlock)
@ -280,7 +278,6 @@ _mix() {
'--dot-formatter[path to the file with formatter configuration]:file:_files' \ '--dot-formatter[path to the file with formatter configuration]:file:_files' \
'--stdin-filename[path to the file being formatted on stdin]:name' \ '--stdin-filename[path to the file being formatted on stdin]:name' \
'--migrate[enable the :migrate option]' \ '--migrate[enable the :migrate option]' \
'--no-compile[do not compile before formatting]' \
'*::path:_files' \ '*::path:_files' \
&& ret=0 && ret=0
;; ;;
@ -344,7 +341,6 @@ _mix() {
'(--color --no-color)--color[enable color in ExUnit formatting results]' \ '(--color --no-color)--color[enable color in ExUnit formatting results]' \
'(--color --no-color)--no-color[disable color]' \ '(--color --no-color)--no-color[disable color]' \
'--cover[run coverage tool]' \ '--cover[run coverage tool]' \
'--dry-run[print which tests would be run based on current options, but not run any tests]' \
'*--exclude[exclude tests that match the filter]:filter' \ '*--exclude[exclude tests that match the filter]:filter' \
'--exit-status[use an alternate exit status to use when tests fail(default: 2)]:num' \ '--exit-status[use an alternate exit status to use when tests fail(default: 2)]:num' \
'--export-coverage[the name of the file to export coverage results to]:file:_files' \ '--export-coverage[the name of the file to export coverage results to]:file:_files' \

View File

@ -295,10 +295,8 @@ _regex_arguments _cmd /$'[^\0]##\0'/ \( /$'word1(a|b|c)\0'/ ':word:first word:(w
'|' /$'word22(a|b|c)\0'/ ':word:second word:(word22a word22b word22c)' \) \) '|' /$'word22(a|b|c)\0'/ ':word:second word:(word22a word22b word22c)' \) \)
_cmd "$@" _cmd "$@"
#+END_SRC #+END_SRC
In this example, the command itself is matched first (any non-empty word). The first argument in this case the first word can be word1 or word11 followed by an a, b or c, and if the first word contains 11 then a second
can be either =word1(a|b|c)= or =word11(a|b|c)=. If the first argument matches the =word11= word is allowed which can be word2 or word22 followed by and a, b, or c.
variant, a second argument becomes available, which can be either =word2(a|b|c)= or
=word22(a|b|c)=.
If this sounds too complicated a much simpler alternative is to use the _regex_words function for creating If this sounds too complicated a much simpler alternative is to use the _regex_words function for creating
specifications for _regex_arguments. specifications for _regex_arguments.