Compare commits
5 Commits
b4dd7fad20
...
f42d1a0263
| Author | SHA1 | Date |
|---|---|---|
|
|
f42d1a0263 | |
|
|
5884510698 | |
|
|
cc16a51600 | |
|
|
faa7c0f755 | |
|
|
4f793a0031 |
121
src/_dart
121
src/_dart
|
|
@ -24,7 +24,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for dart 3.5.4 (https://dart.dev/)
|
||||
# Completion script for dart 3.9.0 (https://dart.dev/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -45,7 +45,7 @@ _dart() {
|
|||
'(- *)--version[Print the Dart SDK version]' \
|
||||
'(--enable-analytics --disable-analytics --suppress-analytics)--enable-analytics[Enable analytics]' \
|
||||
'(--enable-analytics --disable-analytics --suppress-analytics)--disable-analytics[Disable analytics]' \
|
||||
'(--enable-analytics --disable-analytics --suppress-analytics)--suppress-analytics[Disapply analytics for this "dart *" run without changing the analytics configuration]' \
|
||||
'(--enable-analytics --disable-analytics --suppress-analytics)--suppress-analytics[Disallow analytics for this "dart *" run without changing the analytics configuration]' \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'1: :_dart_subcommands' \
|
||||
'*::arg:->args' \
|
||||
|
|
@ -94,6 +94,8 @@ _dart() {
|
|||
'--machine[Sets output format to JSON for consumption in tools]' \
|
||||
'--record-memory-profile=[Start devtools headlessly and write memory profiling samples to the indicated file]:file:_files' \
|
||||
'--app-size-base=[Path to the base app size file used for app size]' \
|
||||
'(--no-disable-cors --disable-cors)--disable-cors[Disable CORS]' \
|
||||
'(--no-disable-cors --disable-cors)--no-disable-cors[Do not disable CORS]' \
|
||||
'*:server_uri :' \
|
||||
&& ret=0
|
||||
;;
|
||||
|
|
@ -123,13 +125,8 @@ _dart() {
|
|||
'--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]' \
|
||||
'--fix[Apply all style fixes]' \
|
||||
'--fix-doc-comments[Use triple slash for documentation comments]' \
|
||||
'--fix-function-typedefs[Use new syntax for function type typedefs]' \
|
||||
'--fix-named-default-separator[Use "=" as the separator before named parameter default values]' \
|
||||
'--fix-optional-const[Remove "const" keyword inside constant context]' \
|
||||
'--fix-optional-new[Remove "new" keyword]' \
|
||||
'--fix-single-cascade-statements[Remove unnecessary single cascades from expression statements]' \
|
||||
'--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]' \
|
||||
|
|
@ -164,6 +161,7 @@ _dart() {
|
|||
'--warn-on-pause-with-no-debugger[Print a warning when an isolate pauses with no attached debugger when running with --enable-vm-service]' \
|
||||
'--timeline-streams=[Enables recording for specific timeline streams]:stream:_dart_run_timeline_streams' \
|
||||
'--pause-isolates-on-start[Pause isolates on start when running with --enable-vm-service]' \
|
||||
'--profile-microtasks[Record information about each microtask]' \
|
||||
'(--enable-asserts --no-enable-asserts)--enable-asserts[Enable assert statements]' \
|
||||
'(--enable-asserts --no-enable-asserts)--no-enable-asserts[Do not enable assert statements]' \
|
||||
'--timeline-recorder=[Selects the timeline recorder to use]:recorder:(none ring endless startup systrace file callback)' \
|
||||
|
|
@ -201,7 +199,6 @@ _dart() {
|
|||
'(-j --concurrency)'{-j,--concurrency}'[The number of concurrent test suites run(defaults to 1)]:concurrency' \
|
||||
'--total-shards[The total number of invocations of the test runner being run]:number' \
|
||||
'--shard-index[The index of this test runner invocation]:index' \
|
||||
'--pub-serve=[The port of a pub serve instance serving "test/"]:port' \
|
||||
'(--ignore-timeouts --timeout)--timeout[The default test timeout]:timeout' \
|
||||
'(--ignore-timeouts --timeout)--ignore-timeouts[Ignore all timeouts]' \
|
||||
'--pause-after-load[Pause for debugging before any tests execute]' \
|
||||
|
|
@ -211,6 +208,8 @@ _dart() {
|
|||
'(--no-chain-stack-traces --chain-stack-traces)--no-chain-stack-traces[Do not use chained stack traces to provide greater exception]' \
|
||||
'--no-retry[Do not rerun tests that have retry set]' \
|
||||
'--test-randomize-ordering-seed[Use the specified seed to randomize the execution order of test cases]:seed' \
|
||||
'(--no-fail-test --fail-test)--fail-test[Stop running tests after the first failure]' \
|
||||
'(--no-fail-test --fail-test)--no-fail-test[Do not stop running tests after the first failure]' \
|
||||
'(-r --reporter)'{-r,--reporter=}'[Set how to print test results]:reporter:_dart_test_reporter' \
|
||||
'--file-reporter[Enable an additional reporter writing test results to a file]:reporter_file' \
|
||||
'--verbose-trace[Emit stack traces with core library frames]' \
|
||||
|
|
@ -256,6 +255,11 @@ _dart_compile() {
|
|||
'*'{-d,--define=}'[Define an environment declaration]:key_value:'
|
||||
)
|
||||
;|
|
||||
(aot-snapshot|exe|kernel)
|
||||
opts+=(
|
||||
'--depfile=[Path to output Ninja depfile]:file:_files'
|
||||
)
|
||||
;|
|
||||
(aot-snapshot|exe)
|
||||
opts+=(
|
||||
'(-S --save-debugging-info)'{-S,--save-debugging-info=}'[Remove debugging information from the output and save it separately to the specified file]:file:_files'
|
||||
|
|
@ -267,6 +271,14 @@ _dart_compile() {
|
|||
'--enable-asserts[Enable assert statements]'
|
||||
)
|
||||
;|
|
||||
(kernel)
|
||||
opts+=(
|
||||
'(--no-link-platform --link-platform)--link-platform[Include the platform kernel in the resulting kernel file]'
|
||||
'(--no-link-platform --link-platform)--no-link-platform[Do not include the platform kernel in the resulting kernel file]'
|
||||
'(--no-embed-sources --embed-sources)--embed-sources[Embed source files in the generated kernel component]'
|
||||
'(--no-embed-sources --embed-sources)--no-embed-sources[Do not embed source files in the generated kernel component]'
|
||||
)
|
||||
;|
|
||||
(wasm)
|
||||
opts+=(
|
||||
'(--no-source-maps --source-maps)--source-maps[Generate a source map file]'
|
||||
|
|
@ -360,13 +372,19 @@ _dart_pub() {
|
|||
(publish)
|
||||
opts+=(
|
||||
'(-f --force)'{-f,--force}'[Publish without confirmation if there are no errors]'
|
||||
'--skip-validation[Publish without validation and resolution]'
|
||||
)
|
||||
;|
|
||||
(upgrade)
|
||||
opts+=(
|
||||
'--tighten[Updates lower bounds in pubspec.yaml to match the resolved version]'
|
||||
'--unlock-transitive[Also upgrades the transitive dependencies of the listed dependencies]'
|
||||
'--major-versions[Upgrades packages to their latest resolvable versions and updates pubspec.yaml]'
|
||||
)
|
||||
;|
|
||||
(bump)
|
||||
_dart_pub_bump && return 0
|
||||
;;
|
||||
(cache)
|
||||
_dart_pub_cache && return 0
|
||||
return 1
|
||||
|
|
@ -417,6 +435,7 @@ _dart_pub() {
|
|||
_dart_pub_subcommands() {
|
||||
local -a commands=(
|
||||
"add:Add dependencies to 'pubspec.yaml'"
|
||||
"bump:Increases the version number of the current package"
|
||||
"cache:Work with the system cache"
|
||||
"deps:Print package dependencies"
|
||||
"downgrade:Downgrade the current package's dependencies to oldest versions"
|
||||
|
|
@ -428,7 +447,43 @@ _dart_pub_subcommands() {
|
|||
"publish:Publish the current package to pub.dev"
|
||||
"remove:Removes dependencies from 'pubspec.yaml'"
|
||||
"token:Manage authentication tokens for hosted pub repositories"
|
||||
"unpack:Downloads a package and unpacks it in place"
|
||||
"upgrade:Upgrade the current package's dependencies to latest versions"
|
||||
"workspace:Work with the pub workspace"
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_bump] )) ||
|
||||
_dart_pub_bump() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'1: :_dart_pub_bump_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
local -a opts=(
|
||||
'(- *)'{-h,--help}'[Print this usage information]'
|
||||
'(-n --dry-run)'{-n,--dry-run}'[Report what would change, but do not change anything]'
|
||||
)
|
||||
_arguments "$opts[@]" && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_bump_subcommands] )) ||
|
||||
_dart_pub_bump_subcommands() {
|
||||
local -a commands=(
|
||||
'breaking:Increment to the next breaking version(eg. 0.1.2 -> 0.2.0)'
|
||||
'major:Increment the major version number(eg. 3.1.2 -> 4.0.0)'
|
||||
'minor:Increment the minor version number(eg. 3.1.2 -> 3.2.0)'
|
||||
'patch:Increment the patch version number(eg. 3.1.2 -> 3.1.3)'
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
|
@ -512,7 +567,7 @@ _dart_pub_global() {
|
|||
opts+=(
|
||||
'(--enable-asserts --no-enable-asserts)--enable-asserts[Enable assert statements]'
|
||||
'(--enable-asserts --no-enable-asserts)--no-enable-asserts[Do not enable assert statements]'
|
||||
'*--enable-experiment=[Runs the executable in a VM with the given experiments enabled]'
|
||||
'*--enable-experiment=[Runs the executable in a VM with the given experiments enabled]:experiment'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
|
@ -581,6 +636,38 @@ _dart_pub_token_subcommands() {
|
|||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_workspace] )) ||
|
||||
_dart_pub_workspace() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'1: :_dart_pub_workspace_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
local -a opts=(
|
||||
'(- *)'{-h,--help}'[Print this usage information]'
|
||||
'--json[Output information in a json format]'
|
||||
)
|
||||
_arguments "$opts[@]" && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_workspace_subcommands] )) ||
|
||||
_dart_pub_workspace_subcommands() {
|
||||
local -a commands=(
|
||||
'list:List all packages in the workspace and their directory'
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
|
||||
(( $+functions[_dart_run_timeline_streams] )) ||
|
||||
_dart_run_timeline_streams() {
|
||||
local -a streams=(all API Compiler CompilerVerbose Dart Debugger Embedder GC Isolate VM)
|
||||
|
|
@ -590,14 +677,20 @@ _dart_run_timeline_streams() {
|
|||
(( $+functions[_dart_run_enable_experiment] )) ||
|
||||
_dart_run_enable_experiment() {
|
||||
local -a features=(
|
||||
'augumentations:Augumentations - enhancing declarations from outside'
|
||||
'const-function:Allow more of the Dart language to be executed in const expression'
|
||||
'dot-shorthands:Shorter dot syntax for static accesses'
|
||||
'enhanced-parts:Generalize parts to be nested and have exports/imports'
|
||||
'getter-setter-error:Stop reporting errors about mismatching types in a getter/setter pair'
|
||||
'inference-update-4:A bundle of updates to type inference'
|
||||
'macros:Static meta-programming'
|
||||
'native-asserts:Compile and bundle native asserts'
|
||||
'null-aware-elements:Null-aware elements and map entries in collections'
|
||||
'resource-identifiers:Output arguments used by static functions'
|
||||
'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'
|
||||
'wildcard-variables:Local declarations and parameters named "_" are non binding'
|
||||
)
|
||||
_describe -t features 'command' features "$@"
|
||||
}
|
||||
|
|
@ -607,8 +700,10 @@ _dart_test_reporter() {
|
|||
local -a reporters=(
|
||||
"compact:A single line, updated continuously"
|
||||
"expanded:A separate line for each update"
|
||||
"failures-only:A separate line for failing tests with no output for passing tests"
|
||||
"github:A custom reporter for GitHub Actions"
|
||||
"json:A machine-readable format"
|
||||
"silent:A reporter with no output"
|
||||
)
|
||||
_describe -t reporters 'reporter' reporters "$@"
|
||||
}
|
||||
|
|
|
|||
15
src/_flutter
15
src/_flutter
|
|
@ -25,7 +25,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for the Flutter.io sdk's cli tool 3.24.4 (https://flutter.dev)
|
||||
# Completion script for the Flutter.io sdk's cli tool 3.35.1 (https://flutter.dev)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -69,6 +69,7 @@ _flutter() {
|
|||
'--show-test-device=[List the special "flutter-tester" device in device listings]' \
|
||||
'--show-web-server-device=[List the special "web-server" device in device listings]' \
|
||||
'--ci[Enable a set of CI-specific test debug settings]' \
|
||||
'--debug-logs-dir[Path to a directory where logs for debugging may be added]' \
|
||||
'1: :_flutter_root_commands' \
|
||||
'*::arg:->args' \
|
||||
&& ret=0
|
||||
|
|
@ -105,7 +106,7 @@ _flutter() {
|
|||
(assemble)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
{-d,--define=}'[Allows passing configuration to a target]: :' \
|
||||
\*{-d,--define=}'[Allows passing configuration to a target]:configuration' \
|
||||
'--performance-measurement-file[Output individual target performance to a JSON file]' \
|
||||
{-i,--input=}'[Allows passing additional input]: :' \
|
||||
'--depfile=[A file path where a depfile will be written]: :_path_files' \
|
||||
|
|
@ -460,7 +461,7 @@ _flutter() {
|
|||
'(-o --out)'{-o,--out=}'[Location to write the screenshot]: :_files' \
|
||||
'--vm-service-url=[The VM Service URL to which to connect]' \
|
||||
'--type=[The type of screenshot to retrieve]:type:(device skia)' \
|
||||
'--device-timeout=[Time in seconds to wait for devices to attach]:seconds:' \
|
||||
'--device-timeout=[Time in seconds to wait for devices to attach]:seconds' \
|
||||
'--device-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \
|
||||
&& ret=0
|
||||
;;
|
||||
|
|
@ -468,6 +469,7 @@ _flutter() {
|
|||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(-d --debug-info)'{-d,--debug-info=}'[A path to the symbols file generated with "--split-debug-info"]: :_files' \
|
||||
'(-u --unit-id-debug-info)'{-d,--unit-id-debug}'[A loading unit id and the path to the symbols file]:id' \
|
||||
'(-i --input)'{-i,--input=}'[A file path containing a Dart stack trace]: :_files' \
|
||||
'(-o --output)'{-o,--output=}'[A file path for a symbolized stack trace to be written to]: :_files' \
|
||||
&& ret=0
|
||||
|
|
@ -505,6 +507,7 @@ _flutter() {
|
|||
{-r,--reporter=}'[Set how to print test results]: :(compact expanded github json silent)' \
|
||||
'--file-reporter[Enable an additional reporter writing test results to a file]' \
|
||||
'--timeout=[The default test timeout, specified either in seconds (e.g. "60s"). Defaults to "30s"]:seconds:' \
|
||||
'--ignore-timeouts[Ignore all timeouts]' \
|
||||
'--wasm[Compile to WebAssembly rather than JavaScript]' \
|
||||
'(--no-dds --dds)--dds[Enable the Dart Developer Service]' \
|
||||
'(--no-dds --dds)--no-dds[Disable the Dart Developer Service]' \
|
||||
|
|
@ -601,7 +604,7 @@ _flutter_build() {
|
|||
(aar)
|
||||
opts+=(
|
||||
'--target-platform=[The target platform for which the project is compiled]: :(android-arm android-arm64 android-x86 android-x64)'
|
||||
\*{-P,--android-project-arg}'[Additional arguments specified as key=value that are passed to gradle -P option]:arg'
|
||||
*{-P,--android-project-arg}'[Additional arguments specified as key=value that are passed to gradle -P option]:arg'
|
||||
)
|
||||
;;
|
||||
(apk|appbundle)
|
||||
|
|
@ -610,7 +613,7 @@ _flutter_build() {
|
|||
'(--no-analyze-size)--analyze-size[Produce additional profile information for artifact output size]'
|
||||
'(--analyze-size)--no-analyze-size[Not produce additional profile information for artifact output size]'
|
||||
'--code-size-directory=[The location to write code size analysis files]: :_files -/'
|
||||
\*{-P,--android-project-arg}'[Additional arguments specified as key=value that are passed to gradle -P option]:arg'
|
||||
*{-P,--android-project-arg}'[Additional arguments specified as key=value that are passed to gradle -P option]:arg'
|
||||
'--no-multidex[the app is not built with multidex support]'
|
||||
'--ignore-deprecation[the app should ignore deprecation warnings and continue to build using deprecated APIs]'
|
||||
'--split-per-abi[Split the APKs per ABIs]'
|
||||
|
|
@ -889,7 +892,9 @@ _flutter_pub() {
|
|||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'--offline[Use cached packages instead of accessing the network]' \
|
||||
'(-n --dry-run)'{-n,--dry-run}'[Report what dependencies would change but do not change any]' \
|
||||
'--tighten[Updates lower bounds in pubspec.yaml to match the resolved version]' \
|
||||
'--precompile[Build executables in immediate dependencies]' \
|
||||
'--unlock-transitive[Also upgrades the transitive dependencies of the listed dependencies]' \
|
||||
'--major-versions[Upgrades packages to their latest resolvable versions]' \
|
||||
'(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \
|
||||
&& ret=0
|
||||
|
|
|
|||
185
src/_play
185
src/_play
|
|
@ -1,190 +1,21 @@
|
|||
#compdef play
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
# Description
|
||||
# -----------
|
||||
# Completion script for the play command (from SoX)
|
||||
# (http://sox.sourceforge.net/)
|
||||
#
|
||||
# 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)
|
||||
# * Alexander F. Rødseth <xyproto@archlinux.org>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local curcontext="$curcontext" state line
|
||||
local -i ret=1
|
||||
|
||||
_play() {
|
||||
local context curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
_arguments -s -S -C '(-h --help)'{-h,--help}'[display help text]' '(-V --version)'{-V,--version}'[display version information]' '(-D --no-dither)'{-D,--no-dither}"[don't dither automatically]" '(-r --rate=)'{-r,--rate=}'[set sample rate]:rate' '(-c --channels=)'{-c,--channels=}'[specify the number of channels]:channels' '(-t --type=)'{-t,--type=}'[specify file type]:file type:_files' '(-p --sox-pipe)'{-p,--sox-pipe}'[use SoX pipe]' '(-q --no-show-progress)'{-q,--no-show-progress}'[run in quiet mode]' '*:filename:_files -g "*.wav *.mp3 *.flac *.ogg *.aiff"' && ret=0
|
||||
|
||||
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
|
||||
return ret
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
#compdef rec
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
# Description
|
||||
# -----------
|
||||
# Completion script for the rec command (from SoX)
|
||||
# (http://sox.sourceforge.net/)
|
||||
#
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Alexander F. Rødseth <xyproto@archlinux.org>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local curcontext="$curcontext" state line
|
||||
local -i ret=1
|
||||
|
||||
_arguments -s -S -C '(-h --help)'{-h,--help}'[display help text]' '(-V --version)'{-V,--version}'[display version information]' '(-D --no-dither)'{-D,--no-dither}"[don't dither automatically]" '(-r --rate=)'{-r,--rate=}'[set sample rate]:rate' '(-c --channels=)'{-c,--channels=}'[specify the number of channels]:channels' '(-t --type=)'{-t,--type=}'[specify file type]:file type:_files' '(-p --sox-pipe)'{-p,--sox-pipe}'[use SoX pipe]' '(-q --no-show-progress)'{-q,--no-show-progress}'[run in quiet mode]' '*:filename:_files -g "*.wav *.mp3 *.flac *.ogg *.aiff"' && ret=0
|
||||
|
||||
return ret
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
#compdef sox
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
# Description
|
||||
# -----------
|
||||
# Completion script for the sox command (from SoX)
|
||||
# (http://sox.sourceforge.net/)
|
||||
#
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Alexander F. Rødseth <xyproto@archlinux.org>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local curcontext="$curcontext" state line
|
||||
local -i ret=1
|
||||
|
||||
_arguments -s -S -C '(-h --help)'{-h,--help}'[display help text]' '(-V --version)'{-V,--version}'[display version information]' '(-D --no-dither)'{-D,--no-dither}"[don't dither automatically]" '(-G --guard)'{-G,--guard}'[use temporary files to guard against clipping]' '(-m --combine=)'{-m,--combine=}'[combine input files]:method:(mix merge concatenate)' '(-t --type=)'{-t,--type=}'[specify file type]:file type:_files' '(-r --rate=)'{-r,--rate=}'[set sample rate]:rate' '(-c --channels=)'{-c,--channels=}'[specify the number of channels]:channels' '(-b --bits=)'{-b,--bits=}'[set encoded sample size in bits]:bits' '(-e --encoding=)'{-e,--encoding=}'[set encoding]:encoding:(signed-integer unsigned-integer floating-point mu-law a-law)' '(-p --sox-pipe)'{-p,--sox-pipe}'[use SoX pipe]' '(-q --no-show-progress)'{-q,--no-show-progress}'[run in quiet mode]' '*:filename:_files -g "*.wav *.mp3 *.flac *.ogg *.aiff"' && ret=0
|
||||
|
||||
return ret
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
#compdef soxi
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
# Description
|
||||
# -----------
|
||||
# Completion script for the soxi command (from SoX)
|
||||
# (http://sox.sourceforge.net/)
|
||||
#
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Alexander F. Rødseth <xyproto@archlinux.org>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local curcontext="$curcontext" state line
|
||||
local -i ret=1
|
||||
|
||||
_arguments -s -S -C '(-h --help)'{-h,--help}'[display help text]' '(-V --version)'{-V,--version}'[display version information]' '*:filename:_files -g "*.wav *.mp3 *.flac *.ogg *.aiff"' && ret=0
|
||||
|
||||
return ret
|
||||
Loading…
Reference in New Issue