Compare commits

...

4 Commits

Author SHA1 Message Date
Alexander F. Rødseth 847e036afc
Merge 4f793a0031 into c160d09fdd 2025-01-04 18:54:26 +04:00
Shohei YOSHIDA c160d09fdd
Merge pull request #1116 from Mic92/typos
fix typos
2024-12-23 08:30:29 +09:00
Jörg Thalheim 59184db64a fix typos 2024-12-22 08:12:06 +01:00
Alexander F. Rødseth 4f793a0031 Add completions for sox 2024-09-15 16:09:31 +02:00
14 changed files with 86 additions and 192 deletions

View File

@ -167,7 +167,7 @@ case $state in
'--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \ '--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \
"--no-install[don't install the gems, only update the cache]" \ "--no-install[don't install the gems, only update the cache]" \
"--no-prune[don't remove stale gems from the cache]" \ "--no-prune[don't remove stale gems from the cache]" \
'--path=-[specify a different path than the system default($BUNDLE_PATH or $GAM_HOME)]: :_files' \ '--path=-[specify a different path than the system default($BUNDLE_PATH or $GEM_HOME)]: :_files' \
'--quite[only output warnings and errors]' \ '--quite[only output warnings and errors]' \
'--frozen[do not allow the Gemfile.lock to be updated after this bundle cache operation]' \ '--frozen[do not allow the Gemfile.lock to be updated after this bundle cache operation]' \
'--no-color[disable colorization in output]' \ '--no-color[disable colorization in output]' \

View File

