Compare commits

...

6 Commits

Author SHA1 Message Date
Alexander F. Rødseth 69ea1b9520
Merge 4f793a0031 into a7f01622f7 2025-01-14 11:41:37 -06:00
Shohei YOSHIDA a7f01622f7
Merge pull request #1118 from zsh-users/update_ccache
Update ccache completion to version 4.10.2
2025-01-12 19:43:23 +09:00
Shohei YOSHIDA 681bd4bff8
Update ccache completion to version 4.10.2 2025-01-12 19:32:53 +09:00
Shohei YOSHIDA 1819f7aefc
Merge pull request #1117 from zsh-users/update_node
Update node completion to 23.6.0
2025-01-12 15:57:17 +09:00
Shohei YOSHIDA 4201e3ca77
Update node completion to 23.6.0 2025-01-10 14:55:27 +09:00
Alexander F. Rødseth 4f793a0031 Add completions for sox 2024-09-15 16:09:31 +02:00
6 changed files with 176 additions and 299 deletions

View File

@ -1,6 +1,6 @@
#compdef ccache -P -value-,CCACHE_*,-default-
# zsh completion script for ccache 4.6.1
# zsh completion script for ccache 4.10.2
# Copyright 2018 CERN for the benefit of the LHCb Collaboration.
@ -49,51 +49,55 @@ _ccache_compilers() {
_ccache_booleans() {
_message 'There are no "false" values, unset variable to disable'
local description; description=${1:-boolean}
local booleans; booleans=(
'true'
'yes'
)
local description=${1:-boolean}
local -a booleans=('true' 'yes')
_describe -t booeans "$description" booleans
}
(( $+functions[_ccache_compressionlevels] )) ||
_ccache_compressionlevels() {
local -a one_nine
one_nine=(1 2 3 4 5 6 7 8 9)
_describe -t onetonine "compression level (if using compression)" one_nine
}
(( $+functions[_ccache_sloppiness] )) ||
_ccache_sloppiness() {
_values -s ',' \
"file_macro[ignore __FILE__]" \
"file_stat_matches[rely on mtimes and ctimes]" \
"include_file_ctime[ignore headers' ctime too new]" \
"include_file_mtime[ignore headers' mtime too new]" \
"no_system_headers[exclude system headers from cache]" \
"pch_defines[be sloppy about #defines in pch]" \
"time_macros[ignore __date__ and __time__]"
'clang_index_store[ignore the clang compiler option -index-store-path and its argument]' \
'file_stat_matches[rely on mtimes and ctimes]' \
'file_stat_matches_ctime[ignore ctime when file_stat_matches is enabled]' \
'gcno_cwd[not hash the current working directory]' \
'incbin[pretend the .incbin directive]' \
'include_file_ctime[ignore headers ctime too new]' \
'include_file_mtime[ignore headers mtime too new]' \
'ivfsoverlay[ignore the clang option -ivfsoverlay and its argument]' \
'locale[include locale environment variables in the hash]' \
'module[enable cache even if -fmodules is used]' \
'pch_defines[be sloppy about #defines in pch]' \
'random_seed[ignore the -frandom-seed option and its argument]' \
'system_headers[only check non-system headers in direct mode]' \
'time_macros[ignore __DATE__ and __TIME__]'
}
(( $+functions[_ccache_compilerchecks] )) ||
_ccache_compilerchecks() {
local -a compiler_check_values
compiler_check_values=(
'content: the actual compiler binary'
'mtime: mtime and size of the compiler'
'none: ignore compiler for hashing'
'string\:: any hard coded string (pre-computed version)'
'%compiler%\ -v:any compiler invocation output'
local -a compiler_check_values=(
'content:the actual compiler binary'
'mtime:mtime and size of the compiler'
'none:ignore compiler for hashing'
'string\::any hard coded string (pre-computed version)'
'%compiler%\ -v:any compiler invocation output'
)
_describe -t compilerchecks "compiler information included in the hash" compiler_check_values
}
(( $+functions[_ccache_dirlevels] )) ||
_ccache_dirlevels() {
local -a one_eight
one_eight=(1 2 3 4 5 6 7 8)
_describe -t onetoeight "directory levels in the cache directory" one_eight
(( $+functions[_ccache_compiler_type] )) ||
_ccache_compiler_type() {
local -a compiler_types=(
'auto:guess compiler name'
'clang:clang-based compiler'
'clang-cl:clang-cl'
'gcc:gcc-based compiler'
'icl:Intel compiler on Windows'
'msvc:Microsoft Visual C++'
'nvcc:NVCC CUDA compiler'
'other:any compiler other than the known types'
)
_describe -t compiler_types "compiler types" compiler_types
}
if [[ "$service" = -value-* ]]; then
@ -105,9 +109,6 @@ if [[ "$service" = -value-* ]]; then
# all: a single path
_path_files -/
;;
*CCACHE_NLEVELS*)
_ccache_dirlevels
;;
*CCACHE_CC*)
_ccache_compilers
;;
@ -117,9 +118,6 @@ if [[ "$service" = -value-* ]]; then
*CCACHE_*COMPRESS*)
_ccache_booleans "write compressed cache"
;;
*CCACHE_COMPRESSLEVEL*)
_ccache_compressionlevels
;;
*CCACHE_EXTENSION*)
_alternative ':set extension for intermediate files: '
;;
@ -191,7 +189,7 @@ if [[ "$service" = -value-* ]]; then
_alternative ":umask value (octal): "
;;
*CCACHE_*UNIFY*)
_ccache_booleans "normalise sources prior to processing"
_ccache_booleans "normalize sources prior to processing"
;;
esac
@ -199,102 +197,87 @@ if [[ "$service" = -value-* ]]; then
fi
__ccache_config_keys() {
local -a keys
keys=(
'compression:write compressed cache'
'direct_mode:use direct mode'
'disable:disable cache usage'
'hard_link:create hard links rather than copies'
'hash_dir:include the cwd in the hash'
'keep_comments_cpp:consider comments in hashing'
'read_only:treat cache as read-only'
'read_only_direct:retrieve from read-only cache in direct mode'
'recache:use cache in write-only mode'
'run_second_cpp:pass original rather than preprocessed source code to compiler'
'stats:update statistics counters'
'unify:normalise sources prior to processing'
'base_dir:specify relative to which top level paths are hashed'
'temporary_dir:specify where temporary files are kept'
'cache_dir:specify where the cache is kept'
'compiler:specify compiler'
'cache_dir_levels:directory levels in the cache directory'
'compiler_check:compiler information included in the hash'
'compression_level:cache compression level'
'cpp_extension:set extensions for intermediate files'
'extra_files_to_hash:additional files to consider in hashing'
'ignore_headers_in_manifest:set paths to headers to ignore in hashing'
'limit_multiple:cleanup level'
'log_file:specify a log file'
'max_files:maximum number of files in the cache'
'max_size:maximum size of the cache'
'path:PATH for compiler lookup (instead of $PATH)'
'prefix_command:prefixes for compiler invocation'
'prefix_command_cpp:prefixes for preprocessor invocation'
'sloppiness:hash files sloppy'
'umask:set umask for ccache and child processes (e.g. for sharing cache)'
local -a keys=(
'absolute_paths_in_stderr:rewrite relative paths in error output to absolute paths'
'base_dir:specify relative to which top level paths are hashed'
'cache_dir:specify where the cache is kept'
'compiler:specify compiler'
'compiler_check:compiler information included in the hash'
'compiler_type:force a compiler type'
'compression:write compressed cache'
'compression_level:cache compression level'
'cpp_extension:set extensions for intermediate files'
'debug:enable debug mode'
'debug_dir:specify directory to write debug files'
'debug_level:specify the amount of debug information'
'depend_mode:enable depend mode'
'direct_mode:use direct mode'
'disable:disable cache usage'
'extra_files_to_hash:additional files to consider in hashing'
'file_clone:use file cloning to store and fetch cached compiler results'
'hard_link:create hard links rather than copies'
'hash_dir:include the cwd in the hash'
'ignore_headers_in_manifest:set paths to headers to ignore in hashing'
'ignore_options:list of options that ccache will ignore'
'inode_cache:cache source file hashes based on device, inode and timestamps'
'keep_comments_cpp:consider comments in hashing'
'log_file:specify a log file'
'max_files:maximum number of files in the cache'
'max_size:maximum size of the cache'
'msvc_dep_prefix:specify the prefix of included files output for MSVC compiler'
'namespace:namespace will be added to the hashed data for each compilation'
'path:PATH for compiler lookup (instead of $PATH)'
'pch_external_checksum:use .sum file for hash'
'prefix_command:prefixes for compiler invocation'
'prefix_command_cpp:prefixes for preprocessor invocation'
'read_only:treat cache as read-only'
'read_only_direct:retrieve from read-only cache in direct mode'
'recache:use cache in write-only mode'
'remote_only:use remote storage'
'remote_storage:specify one or several storage backends'
'reshare:write results to remote storage even for local storage cache hits'
'run_second_cpp:pass original rather than preprocessed source code to compiler'
'sloppiness:hash files sloppy'
'stats:update statistics counters'
'stats_log:write statistics counter updates to the specified file'
'temporary_dir:specify where temporary files are kept'
'umask:set umask for ccache and child processes (e.g. for sharing cache)'
)
_describe -t configkeys "configuration keys" keys -S '='
}
if compset -P '--set-config=*='; then
case $IPREFIX in
*=compression= | *=direct_mode= | *=disable= | *=hard_link= | *=hash_dir= | *=keep_comments_cpp= | *=read_only= | *=read_only_direct= | *=recache= | *=run_second_cpp= | *=stats= | *=unify= )
local booleans; booleans=(
'true'
'false'
)
( *=absolute_paths_in_stderr= | *=compression= | *=debug= | *=depend_mode= | *=direct_mode= | *=disable= | *=file_clone= | *=hard_link= | *=hash_dir= | *=inode_cache= | *=keep_comments_cpp= | *=read_only= | *=read_only_direct= | *=recache= | *=run_second_cpp= | *=stats= | *=unify= )
local -a booleans=('true' 'false')
_describe -t booleans 'boolean' booleans
;;
*=base_dir= | *=temporary_dir= | *=cache_dir=)
(*=base_dir= | *=cache_dir= | *=debug_dir= | *=temporary_dir=)
_path_files -/
;;
*=compiler=)
(*=compiler=)
_ccache_compilers
;;
*=cache_dir_levels=)
_ccache_dirlevels
;;
*=compiler_check=)
(*=compiler_check=)
_ccache_compilerchecks
;;
*=compression_level=)
_ccache_compressionlevels
(*=compiler_type=)
_ccache_compiler_type
;;
*=cpp_extension=)
_alternative ':set extension for intermediate files: '
;;
*=extra_files_to_hash=)
(*=extra_files_to_hash=)
local sep=:
compset -P "*${sep}"
compset -S "${sep}*" || suf="$sep"
_files "" -r "${sep}"' /\t\t\-' "$@"
;;
*=ignore_headers_in_manifest=)
( *=ignore_headers_in_manifest= | *=path= )
_dir_list
;;
*=limit_multiple=)
_alternative ":clean up down to level (e.g. 0.8): "
;;
*=log_file=)
(*=log_file= | *=stats_log= )
_path_files -g "*(/) *.log"
;;
*=max_files=)
_alternative ":maximum number of files in the cache (0= no limit): "
;;
*=max_size=)
_alternative ':maximum cache size (0= no limit) with suffix k,M,G,T or Ki,Mi,Gi,Ti: '
;;
*=path=)
_alternative ':PATH for compiler lookup (instead of $PATH):_dir_list'
;;
*=prefix_command=)
_alternative ':prefixes for compiler invocation: '
;;
*=prefix_command_cpp=)
_alternative ':prefixes for preprocessor invocation: '
;;
*=sloppiness=)
(*=sloppiness=)
_ccache_sloppiness
;;
*=umask=)
@ -316,9 +299,10 @@ elif [[ $words[2] == -* ]]; then
'(-F --max-files=)'{-F,--max-files=}'[set maximum number of files in cache]:number of files in cache: ' \
'(-M --max-size=)'{-M,--max-size=}'[set maximum size of cache]:cache size: ' \
'(-X --recompress)'{-X,--recompress}'[recompress the cache to level LEVEL]:level' \
\*{-o,--set-config}'[set configuration item KEY to value VAL]:key_val' \
'--recompress-threads[use up to THREADS threads when recompressing the cache]:threads' \
'(-x --show-compression)'{-x,--show-compression}'[show compression statistics]' \
'(-p --show-config)'{-p,--show-config}'[show current configuration options]' \
'--show-log-stats[print statistics counters from the stas log in human-readable format]' \
'--show-log-stats[print statistics counters from the stats log in human-readable format]' \
'(-s --show-stats)'{-s,--show-stats}'[show statistics summary]' \
'(-v --verbose)'{-v,--verbose}'[increase verbosity]' \
'(-z --zero-stats)'{-z,--zero-stats}'[zero statistics counters]' \
@ -329,10 +313,13 @@ elif [[ $words[2] == -* ]]; then
'--trim-recompress-threads[use up to THREADS threads when recompressing]:threads' \
'--checksum-file[print the checksum of the file at PATH]: :_files' \
'--extract-result[extract file data stored in result file at PATH to the current working directory]' \
'--format[specify format for --print-log-stats and --print-stats]:format:(tab json)' \
'(-k --get-config)'{-k,--get-config}'[print the value of configuration key]:key' \
'--hash-file[print the hash of the file at PATH]: :_files' \
'--inspect[print result/manifest file at PATH in human-readable format]' \
'--print-stats[print statistics counter IDs and corresponding values in machine-parsable format]'
'--print-log-stats[print statistics counter IDs and corresponding values from the stats log]' \
'--print-stats[print statistics counter IDs and corresponding values in machine-parsable format]' \
'--print-version[print version only]'
elif [[ $CURRENT -eq 2 ]]; then
_ccache_compilers
else

