Compare commits
6 Commits
f42d1a0263
...
5f6d41ad39
Author | SHA1 | Date |
---|---|---|
|
5f6d41ad39 | |
|
8d5a945c93 | |
|
cafb93cd93 | |
|
e94efecefa | |
|
1587db0b96 | |
|
4f793a0031 |
|
@ -25,7 +25,7 @@
|
||||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
# Description:
|
# Description:
|
||||||
# Completions for gpgconf (configuration utility provided with GnuPG
|
# Completions for gpgconf (configuration utility provided with GnuPG 2.4.4
|
||||||
# <https://gnupg.org>)
|
# <https://gnupg.org>)
|
||||||
#
|
#
|
||||||
# Authors:
|
# Authors:
|
||||||
|
@ -62,6 +62,9 @@ _arguments \
|
||||||
'--apply-profile[update configuration files using the specified file]:configuration file:_path_files' \
|
'--apply-profile[update configuration files using the specified file]:configuration file:_path_files' \
|
||||||
'--status-fd[write status info to the specified file descriptor]:file descriptor' \
|
'--status-fd[write status info to the specified file descriptor]:file descriptor' \
|
||||||
'--homedir[specify an alternative gnupg configuration home directory]:directory:_directories' \
|
'--homedir[specify an alternative gnupg configuration home directory]:directory:_directories' \
|
||||||
|
'--chuid[change the current user to uid which may either be a number or a name]:uid' \
|
||||||
|
'(--lock --unlock)--unlock[remove a stale lock file hold for file]:name' \
|
||||||
|
'(--lock --unlock)--lock[name of file protected by the lock]:name' \
|
||||||
'(-o --output)'{-o,--output}'[write output to the specified file]:output file:_path_files' \
|
'(-o --output)'{-o,--output}'[write output to the specified file]:output file:_path_files' \
|
||||||
'(-v --verbose)'{-v,--verbose}'[verbose]' \
|
'(-v --verbose)'{-v,--verbose}'[verbose]' \
|
||||||
'(-q --quiet)'{-q,--quiet}'[quiet]' \
|
'(-q --quiet)'{-q,--quiet}'[quiet]' \
|
||||||
|
|
185
src/_play
185
src/_play
|
@ -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
|
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
#compdef rec
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Completion script for the rec command (from SoX)
|
||||||
|
# (http://sox.sourceforge.net/)
|
||||||
|
#
|
||||||
|
# Authors
|
||||||
|
# -------
|
||||||
|
#
|
||||||
|
# * Alexander F. Rødseth <xyproto@archlinux.org>
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
local curcontext="$curcontext" state line
|
||||||
|
local -i ret=1
|
||||||
|
|
||||||
|
_arguments -s -S -C '(-h --help)'{-h,--help}'[display help text]' '(-V --version)'{-V,--version}'[display version information]' '(-D --no-dither)'{-D,--no-dither}"[don't dither automatically]" '(-r --rate=)'{-r,--rate=}'[set sample rate]:rate' '(-c --channels=)'{-c,--channels=}'[specify the number of channels]:channels' '(-t --type=)'{-t,--type=}'[specify file type]:file type:_files' '(-p --sox-pipe)'{-p,--sox-pipe}'[use SoX pipe]' '(-q --no-show-progress)'{-q,--no-show-progress}'[run in quiet mode]' '*:filename:_files -g "*.wav *.mp3 *.flac *.ogg *.aiff"' && ret=0
|
||||||
|
|
||||||
|
return ret
|
|
@ -0,0 +1,21 @@
|
||||||
|
#compdef sox
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Completion script for the sox command (from SoX)
|
||||||
|
# (http://sox.sourceforge.net/)
|
||||||
|
#
|
||||||
|
# Authors
|
||||||
|
# -------
|
||||||
|
#
|
||||||
|
# * Alexander F. Rødseth <xyproto@archlinux.org>
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
local curcontext="$curcontext" state line
|
||||||
|
local -i ret=1
|
||||||
|
|
||||||
|
_arguments -s -S -C '(-h --help)'{-h,--help}'[display help text]' '(-V --version)'{-V,--version}'[display version information]' '(-D --no-dither)'{-D,--no-dither}"[don't dither automatically]" '(-G --guard)'{-G,--guard}'[use temporary files to guard against clipping]' '(-m --combine=)'{-m,--combine=}'[combine input files]:method:(mix merge concatenate)' '(-t --type=)'{-t,--type=}'[specify file type]:file type:_files' '(-r --rate=)'{-r,--rate=}'[set sample rate]:rate' '(-c --channels=)'{-c,--channels=}'[specify the number of channels]:channels' '(-b --bits=)'{-b,--bits=}'[set encoded sample size in bits]:bits' '(-e --encoding=)'{-e,--encoding=}'[set encoding]:encoding:(signed-integer unsigned-integer floating-point mu-law a-law)' '(-p --sox-pipe)'{-p,--sox-pipe}'[use SoX pipe]' '(-q --no-show-progress)'{-q,--no-show-progress}'[run in quiet mode]' '*:filename:_files -g "*.wav *.mp3 *.flac *.ogg *.aiff"' && ret=0
|
||||||
|
|
||||||
|
return ret
|
|
@ -0,0 +1,21 @@
|
||||||
|
#compdef soxi
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Completion script for the soxi command (from SoX)
|
||||||
|
# (http://sox.sourceforge.net/)
|
||||||
|
#
|
||||||
|
# Authors
|
||||||
|
# -------
|
||||||
|
#
|
||||||
|
# * Alexander F. Rødseth <xyproto@archlinux.org>
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
local curcontext="$curcontext" state line
|
||||||
|
local -i ret=1
|
||||||
|
|
||||||
|
_arguments -s -S -C '(-h --help)'{-h,--help}'[display help text]' '(-V --version)'{-V,--version}'[display version information]' '*:filename:_files -g "*.wav *.mp3 *.flac *.ogg *.aiff"' && ret=0
|
||||||
|
|
||||||
|
return ret
|
13
src/_vnstat
13
src/_vnstat
|
@ -28,7 +28,7 @@
|
||||||
# Description
|
# Description
|
||||||
# -----------
|
# -----------
|
||||||
#
|
#
|
||||||
# Completion script for vnstat 2.10
|
# Completion script for vnstat 2.13 (https://github.com/vergoh/vnstat)
|
||||||
#
|
#
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Authors
|
# Authors
|
||||||
|
@ -44,7 +44,9 @@ typeset -A opt_args
|
||||||
local period="-d --days -h --hours -m --months -w --weeks"
|
local period="-d --days -h --hours -m --months -w --weeks"
|
||||||
|
|
||||||
_arguments -C : \
|
_arguments -C : \
|
||||||
|
'--95th[show 95th percentile output for the ongoing month]' \
|
||||||
'--add[create database entry for interface specified]' \
|
'--add[create database entry for interface specified]' \
|
||||||
|
'--alert[show alert, use different exit status]:params' \
|
||||||
'(-b --begin)'{-b,--begin}'[begin the list output with a specific date]:date:' \
|
'(-b --begin)'{-b,--begin}'[begin the list output with a specific date]:date:' \
|
||||||
'--config[specify alternate configuration file]:file:_files' \
|
'--config[specify alternate configuration file]:file:_files' \
|
||||||
"($period)"{-d,--days}'[show traffic for days]' \
|
"($period)"{-d,--days}'[show traffic for days]' \
|
||||||
|
@ -53,6 +55,7 @@ _arguments -C : \
|
||||||
"($period)"{-w,--weeks}'[show traffic for 7 days]' \
|
"($period)"{-w,--weeks}'[show traffic for 7 days]' \
|
||||||
"($period)"{-y,--years}'[show traffic statistics for the last year]' \
|
"($period)"{-y,--years}'[show traffic statistics for the last year]' \
|
||||||
"($period)"{-5,--fiveminutes}'[show traffic statistic with a 5 minute resolution for the last hours]' \
|
"($period)"{-5,--fiveminutes}'[show traffic statistic with a 5 minute resolution for the last hours]' \
|
||||||
|
'--db[use file as database file instead of searching for a database]:db:_files' \
|
||||||
'--dbdir[specify database directory]:directory:_files -/' \
|
'--dbdir[specify database directory]:directory:_files -/' \
|
||||||
'--dbiflist[List interfaces currently in the database]::mode:->dbiflist' \
|
'--dbiflist[List interfaces currently in the database]::mode:->dbiflist' \
|
||||||
'(-D --debug)'{-D,--debug}'[show additional debug output]' \
|
'(-D --debug)'{-D,--debug}'[show additional debug output]' \
|
||||||
|
@ -68,9 +71,10 @@ _arguments -C : \
|
||||||
'(-l --live)'{-l,--live}'[display current transfer rate]:mode:->live' \
|
'(-l --live)'{-l,--live}'[display current transfer rate]:mode:->live' \
|
||||||
'--json[show database content in json format]' \
|
'--json[show database content in json format]' \
|
||||||
'--locale[specify locale]:locale:' \
|
'--locale[specify locale]:locale:' \
|
||||||
|
'--merge[merge interface data from source database to destination database]:src_dst' \
|
||||||
'--nick[set nickname for alias]:nickname:' \
|
'--nick[set nickname for alias]:nickname:' \
|
||||||
'--oneline[traffic summary in one-line, parseable format]' \
|
'--oneline[traffic summary in one-line, parseable format]' \
|
||||||
'(-q --query)'{-q,--query}'[force database query mode]' \
|
'(-q --query)'{-q,--query}'[force database query mode]::query:->query' \
|
||||||
'--remove[delete the database entry for the interface specified]' \
|
'--remove[delete the database entry for the interface specified]' \
|
||||||
'--rename[rename the interface specified in the database with new name]' \
|
'--rename[rename the interface specified in the database with new name]' \
|
||||||
'(-r --reset)'{-r,--reset}'[reset internal counters]' \
|
'(-r --reset)'{-r,--reset}'[reset internal counters]' \
|
||||||
|
@ -114,6 +118,11 @@ case "$state" in
|
||||||
'1[one interface per line]' \
|
'1[one interface per line]' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
|
(query)
|
||||||
|
_values 'query mode' \
|
||||||
|
'a[short summary output]' \
|
||||||
|
's[regular summary output]' && ret=0
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Reference in New Issue