@ -1209,7 +1209,7 @@ _concourse_web_args() {
'--credhub-client-secret=[client secret for CredHub authorization]:client secret' \ '--credhub-client-secret=[client secret for CredHub authorization]:client secret' \
'--kubernetes-in-cluster[enables the in-cluster client]' \ '--kubernetes-in-cluster[enables the in-cluster client]' \
'--kubernetes-config-path=[path to Kubernetes config when running ATC outside Kubernetes]: :_files' \ '--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]:prefex' \ '--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-access-key=[AWS Access key ID]:access key' \
'--aws-secretsmanager-secret-key=[AWS Secret Access Key]:secret key' \ '--aws-secretsmanager-secret-key=[AWS Secret Access Key]:secret key' \
'--aws-secretsmanager-session-token=[AWS Session Token]:session token' \ '--aws-secretsmanager-session-token=[AWS Session Token]:session token' \

View File

@ -61,7 +61,7 @@ _cppcheck() {
"--config-exclude=[Path to be excluded from configuration checking]:directory:_files -/" \ "--config-exclude=[Path to be excluded from configuration checking]:directory:_files -/" \
"--config-exclude-files=[A file that contains a list of config-excludes]:file:_files" \ "--config-exclude-files=[A file that contains a list of config-excludes]:file:_files" \
"--doc[Print a list of all available checks]" \ "--doc[Print a list of all available checks]" \
"*--disable=[Disable indivisual checks]:id:$check_ids" \ "*--disable=[Disable individual checks]:id:$check_ids" \
"--dump[Dump xml data for each translation unit]" \ "--dump[Dump xml data for each translation unit]" \
"-D[Define preprocessor symbol]" \ "-D[Define preprocessor symbol]" \
"-U[Undefine preprocessor symbol]" \ "-U[Undefine preprocessor symbol]" \

View File

@ -601,7 +601,7 @@ _flutter_build() {
(aar) (aar)
opts+=( opts+=(
'--target-platform=[The target platform for which the project is compiled]: :(android-arm android-arm64 android-x86 android-x64)' '--target-platform=[The target platform for which the project is compiled]: :(android-arm android-arm64 android-x86 android-x64)'
\*{-P,--android-project-arg}'[Additioanl 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) (apk|appbundle)
@ -610,7 +610,7 @@ _flutter_build() {
'(--no-analyze-size)--analyze-size[Produce additional profile information for artifact output size]' '(--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]' '(--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 -/' '--code-size-directory=[The location to write code size analysis files]: :_files -/'
\*{-P,--android-project-arg}'[Additioanl 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]' '--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]' '--ignore-deprecation[the app should ignore deprecation warnings and continue to build using deprecated APIs]'
'--split-per-abi[Split the APKs per ABIs]' '--split-per-abi[Split the APKs per ABIs]'

View File

@ -148,10 +148,10 @@ _arguments -C \
'--jitless[Disable runtime allocation of executable memory]' \ '--jitless[Disable runtime allocation of executable memory]' \
'--localstorage-file=[file used to persist localStorage data]:file:_files' \ '--localstorage-file=[file used to persist localStorage data]:file:_files' \
'--max-http-header-size=[set the maximum size of HTTP headers]: :number' \ '--max-http-header-size=[set the maximum size of HTTP headers]: :number' \
'--network-family-autoselection-attempt-timeout=[sets the default value for the network family autoselection attemp timeout]:timeout' \ '--network-family-autoselection-attempt-timeout=[sets the default value for the network family autoselection attempt timeout]:timeout' \
'--no-addons[disable loading native addons]' \ '--no-addons[disable loading native addons]' \
'--no-deprecation[silence deprecation warnings]' \ '--no-deprecation[silence deprecation warnings]' \
'--no-experimental-detect-module[when ambigous modules fail to evaluate, try again to evaluate them as ES modules]' \ '--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-global-navigator[expose experimental Navigator API on the global scope]' \
'--no-experimental-repl-await[disable experimental await keyword support in REPL]' \ '--no-experimental-repl-await[disable experimental await keyword support in REPL]' \
'--no-experimental-require-module[allow loading synchronous ES Modules in require()]' \ '--no-experimental-require-module[allow loading synchronous ES Modules in require()]' \

185
src/_play
View File

@ -1,190 +1,21 @@
#compdef play #compdef play
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
#
# Description # 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 # Authors
# ------- # -------
# #
# * Julien Nicoulaud <julien.nicoulaud@gmail.com> # * Alexander F. Rødseth <xyproto@archlinux.org>
# * Mario Fernandez (https://github.com/sirech)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
local curcontext="$curcontext" state line
local -i ret=1
_play() { _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 context curcontext="$curcontext" state line
typeset -A opt_args
local ret=1 return ret
_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

View File

@ -377,10 +377,10 @@ _rails_generate() {
;| ;|
(controller|job|model|resource|scaffold) (controller|job|model|resource|scaffold)
opts+=( opts+=(
'--parent=[The parent class for the generated controler]:parent class' '--parent=[The parent class for the generated controller]:parent class'
) )
;| ;|
(controler|mailer|resource|scaffold|scaffold_controller) (controller|mailer|resource|scaffold|scaffold_controller)
opts+=( opts+=(
'(-e --template-engine)'{-e,--template-engine=}'[Template engine to be invoked]:engine:(erb)' '(-e --template-engine)'{-e,--template-engine=}'[Template engine to be invoked]:engine:(erb)'
) )

21
src/_rec Normal file
View File

@ -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

View File

@ -40,7 +40,7 @@ local -a redis_commands=(
'append:append a value to a key' 'append:append a value to a key'
'auth:authenticate to the server' 'auth:authenticate to the server'
'bgrewriteeaof:asynchronously rewrite the append-only file' 'bgrewriteeaof:asynchronously rewrite the append-only file'
'bgsave:asynchornously save the dataset to disk' 'bgsave:asynchronously save the dataset to disk'
'blpop:remove and get the first element in a list, or block until one is available' 'blpop:remove and get the first element in a list, or block until one is available'
'brpop:remove and get the last element in a list, or block until one is available' 'brpop:remove and get the last element in a list, or block until one is available'
'brpoplpush:pop a value from a list, push it to another list and return it; or block until one is available' 'brpoplpush:pop a value from a list, push it to another list and return it; or block until one is available'

View File

@ -874,7 +874,7 @@ case "$words[1]" in
;; ;;
force:package2:version:get) force:package2:version:get)
_command_args=( _command_args=(
'(-i|--package2versionid)'{-i,--package2versionid}'[the package version ID (starts wtih 05i)]' \ '(-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]' \ '(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \ '(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \ '(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
@ -904,7 +904,7 @@ case "$words[1]" in
;; ;;
force:package2:version:update) force:package2:version:update)
_command_args=( _command_args=(
'(-i|--package2versionid)'{-i,--package2versionid}'[the package version ID (starts wtih 05i)]' \ '(-i|--package2versionid)'{-i,--package2versionid}'[the package version ID (starts with 05i)]' \
'(-n|--name)'{-n,--name}'[the package version name]' \ '(-n|--name)'{-n,--name}'[the package version name]' \
'(-d|--description)'{-d,--description}'[the package version description]' \ '(-d|--description)'{-d,--description}'[the package version description]' \
'(-b|--branch)'{-b,--branch}'[the package version branch]' \ '(-b|--branch)'{-b,--branch}'[the package version branch]' \

21
src/_sox Normal file
View File

@ -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

21
src/_soxi Normal file
View File

@ -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

View File

@ -191,7 +191,7 @@ _supervisorctl_running_procs() {
_supervisorctl_collect_procs 'RUNNING' _supervisorctl_collect_procs 'RUNNING'
} }
(( $+functions[_supervisorctl_stoped_procs] )) || (( $+functions[_supervisorctl_stopped_procs] )) ||
_supervisorctl_stopped_procs() { _supervisorctl_stopped_procs() {
_supervisorctl_collect_procs 'STOPPED' _supervisorctl_collect_procs 'STOPPED'
} }

View File

@ -73,7 +73,7 @@ _vboxmanage() {
'--ostype=[Specifies the guest OS to run in the VM]: :_vboxostypes' \ '--ostype=[Specifies the guest OS to run in the VM]: :_vboxostypes' \
'--register[Registers the VM with your Oracle VM VirtualBox installation]' \ '--register[Registers the VM with your Oracle VM VirtualBox installation]' \
'--uuid=[Specifies the Universally Unique Identifier(UUID) of the VM]:uuid' \ '--uuid=[Specifies the Universally Unique Identifier(UUID) of the VM]:uuid' \
'--ciper=[Specifies the cipher to use for encryption]: :(AES-128 AES-256)' \ '--cipher=[Specifies the cipher to use for encryption]: :(AES-128 AES-256)' \
'--password-id=[Specifies a new password identifier]:password_id' \ '--password-id=[Specifies a new password identifier]:password_id' \
'--password=[Use the --password to supply the encryption password of the VM]: :_files' \ '--password=[Use the --password to supply the encryption password of the VM]: :_files' \
&& ret=0 && ret=0
@ -287,7 +287,7 @@ _vboxmanage() {
;; ;;
(setproperty) (setproperty)
_arguments \ _arguments \
'1: :(autostartdbpath defaultfrontend hwvirtexclusive launguage logginglevel loghistorycount machinefolder proxymode proxyurl vrdeauthlibrary vrdeextpack websrvauthlibrary)' \ '1: :(autostartdbpath defaultfrontend hwvirtexclusive language logginglevel loghistorycount machinefolder proxymode proxyurl vrdeauthlibrary vrdeextpack websrvauthlibrary)' \
'2:value:_vboxmanage_setproperty_value' \ '2:value:_vboxmanage_setproperty_value' \
&& ret=0 && ret=0
;; ;;