View File

@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for Node.js v23.4.0 (https://nodejs.org)
# Completion script for Node.js v23.6.0 (https://nodejs.org)
#
# ------------------------------------------------------------------------------
# Authors
@ -81,7 +81,7 @@ _arguments -C \
'--allow-fs-read=[allow permissions to read the filesystem]: :_files' \
'--allow-fs-write=[allow permissions to write in the filesystem]:_files' \
'--allow-wasi[allow wasi when any permissions are set]' \
'--allow-worker[allow worker threads thwn 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]' \
@ -99,26 +99,21 @@ _arguments -C \
'--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]' \
'--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-async-context-frame[improve AsyncLocalStorage performance with AsyncContextFrame]' \
'--experimental-default-type=[set module system to use by default]:module system:(commonjs module)' \
'--experimental-eventsource[enable experimental EventSource API]' \
'--experimental-import-meta-resolve[experimental ES Module import.meta.resolve() support]' \
'(--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-permission[enable the permission system]' \
'--experimental-print-required-tla[print pending top-level await]' \
'--experimental-sea-config=[generate a blob that can be embedded into the single executable application]: :_files' \
'--experimental-sqlite[experimental node:sqlite module]' \
'--experimental-strip-types[experimental type-stripping for TypeScript files]' \
'--experimental-test-coverage[enable code coverage in the test runner]' \
'--experimental-test-isolation=[configures the type of test isolation used in the test runner]:isolation' \
'--experimental-test-module-mocks[enable module mocking in the test runner]' \
'--experimental-test-snapshots[enable snapshot testing 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-wasm-modules[experimental ES module support for webassembly modules]' \
@ -192,6 +187,7 @@ _arguments -C \
'--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-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)' \

185
src/_play
View File

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

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

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