Compare commits

...

28 Commits

Author SHA1 Message Date
Alexander F. Rødseth 107e69e1ba
Merge 4f793a0031 into fb87bc486f 2025-07-21 12:44:01 +10:00
Shohei YOSHIDA fb87bc486f
Merge pull request #1141 from zsh-users/update-completions
Update nanoc and bundler completions
2025-07-20 20:06:13 +09:00
Shohei YOSHIDA 06b7c9bc38
Update bundle completion 2.7.0 2025-07-18 11:37:16 +09:00
Shohei YOSHIDA 12c780b2b1
Update nanoc completion version 4.13.5 2025-07-18 11:37:03 +09:00
Shohei YOSHIDA 922abfe707
Merge pull request #1140 from zsh-users/update-completions
Update completions cmake, node, xsel
2025-07-11 11:28:27 +09:00
Shohei YOSHIDA ed034970c2
Update xsel completion v1.2.1 2025-07-10 12:51:27 +09:00
Shohei YOSHIDA fe11bbe8b0
Update node completion v24.4.0 2025-07-10 12:41:55 +09:00
Shohei YOSHIDA 1ee071125e
Update cmake completion version 3.31 2025-07-10 11:56:56 +09:00
Shohei YOSHIDA 6ba54212d0
Merge pull request #1139 from zsh-users/update-shell-check
Update shellcheck completion v0.10.0
2025-07-09 11:56:48 +09:00
Shohei YOSHIDA 932c16fd0e
Update shellcheck completion 2025-07-08 11:35:41 +09:00
Shohei YOSHIDA e07f6fb780
Merge pull request #1137 from JesseAye/f2b-regex
Add fail2ban-regex options and parameters
2025-06-12 10:16:04 +09:00
Jesse Ayala d326bdc241
Fix error when no matching files in working dir
If there are no files in the current working directory, zparse opts complains with "missing argument for option: -g"

Co-authored-by: Shohei YOSHIDA <syohex@gmail.com>
2025-06-11 20:17:41 -04:00
Jesse 335af5c72d Add fail2ban-regex options and parameters 2025-06-09 00:40:28 -04:00
Shohei YOSHIDA c29efd0bc3
Merge pull request #1136 from zsh-users/update-cppcheck
Update cppcheck completion to version 2.17.1
2025-06-01 09:25:57 +09:00
Shohei YOSHIDA 4625071e98
Update cppcheck completion to version 2.17.1 2025-05-29 22:03:43 +09:00
Shohei YOSHIDA 21789376b8
Merge pull request #1135 from zsh-users/update-completions
Update kak and clang utility completions
2025-05-25 11:16:50 +09:00
Shohei YOSHIDA a221bd2653
Update clang utilities 2025-05-23 13:33:49 +09:00
Shohei YOSHIDA ab95699400
Update UI type name list 2025-05-23 13:33:08 +09:00
Shohei YOSHIDA 99d000d880
Merge pull request #1134 from zsh-users/update-completions
Update shallow-backup, ufw completions
2025-05-17 21:42:55 +09:00
Shohei YOSHIDA d1469c6e4f
Update ufw completion 2025-05-16 17:44:28 +09:00
Shohei YOSHIDA 77cad16cc7
Update shallow-backup completion 2025-05-16 16:30:13 +09:00
Shohei YOSHIDA 8af769e5f1
Format 2025-05-16 16:24:21 +09:00
Shohei YOSHIDA 67e6bdbc3c
Update setcap completion flags 2025-05-16 16:24:04 +09:00
Shohei YOSHIDA 98dd809126
Merge pull request #1133 from zsh-users/update-nodejs
Update node completion for version 24.0.0
2025-05-08 11:24:25 +09:00
Shohei YOSHIDA c4fca6525a
Update node completion for version 24.0.0 2025-05-07 11:25:19 +09:00
Shohei YOSHIDA 4f6441f9ee
Merge pull request #1131 from zsh-users/update-pre-commit
Update pre-commit completion to version 4.2.0
2025-04-28 09:57:22 +09:00
Shohei YOSHIDA 4e0cdee2e7
Update pre-commit completion to version 4.2.0 2025-04-22 15:19:11 +09:00
Alexander F. Rødseth 4f793a0031 Add completions for sox 2024-09-15 16:09:31 +02:00
21 changed files with 428 additions and 393 deletions

View File

@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for Bundler 2.4.1 (https://bundler.io/).
# Completion script for Bundler 2.7.0 (https://bundler.io/).
#
# ------------------------------------------------------------------------------
# Authors
@ -199,6 +199,8 @@ case $state in
'--github=-[specify the github source for the added gem]:github' \
'--branch=-[specify the git branch for the added gem]:branch' \
'--ref=-[specify the git ref for the added gem]' \
"--glob=[specify the location of a dependency's .gemspec, expanded within Ruby]:glob" \
'--quiet[do not print progress information to the starndard output]' \
'--skip-install[adds the gem to the Gemfile but does not install it]' \
'--optimistic[adds optimistic declaration of version]' \
'--strict[adds strict declaration of version]' \
@ -277,6 +279,7 @@ case $state in
'--full-index[fall back to using the single file index of all gems]' \
'--add-platform=-[add a new platform to the lockfile, re-resolving for the addition of that platform]' \
'--remove-platform=-[remove a platform from the lockfile]' \
'--normalize-platforms[normalize lockfile platforms]' \
'--patch[if updating, prefer updating only to next patch version]' \
'--minor[if updating, prefer updating only to next minor version]' \
'--major[if updating, prefer updating to next major version(default)]' \
@ -296,6 +299,7 @@ case $state in
init)
_arguments \
'--gemspec=-[use the specified .gemspec to create the Gemfile]: :_files' \
'--gemfile=[use the specified name for the gamfile instead of Gemfile]:name' \
&& ret=0
;;
gem)
@ -308,9 +312,12 @@ case $state in
'(--ext --no-ext)--no-ext[do not add extension code]' \
'(--no-mit --mit)--mit[add an MIT license to a LICENSE.txt file in the root of the generated project]' \
'(--mit --no-mit)--no-mit[do not create a LICENSE.txt]' \
'(-t --test)'{-t,--test}=-'[specify the test framework]: :(minitest rspec test-unit)' \
'--ci=-[specify the continuous integration service]: :(github travis gitlab circle)' \
'--linter=-[specify the linter and code formatter]: :(rubocop standard)' \
'(-t --test --no-test)'{-t,--test}=-'[specify the test framework]: :(minitest rspec test-unit)' \
'(-t --test --no-test)--no-test[do not use a test framework]' \
'(--ci --no-ci)--ci=-[specify the continuous integration service]: :(github travis gitlab circle)' \
'(--ci --no-ci)--no-ci[do not use a continuous integration service]' \
'(--linter --no-linter)--linter=-[specify the linter and code formatter]: :(rubocop standard)' \
'(--linter --no-linter)--no-linter[do not add a linter]' \
'(-e --edit)'{-e,--edit}=-'[open the resulting GEM_NAME.gemspec in EDITOR]' \
'1::gem_name:' \
&& ret=0

View File

@ -24,7 +24,7 @@
# Description
# -----------
#
# Completion script for clang-check v15.0.2 (https://clang.llvm.org/docs/ClangCheck.html)
# Completion script for clang-check v20.1.2 (https://clang.llvm.org/docs/ClangCheck.html)
#
# ------------------------------------------------------------------------------
# Authors
@ -37,6 +37,8 @@
_arguments \
'(- *)--help[Display available options]' \
'(- *)--help-hidden[Display available more options]' \
'(- *)--help-list[Display list of available options]' \
'(- *)--help-list-hidden[Display list of more available options]' \
'(- *)--version[Display the version of this program]' \
'--analyze[Run static analysis engine]' \
'--analyzer-output-path=[Write output to file]: :_files' \
@ -49,6 +51,8 @@ _arguments \
'--fix-what-you-can[Apply fix-it advice even in the presence of unfixable errors]' \
'--fixit[Apply fix-it advice to the input source]' \
'-p[Build directory where compile_commands.json is]: :_files -/' \
'--print-all-options[Print all option values after command line parsing]' \
'--print-options[Print non-default options after command line parsing]' \
'--syntax-tree-dump[dump the syntax tree]' \
'--tokens-dump[dump the preprocessed tokens]' \
'*: :_files'

View File

@ -24,7 +24,7 @@
# Description
# -----------
#
# Completion script for clang-format v15.0.2 (https://clang.llvm.org/docs/ClangFormat.html)
# Completion script for clang-format v20.1.2 (https://clang.llvm.org/docs/ClangFormat.html)
#
# ------------------------------------------------------------------------------
# Authors
@ -41,24 +41,31 @@ _arguments \
'(- *)--help-hidden[Display available more options]' \
'(- *)--help-list[Display list of available options]' \
'(- *)--help-list-hidden[Display list of more available options]' \
'--Wclang-format-violations[Warnings about individual formatting changes needed]' \
'--Werror=[If set, changes formatting warnings to errors]' \
'*--Wno-error=[If set, do not error out on the specified warning type]:warn' \
'--assume-filename=[Set filename used to determine the language and to find .clang-format file]: :_files' \
'--cursor=[The position of the cursor when invoking clang-format from an editor integration]:pos' \
'(-n --dry-run)'{-n,--dry-run}'[If set, do not actually make the formatting changes]' \
'--dump-config[Dump configuration options to stdout and exit]' \
'--fail-on-incomplete-format[If set, fail with exit code 1 on incomplete format]' \
'--fallback-style=[The name of the predefined style used as a fallback]: :'"($styles)" \
'--ferror-limit=[Set the maximum number of clang-format errors to emit before stopping]:limit' \
'*--files=[Provide a list of files to run clang-format]: :_files' \
'--fno-color-diagnostics[If set, not to print diagnostics in color]' \
'-i[Inplace edit files, if specified]' \
'--length=[Format a range of this length(in bytes)]:bytes' \
'--lines=[format a range of lines]:format' \
'--list-ignored[List ignored files]' \
'--offset=[Format a range starting at this byte offset]' \
'--output-replacements-xml[Output replacements as XML]' \
'--print-all-options[Print all option values after command line parsing]' \
'--print-options[Print non default options after command line parsing]' \
'--qualifier-alignment=[If set, overrides the qualifier alignment style determined by the QualifierAlignment style flag]' \
'--sort-includes[If set, overrides the include sorting behavior determined by the SortIncludes style flag]' \
'--style=[Set coding style]: :'"($styles)" \
'--verbose[If set, show the list of processed files]' \
'(- *)--version[Display the version of this program]' \
'*: :_files'
# Local Variables:

View File

@ -41,12 +41,14 @@ _arguments \
'(- *)--help-hidden[Display available more options]' \
'(- *)--help-list[Display list of available options]' \
'(- *)--help-list-hidden[Display list of more available options]' \
'--allow-no-checks[Allow empty enabled checks]' \
'--checks=[Comma-separated list of globs with optional "-" prefix]:checks' \
'--config=[Specifies a configuration in YAML/JSON format]:conf' \
'--config-file=[Specify the path of .clang-tidy or custom config-file]: :_files' \
'--dump-config[Dumps configuration in the YAML format to stdout]' \
'--enable-check-profile[Enable per-check timing profiles, and print a report to stderr]' \
'--enable-module-headers-parsing[Enable preprocessor-level module header parsing for C++20 and above]' \
'--exclude-header-filter=[Regular expression of headers to exclude diagnostics from]:filter' \
'--explain-config[For each enabled check explains, where it is enabled]' \
'--export-fixes=[YAML file to store suggested fixes in]: :_files' \
'*--extra-arg[Additional argument to append to the compiler command line]:arg' \
@ -54,16 +56,19 @@ _arguments \
'--fix[Apply suggested fixes]' \
'--fix-errors[Apply suggested fixes even if compilation errors were found]' \
'--fix-notes[If a warning has no fix, but a single fix can be found through an associated diagnostic node, apply the fix]' \
'--format-style=[Style for formatting code around applied fixes]: :(llvm google webkit mozilla)' \
'--format-style=[Style for formatting code around applied fixes]: :(none file llvm google webkit mozilla)' \
'--header-filter=[Regular expression matching the names of the headers to output diagnostics from]:regexp' \
'--line-filter=[List of files with line ranges to filter the warnings]' \
'(- *)--list-checks[List all enabled checks and exit]' \
'--load=[Load the specified plugin]: :_files' \
'-p[Build directory where compile_commands.json is]: :_files -/' \
'--print-all-options[Print all option values after command line parsing]' \
'--print-options[Print non default options after command line parsing]' \
'--quiet[Run clang-tidy in quiet mode]' \
'--store-check-profile=[These per-TU profiles are instead stored as JSON]:prefix' \
'--system-headers[Display the errors from system headers]' \
'--use-color[Use colors in diagnostics]' \
'(- *)--version[Display the version of this program]' \
'--verify-config[Check the config files to ensure each check and option is recognized]' \
'--vfsoverlay=[Overlay the virtual filesystem described by file over the real file system]: :_files' \
'--warnings-as-errors=[Upgrades warning to errors]:check' \

View File

@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for CMake 3.25.0 (https://cmake.org).
# Completion script for CMake 3.31.0 (https://cmake.org).
#
# -------------------------------------------------------------------------
# Authors
@ -77,6 +77,7 @@ local -a cmake_build_options=(
'--preset=[Specify a configure preset]:preset:_cmake_presets'
'--list-presets[List available presets]'
'--workflow[Run a workflow preset]'
'-E[CMake command mode]:command:_cmake_command_help'
@ -94,6 +95,7 @@ local -a cmake_build_options=(
'--graphviz=[Generate graphviz of dependencies, see CMakeGraphVizOptions.cmake for more]:graphviz output:_files'
'--system-information[Dump information about this system]::system information output:_files'
'--print-config-dir[Print CMake config directory for user-wide FileAPI queries]'
'--log-level=[Set the verbosity of messages from CMake files]:log level:(ERROR WARNING NOTICE STATUS VERBOSE DEBUG TRACE)'
'--log-context[Prepend log messages with context, if given]'
@ -101,6 +103,8 @@ local -a cmake_build_options=(
'--debug-trycompile[Do not delete the try_compile build tree. Only useful on one try_compile at a time]'
'--debug-output[Put cmake in a debug mode]'
'--debug-find[Put cmake find in a debug mode]'
'--debug-find-pkg=[Limit cmake debug-find to the comma-separated list of packages]:packages'
'--debug-find-var=[Limit cmake debug-find to the comma-separated list of result variables]:variables'
'(--trace-expand)--trace[Put cmake in trace mode]'
'(--trace)--trace-expand[Put cmake in trace mode with variable expansion]'

View File

@ -40,7 +40,7 @@
# Notes
# -----
#
# Created for Cppcheck version 2.12 (https://github.com/danmar/cppcheck)
# Created for Cppcheck version 2.17.1 (https://github.com/danmar/cppcheck)
#
# ------------------------------------------------------------------------------
@ -50,13 +50,17 @@ _cppcheck_files() {
_cppcheck() {
local check_ids='(all warning style performance portability information unusedFunction missingInclude)'
local platforms='(unix32 unix64 win32A win32W win64 avr8 elbrus-e1cp pic8 pic8-enhanced pic16 mips32 native unspecified)'
local coding_standards='(normal autosar cert-c-2016 cert-cpp-2016 misra-c-2012 misra-c-2023 misra-cpp-2008 misra-cpp-2023)'
_arguments \
"--addon=[Execute addon]" \
"--addon-python=[Specify the python interpreter]: :_files" \
"--cppcheck-build-dir=[Analysis output directory]:directory:_files -/" \
"--check-config[Check cppcheck configuration]" \
"--check-level=[Configure how much valueflow analysis you want]:level:(reduced normal exhaustive)" \
"--check-library[Show information when library files have incomplete info]" \
"--checkers-report=[Write a report of all the active checkers to the given file]:file:_files" \
"--clang=[Use clang parser instead of the builtin Cppcheck parser]: :_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" \
@ -72,8 +76,10 @@ _cppcheck() {
"--exitcode-suppressions=[Used when certain messages should be displayed but should not cause a non-zero exitcode]:_files" \
"*--file-filter=[Analyze only those files matching the given filter str]:filter" \
"--file-list=[Specify the files to check in a text file]:_files" \
'(-f --force)'{-f,--force}"[Force checking of all configurations in files]" \
'(- 1 *)'{-h,--help}"[Print this help]" \
"(-f --force)"{-f,--force}"[Force checking of all configurations in files]" \
"(--fsigned-char --funsigned-char)--fsigned-char[Treat char type as signed]" \
"(--fsigned-char --funsigned-char)--funsigned-char[Treat char type as unsigned]" \
"(- 1 *)"{-h,--help}"[Print this help]" \
"-I[A file that contains a list of config-excludes]:directory:_files -/" \
"--include-file=[Specify directory paths to search for included header files in a text file]:file:_files" \
"--include=[Force inclusion of a file before the checked file]:file:_files" \
@ -83,26 +89,34 @@ _cppcheck() {
"-j[Number of threads to do the checking simultaneously]::num" \
"-l[No new threads should be started if the load average is exceeds this value]::load_avg" \
{-x,--language=}"[Forces cppcheck to check all files as the given language]:language:(c c++)" \
"--library=[Load config file that contains information about types and functions]:config:_files" \
"--max-configs=[Maximum number of configurations to check in a file]" \
"--max-ctu-depth=[Maximum depth in whole program analysis]:num" \
"--output-file=[File to save results]:file:_files" \
"--output-format=[Specify the output format]:format:(text sarif xml)" \
"--platform=[Specified platform specific types and sizes]:platform:$platforms" \
"--plist-output=[Generate Clang-plist output files in folder]:_files" \
"--project=[Run Cppcheck on project]:file:_files" \
"--project-configuration=[Limit the configuration cppcheck should check]:configuration" \
"--platform=[Set platform specific types and sizes]:platforms:(unix32 unix64 win32A win32W win64 avr8 elbrus-e1cp pic8 pic8-enhanced pic16 mips32 native unspecified)" \
'(-q --quiet)'{-q,--quiet}"[Do not show progress reports]" \
"(-q --quiet)"{-q,--quiet}"[Do not show progress reports]" \
{-rp,--relative-paths}"=[Use relative paths in output (separated with ;)]:_files" \
"--report-progress[Report progress messages while checking a file]" \
"--report-type=[Add guideline and classification fields for specified coding standard]:standard:$coding_standards" \
"--rule=[Match regular expression]:rule" \
"--rule-file=[Use given rule file]:file:_files" \
"--showtime=[show timing information]:type:(none file file-total summary top5_file top5_summary top5)" \
"--std=[Set standard]:std:(c89 c99 c11 c++03 c++11 c++14 c++17 c++20)" \
"--suppress=[Suppress warnings (format: \[error id\]:\[filename\]:\[line\])]" \
"--suppressions-list=[Suppress warnings listed in the file]:_files" \
"--suppress-xml=[Suppress warnings listed in a xml file]:_files" \
"--template=[Format the error messages]" \
"--template-location=[Format the error message location]" \
"*-U[Undefine preprocessor symbol]:symbol" \
"(-v --verbose)"{-v,--verbose}"[Output more detailed error information]" \
"--version[Print out version number]" \
"--xml[Write results in xml format to stderr]" \
'*: :_cppcheck_files'
"*: :_cppcheck_files"
}
_cppcheck "$@"

57
src/_fail2ban-regex Normal file
View File

@ -0,0 +1,57 @@
#compdef fail2ban-regex
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for fail2ban-regex (https://www.fail2ban.org/).
# Environment:
# Linux 6.14.10-arch1-1 x86_64 GNU/Linux
# zsh 5.9 (x86_64-pc-linux-gnu)
# fail2ban 1.1.0-7
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Jesse Ayala <jesserayala95@gmail.com>
#
# ------------------------------------------------------------------------------
integer NORMARG
_arguments -A "-*" -n \
'--version[show program''s version number]' \
'(-h --help)'{-h,--help}'[display the help message]' \
'(-c --config)'{-c,--config=}'[set alternate config directory]:directory:_files -/' \
'(-d --datepattern)'{-d,--datepattern=}'[set custom pattern used to match date/times]:DATEPATTERN' \
'(--timezone= --TZ=)'{--timezone=,--TZ=}'[set time-zone used by convert time format]:TIMEZONE' \
'(-e --encoding=)'{-e,--encoding=}'[use different encoding from system locale]:ENCODING' \
'(-r --raw)'{-r,--raw}'[raw hosts,don''t resolve dns]' \
'--usedns=[DNS specified replacement of tags <HOST> in regexp]::((yes\:matches all form of hosts no\:IP addresses only))' \
'(-L --maxlines=)'{-L,--maxlines}'[maxlines for multi-line regex]:MAXLINES' \
'(-m --journalmatch=)'{-m,--journalmatch=}'[journalctl style matches overriding filter file; "systemd-journal" only]:JOURNALMATCH' \
'(-l --log-level=)'{-l,--log-level}'[log level for the Fail2Ban logger to use]:LOG_LEVEL' \
'-V[get version in machine-readable short format]' \
'--verbosity=[set numerical level of verbosity]:(0 1 2 3 4)' \
'(--verbose-date --VD)'{--verbose-date,--VD}'[verbose date patterns/regex in output]' \
'(-D --debuggex)'{-D,--debuggex}'[produce debuggex.com urls for debugging there]' \
'--no-check-all[disable check for all regexes]' \
'(-o --out)'{-o,--out}'[set token to print failure information only (row, id, ip, msg, host, ip4, ip6, dns, matches, ...)]:out' \
'--print-no-missed[do not print any missed lines]' \
'--print-no-ignored[do not print any ignored lines]' \
'--print-all-matched[print all matched lines]' \
'--print-all-missed[print all missed lines, no matter how many]' \
'--print-all-ignored[print all ignored lines, no matter how many]' \
'(-t --log-traceback)'{-t,--log-traceback}'[enrich log-messages with compressed tracebacks]' \
'--full-traceback[enrich log-messages with full, uncompressed tracebacks]:' \
'1:file:_files -g \*.log' \
'2:file:_files -W /etc/fail2ban/filter.d -g \*\.\(conf\|local\)' \
'3:file:_files -W /etc/fail2ban/filter.d -g \*\.\(conf\|local\)'
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: set et sw=2 ts=2 ft=zsh:

View File

@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for kak 2022.10.31 (https://github.com/mawww/kakoune)
# Completion script for kak 2024.05.18 (https://github.com/mawww/kakoune)
#
# ------------------------------------------------------------------------------
# Authors
@ -57,7 +57,7 @@ _kak() {
"-f[enter in 'filter mode':select the whole file, then execute keys]:keys" \
'-i[backup the files on which a filter is applied using the given suffix]:suffix' \
'-q[in filter mode, do not print any errors]' \
'-ui[set the type of user interface to use (ncurses, dummy, or json)]:ui_type:(ncurses dummy json)' \
'-ui[set the type of user interface to use (terminal, dummy, or json)]:ui_type:(terminal dummy json)' \
'-l[list existing sessions]:session_id:_kak_sessions' \
'-clear[clear dead sessions]' \
'-debug[initial debug option value]:arg' \

View File

@ -23,7 +23,7 @@
# Description
# -----------
#
# Completion script for nanoc 4.12.16 (https://nanoc.app/)
# Completion script for nanoc 4.13.5 (https://nanoc.app/)
#
# ------------------------------------------------------------------------------
# Authors
@ -94,7 +94,8 @@ case $state in
args=(
{-W,--watch}'[watch for changes and recompile when needed]'
"--diff[generate diff]"
)
"--focus=[compile only items matching the given pattern]:pattern"
)
;;
create-site)
args=(
@ -108,22 +109,21 @@ case $state in
{-L,--list}"[list available locations to deploy to]"
{-n,--dry-run}"[show what would be deployed]"
{-t,--target=}"[specify the location to deploy to (default:\`default\`)]:target"
)
)
;;
prune)
args=(
args+=(
{-n,--dry-run}"[print files to be deleted instead of actually deleting them]"
{-y,--yes}"[confirm deletion]"
)
)
;;
shell)
args=(
{-p,--preprocess}"[run preprocessor]"
)
)
;;
show-data|show-plugins|show-rules)
args=(
)
args=()
;;
view)
args=(
@ -131,7 +131,7 @@ case $state in
{-L,--live-reload}"[reload on changes]"
{-o,--host=}"[specify the host to listen on(default: 127.0.0.1)]:host"
{-p,--port=}"[specify the port to listen on(default: 3000)]:port"
)
)
;;
esac

View File

@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for Node.js v23.8.0 (https://nodejs.org)
# Completion script for Node.js v24.4.0 (https://nodejs.org)
#
# ------------------------------------------------------------------------------
# Authors
@ -49,7 +49,7 @@ _node_files() {
fi
done
_files -g "*.(js|mjs)"
_files -g "*.(js|mjs|ts|mts)"
}
_node_args() {
@ -93,6 +93,7 @@ _arguments -C \
'--cpu-prof-name=[file name of the V8 profile generated with --cpu-prof]: :_files' \
'--diagnostic-dir=[set dir for all output files(default: current working directory)]:dir:_files -/' \
'--disable-proto=[disable Object.prototype.__proto__]:mode:(delete throw)' \
'--disable-sigusr1[disable inspector thread to be listening for SIGUSR1 signal]' \
'*--disable-warning=[silence specific process warnings]:warn type' \
'--disable-wasm-trap-handler[disable trap-handler-based WebAssembly bound checks]' \
'--disallow-code-generation-from-strings[disallow eval and friends]' \
@ -105,7 +106,8 @@ _arguments -C \
'*--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-config-file=[set config file from supplied file]:file:_files' \
'--experimental-default-config-file[set config file from default config file]' \
'--experimental-eventsource[enable experimental EventSource API]' \
'--experimental-import-meta-resolve[experimental ES Module import.meta.resolve() support]' \
'(--loader --experimental-loader)'{--loader,--experimental-loader}'=[Specify the module of a custom ECMAScript Module loader]: :_files' \
@ -150,6 +152,8 @@ _arguments -C \
'--no-experimental-global-navigator[expose experimental Navigator API on the global scope]' \
'--no-experimental-repl-await[disable experimental await keyword support in REPL]' \
'--no-experimental-require-module[allow loading synchronous ES Modules in require()]' \
'--no-experimental-sqlite[disable experimental node sqlite module]' \
'--no-experimental-strip-types[disable experimental type-stripping for TypeScript files]' \
'--no-experimental-websocket[experimental WebSocket API (currently set)]' \
'--no-extra-info-on-fatal-exception[hide extra information on fatal exception that causes exit]' \
'--no-force-async-hooks-checks[disable checks for async_hooks]' \
@ -228,6 +232,7 @@ _arguments -C \
'(- 1 *)--v8-options[print v8 command line options]' \
"--v8-pool-size=[set v8's thread pool size]:number" \
"--watch[run in watch mode]" \
'--watch-kill-signal=[kill signal to send to the process on watch mode restarts]:signal:_signals -s' \
"--watch-path=[path to watch]: :_node_files" \
'--watch-preserve-output[preserve outputs on watch mode restart]' \
'--zero-fill-buffers[automatically zero-fill all newly allocated Buffer and SlowBuffer instances]' \

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

View File

@ -3,7 +3,7 @@
# Description
# -----------
#
# Completion script for pre-commit (https://github.com/pre-commit/pre-commit/).
# Completion script for pre-commit 4.2.0 (https://github.com/pre-commit/pre-commit/).
# Modified from rejected https://github.com/pre-commit/pre-commit/pull/2506
#
# ------------------------------------------------------------------------------
@ -15,7 +15,7 @@
# ------------------------------------------------------------------------------
_pre_commit_commands() {
local _commands=(
local commands=(
"autoupdate:Auto-update pre-commit config to the latest repos' versions"
"clean:Clean out pre-commit files"
"gc:Clean unused cached repos"
@ -30,8 +30,9 @@ _pre_commit_commands() {
"uninstall:Uninstall the pre-commit script"
"validate-config:Validate .pre-commit-config.yaml files"
"validate-manifest:Validate .pre-commit-hooks.yaml files"
"help:Show help for a specific command"
)
_describe 'pre-commit commands' _commands
_describe 'pre-commit commands' commands
}
_pre_commit_options=(
@ -46,6 +47,7 @@ _pre_commit_autoupdate_options=(
"--bleeding-edge[Update to the bleeding edge of 'HEAD' instead of the latest tagged version]"
"--freeze[Store 'frozen' hashes in 'rev' instead of tag names]"
"*--repo[Only update this repository -- may be specified multiple times]:repos:"
{-j,--jobs}"[Number of threads to use]:jobs"
)
_pre_commit_clean_options=(
@ -68,7 +70,7 @@ _pre_commit_init_templatedir_options=(
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
{-c,--config}"[Path to alternate config file]:config:_files -g '*.yaml'"
"--no-allow-missing-config[Assume cloned repos should have a 'pre-commit' config]"
"*"{-t,--hook-type}"[which hook type to install]:hook_types:(pre-commit pre-merge-commit pre-push prepare-commit-msg commit-msg post-commit post-checkout post-merge post-rewrite)"
"*"{-t,--hook-type}"[which hook type to install]:hook_types:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)"
":The directory in which to write the hook script.:_files -/"
)
@ -78,7 +80,7 @@ _pre_commit_install_options=(
{-c,--config}"[Path to alternate config file]:config:_files -g '*.yaml'"
{-f,--overwrite}"[Overwrite existing hooks / remove migration mode]"
"--install-hooks[Whether to install hook environments for all environments in the config file]"
"*"{-t,--hook-type}"[which hook type to install]:hook_types:(pre-commit pre-merge-commit pre-push prepare-commit-msg commit-msg post-commit post-checkout post-merge post-rewrite)"
{-t,--hook-type}"[which hook type to install]:hook_type:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)"
"--allow-missing-config[Hook scripts will permit a missing configuration file]"
)
@ -102,11 +104,13 @@ _pre_commit_run_options=(
{--all-files,-a}"[Run on all the files in the repo]"
"--files[Specific filenames to run hooks on]:files:_files"
"--show-diff-on-failure[When hooks fail, run 'git diff' directly afterward]"
"--hook-stage[The stage during which the hook is fired]:hook_stage:(commit merge-commit prepare-commit-msg commit-msg post-commit manual post-checkout push post-merge post-rewrite)"
"--hook-stage[The stage during which the hook is fired]:hook_stage:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg manual)"
"--remote-branch[Remote branch ref used by 'git push']:remote_branch:"
"--local-branch[Local branch ref used by 'git push']:local_branch:"
{--from-ref,--source,-s}"[the original ref in a 'from_ref...to_ref' diff expression]:from_ref:"
{--to-ref,--origin,-o}"[the destination ref in a 'from_ref...to_ref' diff expression]:to_ref:"
"--pre-rebase-upstream[the upstream from which the series was forked]:pre_rebase_upstream"
"--pre-rebase-branch[the branch being rebased and is not set when rebasing the current branch]:pre_rebase_branch"
"--commit-msg-filename[Filename to check when running during 'commit-msg']:commit_msg_filename:"
"--prepare-commit-message-source[Source of the commit message]:prepare_commit_message_source:"
"--commit-object-name[Commit object name]:commit_object_name:"
@ -132,11 +136,13 @@ _pre_commit_try_repo_options=(
{--all-files,-a}"[Run on all the files in the repo]"
"--files[Specific filenames to run hooks on]:files:_files"
"--show-diff-on-failure[When hooks fail, run 'git diff' directly afterward]"
"--hook-stage[The stage during which the hook is fired]:hook_stage:(commit merge-commit prepare-commit-msg commit-msg post-commit manual post-checkout push post-merge post-rewrite)"
"--hook-stage[The stage during which the hook is fired]:hook_stage:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg manual)"
"--remote-branch[Remote branch ref used by 'git push']:remote_branch:"
"--local-branch[Local branch ref used by 'git push']:local_branch:"
{--from-ref,--source,-s}"[the original ref in a 'from_ref...to_ref' diff expression]:from_ref:"
{--to-ref,--origin,-o}"[the destination ref in a 'from_ref...to_ref' diff expression]:to_ref:"
"--pre-rebase-upstream[the upstream from which the series was forked]:pre_rebase_upstream"
"--pre-rebase-branch[the branch being rebased and is not set when rebasing the current branch]:pre_rebase_branch"
"--commit-msg-filename[Filename to check when running during 'commit-msg']:commit_msg_filename:"
"--prepare-commit-message-source[Source of the commit message]:prepare_commit_message_source:"
"--commit-object-name[Commit object name]:commit_object_name:"
@ -153,7 +159,7 @@ _pre_commit_uninstall_options=(
"(- : *)"{-h,--help}"[show this help message and exit]"
"--color[Whether to use color in output. Defaults to 'auto']:color:(auto always never)"
{-c,--config}"[Path to alternate config file]:config:_files -g '*.yaml'"
"*"{-t,--hook-type}"[which hook type to uninstall]:hook_types:(pre-commit pre-merge-commit pre-push prepare-commit-msg commit-msg post-commit post-checkout post-merge post-rewrite)"
"*"{-t,--hook-type}"[which hook type to uninstall]:hook_types:(commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg)"
)
_pre_commit_validate_config_options=(

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

@ -42,6 +42,10 @@ _setcap() {
local curcontext=$curcontext state line expl ret=1
_arguments -C -s \
'-r[remove capability from file]' \
'--license[display the license info]' \
'-f[force setting even when the capability is invalid]' \
'-h[show help message and exit]' \
'-v[verify that the specified capabilities are currently associated with the file]' \
'-n[set the file capability for use only in a user namespace with this root user ID owner]:rootuid' \
'-q[make the program less verbose in its output]' \

View File

@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for shallow-backup: https://github.com/alichtman/shallow-backup
# Completion script for shallow-backup v6.4: https://github.com/alichtman/shallow-backup
#
# ------------------------------------------------------------------------------
# Authors
@ -38,30 +38,30 @@
#
# ------------------------------------------------------------------------------
_shallow-backup() {
_arguments \
'(- 1 *)'{-h,--help}'[Show help and exit]' \
'(- 1 *)'{-v,--version}'[Print version]' \
'--add-dot[Add a dotfile or dotfolder to config by path]:PATH:_files' \
'--backup-all[Full back up]' \
'--backup-configs[Back up app config files]' \
'--backup-dots[Back up dotfiles]' \
'--backup-fonts[Back up installed fonts]' \
'--backup-packages[Back up package libraries]' \
'--delete-config[Delete config file]' \
'--destroy-backup[Delete backup directory]' \
'--dry-run[Do not backup or reinstall any files, just give verbose output]' \
'--new-path[Input a new back up directory path]:PATH:_files -/' \
'--no-new-backup-path-prompt[Skip setting new back up directory path prompt]' \
'--no-splash[Do not display splash screen]' \
'--reinstall-all[Full reinstallation]' \
'--reinstall-configs[Reinstall configs]' \
'--reinstall-dots[Reinstall dotfiles and dotfolders]' \
'--reinstall-fonts[Reinstall fonts]' \
'--reinstall-packages[Reinstall packages]' \
'--remote[Set remote URL for the git repo]':url \
'--show[Display config file]'
_arguments \
'(- 1 *)'{-h,--help}'[Show help and exit]' \
'(- 1 *)'{-v,--version}'[Print version]' \
'--add-dot[Add a dotfile or dotfolder to config by path]:PATH:_files' \
'--backup-all[Full back up]' \
'--backup-configs[Back up app config files]' \
'--backup-dots[Back up dotfiles]' \
'--backup-fonts[Back up installed fonts]' \
'--backup-packages[Back up package libraries]' \
'--delete-config[Delete config file]' \
'--destroy-backup[Delete backup directory]' \
'--dry-run[Do not backup or reinstall any files, just give verbose output]' \
'--new-path[Input a new back up directory path]:PATH:_files -/' \
'--no-new-backup-path-prompt[Skip setting new back up directory path prompt]' \
'--no-splash[Do not display splash screen]' \
'--reinstall-all[Full reinstallation]' \
'--reinstall-configs[Reinstall configs]' \
'--reinstall-dots[Reinstall dotfiles and dotfolders]' \
'--reinstall-fonts[Reinstall fonts]' \
'--reinstall-packages[Reinstall packages]' \
'--remote[Set remote URL for the git repo]':url \
'--edit[Open config file in $EDITOR]' \
'--show[Display config file]'
}
_shallow-backup

View File

@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for shellcheck (https://github.com/koalaman/shellcheck)
# Completion script for shellcheck v0.10.0 (https://github.com/koalaman/shellcheck)
#
# ------------------------------------------------------------------------------
# Authors
@ -43,12 +43,14 @@ _arguments \
{-C,--color=}'[specify color]:color:(auto always never)' \
{-i,--include=}'[consider only given types of warnings]:error code' \
{-e,--exclude=}'[exclude given types of warnings]:error code' \
'--extended-analysis=[perform dataflow analysis]:bool:(true false)' \
{-f,--format=}'[specify output format]:format:(checkstyle diff gcc json json1 quiet tty)' \
'--list-optional[list checks disabled by default]' \
"--norc[don't look for .shellcheckrc files]" \
'--rcfile=[specify configuration file over searching for one]:rcfile:_files' \
{-o,--enable=}"[give list of optional checks to enable (or 'all')]:error code" \
{-P,--source-path=}'[specify path when looking for sourced files]:_files -/' \
{-s,--shell=}'[specify dialect]:dialect:(sh bash dash ksh)' \
{-s,--shell=}'[specify dialect]:dialect:(sh bash dash ksh busybox)' \
{-S,--severity=}'[specify minimum severity of errors to consider]:severity:(error warning info style)' \
{-V,--version}'[print version information]' \
{-W,--wiki-link-count=}'[specify number of wiki links to show, when applicable]:number' \

View File

@ -35,7 +35,7 @@
# -------
#
# * Bruno Michel (https://github.com/nono)
# * Shoehi Yoshida (https://github.com/nono)
# * Shohei Yoshida (https://github.com/nono)
#
# ------------------------------------------------------------------------------
@ -76,78 +76,78 @@ _showoff() {
'*:: :->args' \
&& ret=0
case $state in
(args)
case $line[1] in
(add|new)
_arguments \
'(-d --dir)'{-d,--dir}='[Slide dir (where to put a new slide file)]:directory:_files -/' \
'(-n --name)'{-n,--name}='[Slide name (name of the new slide file)]:basename' \
{-s,--source}='[Include code from the given file as the slide body]:file:_files' \
'(-t --style --type)'{-t,--style,--type}='[Slide Type/Style (default: title)]:style' \
'(-u --nonumber)'{-u,--nonumber}"[Don't number the slide, use the given name verbatim]" \
'1:title' && ret=0
;;
(create|init)
_arguments \
'(-d --slidedir)'{-d,--slidedir}='[Sample slide directory name (default: one)]:arg' \
'(-n --nosamples)'{-n,--nosamples}="[Don't create sample slides]" \
'1:dir_name' && ret=0
;;
(help)
_arguments \
'-c[List commands one per line, to assist with shell completion]' \
'1: :_showoff_help' && ret=0
;;
(heroku)
_arguments \
'(-f --force)'{-f,--force}'[force overwrite of existing Gemfile, .gems and config.ru files if they exist]' \
'(-p --password)'{-p,--password}='[add password protection to your heroku site(default: none)]' \
'1:heroku_name' && ret=0
;;
(info)
_arguments \
'(-f --file)'{-f,--file}='[alternate json filename]: :_files -g "*.json"' \
'(-j --json)'{-j,--json}'[render output as json]' \
&& ret=0
;;
(pdf|static)
_arguments \
'(-f --file --pres_file)'{-f,--file,--pres_file}='[JSON file used to describe presentation(default: showoff.json)]: :_files -g "*.json"' \
'(-l --lang --language --locale)'{-l,--lang,--language,--locale}'[Language code to generate(default: none)]' \
'1:name' \
&& ret=0
;;
(serve)
_arguments \
'(-S --standalone)'{-S,--standalone}'[Run in standalone mode with no audience interaction]' \
'(-f --file --pres_file)'{-f,--file,--pres_file}='[JSON file used to describe presentation(default: showoff.json)]: :_files -g "*.json"' \
'--git_branch=[Branch of git repository to use(default: none)]:branch' \
'--git_path=[Path of the presentation within the git repository(default: none)]:path' \
'(-h --host)'{-h,--host}='[Host or ip to run on(default: 0.0.0.0)]' \
'--nocache[Disable content caching]'\
'--nosleep[Prevent the computer from sleeping during your presentation]' \
'(-p --port)'{-p,--port}='[Port on which to run(default: 9090)]' \
'(-r --review)'{-r,--review}'[Enable code review]'\
'(-s --ssl)'{-s,--ssl}'[Run via HTTPS]' \
'--ssl_certificate=[Path to SSL certificate]: :_files' \
'--ssl_private_key=[Path to SSL private key]: :_files' \
'(-u --url --git_url)'{-u,--url,--git_url}='[GIT URL to a repository containing the presentation]:url' \
'(-v --verbose)'{-v,--verbose}'[Show verbose messaging]' \
'(-x --execute --executecode)'{-x,--execute,--executecode}'[Enable remote code execution]' \
'1: :_files -/' && ret=0
;;
(skeleton|validate)
_arguments \
'(-f --file)'{-f,--file}'=[alternate json filename(default: none)]: :_files -g "*.json"' \
&& ret=0
;;
*)
(( ret )) && _message 'no more arguments'
;;
esac
;;
esac
case $state in
(args)
case $line[1] in
(add|new)
_arguments \
'(-d --dir)'{-d,--dir}='[Slide dir (where to put a new slide file)]:directory:_files -/' \
'(-n --name)'{-n,--name}='[Slide name (name of the new slide file)]:basename' \
{-s,--source}='[Include code from the given file as the slide body]:file:_files' \
'(-t --style --type)'{-t,--style,--type}='[Slide Type/Style (default: title)]:style' \
'(-u --nonumber)'{-u,--nonumber}"[Don't number the slide, use the given name verbatim]" \
'1:title' && ret=0
;;
(create|init)
_arguments \
'(-d --slidedir)'{-d,--slidedir}='[Sample slide directory name (default: one)]:arg' \
'(-n --nosamples)'{-n,--nosamples}="[Don't create sample slides]" \
'1:dir_name' && ret=0
;;
(help)
_arguments \
'-c[List commands one per line, to assist with shell completion]' \
'1: :_showoff_help' && ret=0
;;
(heroku)
_arguments \
'(-f --force)'{-f,--force}'[force overwrite of existing Gemfile, .gems and config.ru files if they exist]' \
'(-p --password)'{-p,--password}='[add password protection to your heroku site(default: none)]' \
'1:heroku_name' && ret=0
;;
(info)
_arguments \
'(-f --file)'{-f,--file}='[alternate json filename]: :_files -g "*.json"' \
'(-j --json)'{-j,--json}'[render output as json]' \
&& ret=0
;;
(pdf|static)
_arguments \
'(-f --file --pres_file)'{-f,--file,--pres_file}='[JSON file used to describe presentation(default: showoff.json)]: :_files -g "*.json"' \
'(-l --lang --language --locale)'{-l,--lang,--language,--locale}'[Language code to generate(default: none)]' \
'1:name' \
&& ret=0
;;
(serve)
_arguments \
'(-S --standalone)'{-S,--standalone}'[Run in standalone mode with no audience interaction]' \
'(-f --file --pres_file)'{-f,--file,--pres_file}='[JSON file used to describe presentation(default: showoff.json)]: :_files -g "*.json"' \
'--git_branch=[Branch of git repository to use(default: none)]:branch' \
'--git_path=[Path of the presentation within the git repository(default: none)]:path' \
'(-h --host)'{-h,--host}='[Host or IP to run on(default: 0.0.0.0)]' \
'--nocache[Disable content caching]'\
'--nosleep[Prevent the computer from sleeping during your presentation]' \
'(-p --port)'{-p,--port}='[Port on which to run(default: 9090)]' \
'(-r --review)'{-r,--review}'[Enable code review]'\
'(-s --ssl)'{-s,--ssl}'[Run via HTTPS]' \
'--ssl_certificate=[Path to SSL certificate]: :_files' \
'--ssl_private_key=[Path to SSL private key]: :_files' \
'(-u --url --git_url)'{-u,--url,--git_url}='[GIT URL to a repository containing the presentation]:url' \
'(-v --verbose)'{-v,--verbose}'[Show verbose messaging]' \
'(-x --execute --executecode)'{-x,--execute,--executecode}'[Enable remote code execution]' \
'1: :_files -/' && ret=0
;;
(skeleton|validate)
_arguments \
'(-f --file)'{-f,--file}'=[alternate json filename(default: none)]: :_files -g "*.json"' \
&& ret=0
;;
*)
(( ret )) && _message 'no more arguments'
;;
esac
;;
esac
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

186
src/_ufw
View File

@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for The Uncomplicated Firewall (ufw). (https://launchpad.net/ufw).
# Completion script for The Uncomplicated Firewall (ufw) v0.36.2. (https://launchpad.net/ufw).
#
# ------------------------------------------------------------------------------
# Authors
@ -38,108 +38,132 @@
#
# ------------------------------------------------------------------------------
_ufw_logging() {
local params additional second
second=$words[2]
local params additional second
second=$words[2]
if [ ! -z $second ]; then
return
fi
if [ ! -z $second ]; then
return
fi
params=("on" "off")
additional=("low" "medium" "high" "full")
params=(
"on"
"off"
)
additional=(
"low"
"medium"
"high"
"full"
)
_describe -t params 'on/off' params
_describe -t additional 'level' additional
_describe -t params 'on/off' params
_describe -t additional 'level' additional
}
_ufw_delete() {
local rules complrules second
local rules complrules second
second=$words[2]
second=$words[2]
if [ ! -z $second ]; then
return
fi
if [ ! -z $second ]; then
return
fi
complrules=()
rules=("${(f)$(ufw status | tr -s ' ' | tail -n +5 | tr -s '\n')}")
complrules=()
rules=("${(f)$(ufw status | tr -s ' ' | tail -n +5 | tr -s '\n')}")
for ((i=1; i<=${#rules[@]}; i++)); do
complrules+=("$i:$rules[i]");
done
for ((i=1; i<=${#rules[@]}; i++)); do
complrules+=("$i:$rules[i]");
done
_describe -t complrules 'Rules' complrules
_describe -t complrules 'Rules' complrules
}
_ufw_app() {
local ret=1
local -a subcmds=(
"list:list application profiles"
"info:show information on profile"
"update:update profile"
"default:set default application profile"
)
_arguments \
"1: :{_describe 'command' subcmds}" \
&& ret=0
return ret
}
(( $+functions[_flutter_pub_token_subcommand] )) ||
_flutter_pub_token_subcommand() {
local -a subcommands=(
)
_describe -t subcommands 'subcommand' subcommands "$@"
}
_ufw() {
local curcontext="$curcontext" ret=1
local -a state line commands
local curcontext="$curcontext" ret=1
local -a state line commands
commands=(
"enable:enable the firewall"
"disable:disable the firewall"
"default:set default policy"
"logging:set logging level"
"allow:add allow rule"
"deny:add deny rule"
"reject:add reject rule"
"limit:add limit rule"
"delete:delete rule"
"insert:insert rule at position"
"route:add route rule"
"reload:reload firewall"
"reset:reset firewall"
"status:show firewall status"
"show:show firewall report"
"version:display version information"
"prepend:add rule before all of the same type"
)
commands=(
"enable:enable the firewall"
"disable:disable the firewall"
"default:set default policy"
"logging:set logging level"
"allow:add allow rule"
"deny:add deny rule"
"reject:add reject rule"
"limit:add limit rule"
"delete:delete rule"
"insert:insert rule at position"
"route:add route rule"
"reload:reload firewall"
"reset:reset firewall"
"status:show firewall status"
"show:show firewall report"
"version:display version information"
"prepend:add rule before all of the same type"
"app:application profile command"
)
_arguments -C -s -S -n \
'(- 1 *)'--version"[display version information]: :->full" \
'(- 1 *)'{-h,--help}'[display usage information]: :->full' \
'(- 1 *)'--dry-run"[don't modify anything, just show the changes]: :->cmds" \
'1:cmd:->cmds' \
'*:: :->args' && ret=0
_arguments -C -s -S -n \
'(- 1 *)'--version"[display version information]: :->full" \
'(- 1 *)'{-h,--help}'[display usage information]: :->full' \
'(- 1 *)'--dry-run"[don't modify anything, just show the changes]: :->cmds" \
'1:cmd:->cmds' \
'*:: :->args' && ret=0
case "$state" in
(cmds)
_describe -t commands 'commands' commands
case "$state" in
(cmds)
_describe -t commands 'commands' commands
;;
(args)
local cmd
cmd=$words[1]
case "$cmd" in
(logging)
_ufw_logging && ret=0
;;
(delete)
_ufw_delete && ret=0
;;
(*)
_default && ret=0
;;
esac
(args)
local cmd
cmd=$words[1]
case "$cmd" in
(logging)
_ufw_logging && ret=0
;;
(delete)
_ufw_delete && ret=0
;;
(app)
_ufw_app && ret=0
;;
(*)
_default && ret=0
;;
esac
;;
(*)
(*)
;;
esac
esac
return ret
return ret
}
_ufw
_ufw "$@"
# 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

@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for xsel (https://www.vergenet.net/~conrad/software/xsel/).
# Completion script for xsel v1.2.1 (https://www.vergenet.net/~conrad/software/xsel/).
#
# ------------------------------------------------------------------------------
# Authors
@ -45,6 +45,7 @@ local selection='(-p --primary -s --secondary -b --clipboard)'
_arguments -s \
$input{-a,--append}'[append standard input to the selection]' \
$input{-f,--follow}'[append to selection as standard input grows]' \
$input{-z,--zeroflush}'[overwrites selection when zero(\\0) is received]' \
$input{-i,--input}'[read standard input into the selection]' \
{-o,--output}'[write the selection to standard output]' \
$operation{-c,--clear}'[clear the selection]' \
@ -55,6 +56,7 @@ _arguments -s \
$operation{-k,--keep}'[do not modify the selections, but make the PRIMARY and SECONDARY selections persist even after the programs they were selected in exit]' \
$operation{-x,--exchange}'[exchange the PRIMARY and SECONDARY selections]' \
'--display[specify the server to use; see X(1)]:X display:_x_display' \
'--windowName[specify the X WM_ NAME window property]:window_name' \
{-t,--selectionTimeout}'[specify the timeout in milliseconds within which the selection must be retrieved]:number' \
{-l,--logfile}'[specify the file to log errors to when detached (default $HOME/.xsel.log)]:log file:_files' \
{-n,--nodetach}'[do not detach from the controlling terminal]' \