aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/_emacs149
-rw-r--r--src/_emacsclient66
-rw-r--r--src/_fleetctl123
-rw-r--r--src/_mussh42
-rw-r--r--src/_rkt369
-rw-r--r--src/_rslsync41
-rw-r--r--src/_rsvm88
-rw-r--r--src/_supervisorctl237
-rw-r--r--src/_supervisord245
-rw-r--r--src/_svm204
10 files changed, 438 insertions, 1126 deletions
diff --git a/src/_emacs b/src/_emacs
index cba58eb..8ecd182 100644
--- a/src/_emacs
+++ b/src/_emacs
@@ -1,4 +1,4 @@
-#compdef emacs
+#compdef emacs emacsclient
# ------------------------------------------------------------------------------
# Copyright (c) 2022 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
@@ -35,67 +35,92 @@
#
# ------------------------------------------------------------------------------
-_arguments \
- '--batch[do not do interactive display, implies -q]' \
- '--chdir[change to directory]: :_files -/' \
- '(--daemon --bg-daemon --fg-daemon)--daemon[start a server in the background]' \
- '(--daemon --bg-daemon --fg-daemon)--bg-daemon=-[start a named server in the background]::name' \
- '(--daemon --bg-daemon --fg-daemon)--fg-daemon=-[start a named server in the foreground]' \
- '--debug-init[enable Emacs Lisp debugger for init file]' \
- '(-d --display)'{-d,--display}'[use X server DISPLAY]:display' \
- '--module-assertions[assert behavior of dynamic modules]' \
- '--dump-file[read dumped state from FILE]: :_files' \
- '(- *)--fingerprint[output fingerprint and exit]' \
- '--seccomp=[read Seccomp BPF filter from FILE]: :_files' \
- '--no-build-details[do not add build details such as time stamps]' \
- '--no-desktop[do not load a saved desktop]' \
- '(-q --no-init-file)'{-q,--no-init-file}'[loader neither ~/.emacs nor default.el]' \
- '(-nl --no-loadup)'{-nl,--no-loadup}'[do not load loadup.el]' \
- '--no-site-file[do not load site-start.el]' \
- '--no-x-resources[do not load X resources]' \
- '(-nsl --no-site-lisp)'{-nsl,--no-site-lisp}'[do not add site-lisp directories to load-path]' \
- '--no-splash[do not display a splash screen on startup]' \
- '(-nw --no-window-system)'{-nw,--no-window-system}'[do not communicate with X, ignoring $DISPLAY]' \
- '--init-directory=[use DIR when looking for the Emacs init files]: :_files -/' \
- '(-Q --quick)'{-Q,--quick}'[equivalent to -q --no-site-file --no-site-lisp --no-splash --no-x-resources]' \
- '--script[run FILE as an Emacs Lisp script]: :_files' \
- '-x[same as -Q --script]' \
- '(-t --terminal)'{-t,--terminal}'[use DEVICE for terminal IO]: :_files' \
- '(-u --user)'{-u,--user}'[load ~USER/.emacs instead of your own]' \
- \*{-L,--directory}'[prepend DIR to load-path(with :DIR, append DIR)]: :_files -/' \
- {--eval,--execute}'[evaluate Emacs Lisp expression EXPR]:expr' \
- \*{--file,--find-file,--visit}'[visit FILE]: :_files' \
- \*{-f,--funcall}'[call Emacs Lisp function FUNC with no arguments]:func' \
- '--insert[insert contents of FILE into current buffer]:file:_files' \
- '--kill[exit without asking for confirmation]' \
- \*{-l,--load}'[load Emacs Lisp FILE using the load function]: :_files' \
- '(-bg --background-color)'{-bg,--background-color}'[window background color]:color' \
- '(-D --basic-display)'{-D,--basic-display}'[disable many display features]' \
- '(-bg --border-color)'{-bg,--border-color}'[main border color]:color' \
- '(-bw --border-width)'{-bw,--border-width}'[width of main border]' \
- '--color=-[override color mode for character terminals]:: :(auto never always ansi8)' \
- '(-cr --cursor-color)'{-cr,--cursor-color}'[color of the Emacs cursor indicating point]:color' \
- '(-fn --font)'{-fn,--font}'[default font, must be fixed-width]:font' \
- '(-fg --foreground)'{-fg,--foreground}'[window foreground color]:color' \
- '(-fh --fullheight)'{-fh,--fullheight}'[make the first frame high as the screen]' \
- '(-fs --fullscreen)'{-fs,--fullscreen}'[make the first frame fullscreen]' \
- '(-fw --fullwidth)'{-fw,--fullwidth}'[make the first frame wide as the screen]' \
- '(-mm --maximized)'{-mm,--maximized}'[make the first frame maximized]' \
- '(-g --geometry)'{-g,--geometry}'[window geometry]:geometry' \
- '(-nbi --no-bitmap-icon)'{-nbi,--no-bitmap-icon}'[do not use picture of gnu for Emacs icon]' \
- '--iconic[start Emacs in iconified state]' \
- '(-ib --internal-border)'{-ib,--internal-border}'[width between text and main border]:width' \
- '(-lsp --line-spacing)'{-lsp,--line-spacing}'[additional space to put between lines]' \
- '(-ms --mouse-color)'{-ms,--mouse-color}'[mouse cursor color in Emacs window]:color' \
- '(-T --name --title)'{-T,--name,--title}'[title for initial Emacs frame]:title' \
- '(-nbc,--no-blinking-cursor)'{-nbc,--no-blinking-cursor}'[disable blinking cursor]' \
- '(-r -rv --reverse-video)'{-r,-rv,--reverse-video}'[switch foreground and background]' \
- '(-vb --vertical-scroll-bars)'{-vb,--vertical-scroll-bars}'[enable vertical scroll bars]' \
- '--xrm[set additional X resources]:resource' \
- '--parent-id[set parent window]:xid' \
- '(- *)--help{display help and exit}' \
- '(- *)--version[output version information and exit]' \
- '*: :_files'
+case $service in
+ (emacs)
+ _arguments -s \
+ '--batch[do not do interactive display, implies -q]' \
+ '--chdir[change to directory]:dir:_files -/' \
+ '(--daemon --bg-daemon --fg-daemon)'{--daemon,--bg-daemon=-}'[start a named server in the background]::name' \
+ '(--daemon --bg-daemon --fg-daemon)--fg-daemon=-[start a named server in the foreground]::name' \
+ '--debug-init[enable Emacs Lisp debugger for init file]' \
+ '(-d --display)'{-d,--display}'[use X server DISPLAY]:display:_x_display' \
+ '--module-assertions[assert behavior of dynamic modules]' \
+ '--dump-file[read dumped state from FILE]:file:_files' \
+ '(- *)--fingerprint[output fingerprint and exit]' \
+ '--seccomp=[read Seccomp BPF filter from FILE]: :_files' \
+ '--no-build-details[do not add build details such as time stamps]' \
+ '--no-desktop[do not load a saved desktop]' \
+ '(-q --no-init-file)'{-q,--no-init-file}'[loader neither ~/.emacs nor default.el]' \
+ '(-nl --no-loadup)'{-nl,--no-loadup}'[do not load loadup.el]' \
+ '--no-site-file[do not load site-start.el]' \
+ '--no-x-resources[do not load X resources]' \
+ '(-nsl --no-site-lisp)'{-nsl,--no-site-lisp}'[do not add site-lisp directories to load-path]' \
+ '--no-splash[do not display a splash screen on startup]' \
+ '(-nw --no-window-system)'{-nw,--no-window-system}'[do not communicate with X, ignoring $DISPLAY]' \
+ '--init-directory=[use DIR when looking for the Emacs init files]:dir:_files -/' \
+ '(-Q --quick)'{-Q,--quick}'[equivalent to -q --no-site-file --no-site-lisp --no-splash --no-x-resources]' \
+ '--script[run FILE as an Emacs Lisp script]:file:_files' \
+ '-x[same as -Q --script]' \
+ '(-t --terminal)'{-t,--terminal}'[use DEVICE for terminal IO]: :_files' \
+ '(-u --user)'{-u,--user}"[load user's init file instead of your own]" \
+ \*{-L,--directory}'[prepend DIR to load-path(with :DIR, append DIR)]: :_files -/' \
+ {--eval,--execute}'[evaluate Emacs Lisp expression EXPR]:expr' \
+ \*{--file,--find-file,--visit}'[visit FILE]: :_files' \
+ \*{-f,--funcall}'[call Emacs Lisp function FUNC with no arguments]:func' \
+ '--insert[insert contents of FILE into current buffer]:file:_files' \
+ '--kill[exit without asking for confirmation]' \
+ \*{-l,--load}'[load Emacs Lisp FILE using the load function]: :_files' \
+ '(-bg --background-color)'{-bg,--background-color}'[window background color]:color' \
+ '(-D --basic-display)'{-D,--basic-display}'[disable many display features]' \
+ '(-bg --border-color)'{-bg,--border-color}'[main border color]:color' \
+ '(-bw --border-width)'{-bw,--border-width}'[width of main border]' \
+ '--color=-[override color mode for character terminals]:: :(auto never always ansi8)' \
+ '(-cr --cursor-color)'{-cr,--cursor-color}'[color of the Emacs cursor indicating point]:color' \
+ '(-fn --font)'{-fn,--font}'[default font, must be fixed-width]:font' \
+ '(-fg --foreground)'{-fg,--foreground}'[window foreground color]:color' \
+ '(-fh --fullheight)'{-fh,--fullheight}'[make the first frame high as the screen]' \
+ '(-fs --fullscreen)'{-fs,--fullscreen}'[make the first frame fullscreen]' \
+ '(-fw --fullwidth)'{-fw,--fullwidth}'[make the first frame wide as the screen]' \
+ '(-mm --maximized)'{-mm,--maximized}'[make the first frame maximized]' \
+ '(-g --geometry)'{-g,--geometry}'[window geometry]:geometry' \
+ '(-nbi --no-bitmap-icon)'{-nbi,--no-bitmap-icon}'[do not use picture of gnu for Emacs icon]' \
+ '--iconic[start Emacs in iconified state]' \
+ '(-ib --internal-border)'{-ib,--internal-border}'[width between text and main border]:width' \
+ '(-lsp --line-spacing)'{-lsp,--line-spacing}'[additional space to put between lines]' \
+ '(-ms --mouse-color)'{-ms,--mouse-color}'[mouse cursor color in Emacs window]:color' \
+ '(-T --name --title)'{-T,--name,--title}'[title for initial Emacs frame]:title' \
+ '(-nbc,--no-blinking-cursor)'{-nbc,--no-blinking-cursor}'[disable blinking cursor]' \
+ '(-r -rv --reverse-video)'{-r,-rv,--reverse-video}'[switch foreground and background]' \
+ '(-vb --vertical-scroll-bars)'{-vb,--vertical-scroll-bars}'[enable vertical scroll bars]' \
+ '--xrm[set additional X resources]:resource' \
+ '--parent-id[set parent window]:xid' \
+ '(- *)--help{display help and exit}' \
+ '(- *)--version[output version information and exit]' \
+ '*:: :_files'
+ ;;
+ (emacsclient)
+ _arguments -s -n : \
+ '(- *)'{-V,--version}'[Print version information and exit]' \
+ '(- *)'{-H,--help}'[Print this usage information message and exit]' \
+ '(-nw -t --tty --no-window-system)'{-nw,-t,--tty,--no-window-system}'[Open a new Emacs frame on the current terminal]' \
+ '(-c --create-frame)'{-c,--create-frame}'[Create a new frame instead of trying to use the current Emacs frame]' \
+ '(-r --reuse-frame)'{-r,--reuse-frame}'[Create a new frame if none exists, otherwise use the current Emacs frame]' \
+ '(-F --frame-parameters)'{-F,--frame-parameters=}'[Set the parameters of a new frame]:alist' \
+ '(-e --eval)'{-e,--eval}'[Evaluate as Emacs Lisp expressions]' \
+ '(-n --no-wait)'{-n,--no-wait}'[Returns immediately without waiting for finish]' \
+ '(-w --timeout)'{-w,--timeout=}'[Seconds to wait before timing out]:seconds' \
+ '(-q --quiet)'{-q,--quiet}"[Don't display messages on success]" \
+ '(-u --suppress-output)'{-u,--suppress-output}"[Don't display return values from the server]" \
+ '(-d --display)'{-d,--display=}'[Tell the server to display the files on the given display]:display:_x_display' \
+ '--parent-id=[Open in parent window ID, via XEmbed]' \
+ '(-s --socket-name)'{-s,--socket-name=}'[Set filename of the UNIX socket for communication]: :_files' \
+ '(-f --server-file)'{-f,--server-file=}'[Set filename of the TCP authentication file]: :_files' \
+ '(-a --alternate-editor)'{-a,--alternate-editor=}'[Editor to fallback to if the server is not running if EDITOR is the empty string]:editor:_files' \
+ '(-T --tramp)'{-T,--tramp=}'[PREFIX to prepend to filenames sent by emacsclient for locating files remotely via Tramp]:prefix' \
+ '*:: :_files'
+ ;;
+esac
+
# Local Variables:
# mode: Shell-Script
diff --git a/src/_emacsclient b/src/_emacsclient
deleted file mode 100644
index 47ef577..0000000
--- a/src/_emacsclient
+++ /dev/null
@@ -1,66 +0,0 @@
-#compdef emacsclient
-#
-# ------------------------------------------------------------------------------
-# Copyright (c) 2022 Github zsh-users - https://github.com/zsh-users
-# All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-# ------------------------------------------------------------------------------
-# Description
-# -----------
-#
-# Completion script for emacsclient 29
-# - https://www.gnu.org/software/emacs/manual/html_node/emacs/Invoking-emacsclient.html
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Shohei YOSHIDA (https://github.com/syohex)
-#
-# ------------------------------------------------------------------------------
-
-_arguments -s -n : \
- '(- *)'{-V,--version}'[Print version information and exit]' \
- '(- *)'{-H,--help}'[Print this usage information message and exit]' \
- '(-nw -t --tty)'{-nw,-t,--tty}'[Open a new Emacs frame on the current terminal]' \
- '(-c --create-frame)'{-c,--create-frame}'[Create a new frame instead of trying to use the current Emacs frame]' \
- '(-r --reuse-frame)'{-r,--reuse-frame}'[Create a new frame if none exists, otherwise use the current Emacs frame]' \
- '(-F --frame-parameters)'{-F,--frame-parameters=}'[Set the parameters of a new frame]:alist' \
- '(-e --eval)'{-e,--eval}'[Evaluate as Emacs Lisp expressions]' \
- '(-n --no-wait)'{-n,--no-wait}'[Returns immediately without waiting for finish]' \
- '(-w --timeout)'{-w,--timeout=}'[Seconds to wait before timing out]:seconds' \
- '(-q --quiet)'{-q,--quiet}"[Don't display messages on success]" \
- '(-u --suppress-output)'{-u,--suppress-output}"[Don't display return values from the server]" \
- '(-d --display)'{-d,--display=}'[Tell the server to display the files on the given display]:display:_x_display' \
- '--parent-id=[Open in parent window ID, via XEmbed]' \
- '(-s --socket-name)'{-s,--socket-name=}'[Set filename of the UNIX socket for communication]: :_files' \
- '(-f --server-file)'{-f,--server-file=}'[Set filename of the TCP authentication file]: :_files' \
- '(-a --alternate-editor)'{-a,--alternate-editor=}'[Editor to fallback to if the server is not running if EDITOR is the empty string]:editor:_files' \
- '(-T --tramp)'{-T,--tramp=}'[PREFIX to prepend to filenames sent by emacsclient for locating files remotely via Tramp]:prefix' \
- '*: :_files'
-
-# 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
diff --git a/src/_fleetctl b/src/_fleetctl
deleted file mode 100644
index 542d7cf..0000000
--- a/src/_fleetctl
+++ /dev/null
@@ -1,123 +0,0 @@
-#compdef fleetctl
-# ------------------------------------------------------------------------------
-# Copyright (c) 2009-2015 Robby Russell and contributors (see
-# https://github.com/ohmyzsh/ohmyzsh/graphs/contributors)
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-# ------------------------------------------------------------------------------
-# Description
-# -----------
-#
-# Completion script for fleetctl (https://github.com/coreos/fleet).
-#
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Remi Paulmier (https://github.com/shtouff)
-#
-# ------------------------------------------------------------------------------
-
-# fleetctl zsh completion
-
-local -a _1st_arguments
-_1st_arguments=(
- 'cat:Output the contents of a submitted unit'
- 'destroy:Destroy one or more units in the cluster'
- 'fd-forward:Proxy stdin and stdout to a unix domain socket'
- 'help:Show a list of commands or help for one command'
- 'journal:Print the journal of a unit in the cluster to stdout'
- 'list-machines:Enumerate the current hosts in the cluster'
- 'list-unit-files:List the units that exist in the cluster.'
- 'list-units:List the current state of units in the cluster'
- 'load:Schedule one or more units in the cluster, first submitting them if necessary.'
- 'ssh:Open interactive shell on a machine in the cluster'
- 'start:Instruct systemd to start one or more units in the cluster, first submitting and loading if necessary.'
- 'status:Output the status of one or more units in the cluster'
- 'stop:Instruct systemd to stop one or more units in the cluster.'
- 'submit:Upload one or more units to the cluster without starting them'
- 'unload:Unschedule one or more units in the cluster.'
- 'version:Print the version and exit'
-)
-
-__task_list ()
-{
- local expl
- declare -a tasks
-
- tasks=(cat destroy fd-forward help journal list-machines list-unit-files \
- list-units load ssh start status stop submit unload version)
-
- _wanted tasks expl 'help' compadd $tasks
-}
-
-__unit_list ()
-{
- _wanted application expl 'command' compadd $(command fleetctl list-units | \
- tail -n +2 | awk '{print $1}')
-}
-
-local expl
-
-local curcontext="$curcontext" state line
-local -A opt_args
-
-_arguments -C \
- ':command:->command' \
- '*::options:->options'
-
-case $state in
- (command)
- _describe -t commands "gem subcommand" _1st_arguments
- return
- ;;
-
- (options)
- case $line[1] in
- (help)
- _arguments ':feature:__task_list'
- ;;
-
- (destroy|journal|start|status|stop|unload|cat)
- _arguments '*:feature:__unit_list'
- ;;
-
- (load|submit)
- _arguments '*:file:_files -g *.service'
- ;;
-
- (ssh)
- _arguments '*:host:_hosts'
- ;;
-
- (*)
- _arguments '*:file:_files'
- ;;
- esac
- ;;
-esac
-
-# 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
diff --git a/src/_mussh b/src/_mussh
index d52cb40..2fe47b1 100644
--- a/src/_mussh
+++ b/src/_mussh
@@ -38,44 +38,32 @@
#
# ------------------------------------------------------------------------------
-local curcontext="$curcontext" state line ret=1
-typeset -A opt_args
-
-# TODO:
-# -i: admit more than one use
-# -d, -v, -t: control input
-# -m: Accept number (but also empty)
-# -h: Accept multiple hosts, also more than one use
-# -H: Accept multiple files, also more than one use
-
-_arguments -C \
- '--help[display this help message]' \
- '-V[print version info and exit]' \
- '-d[Verbose debug]:level (from 0 to 2)' \
- '-v[SSH debug level]:level (from 0 to 3)' \
- '-m[Run concurrently]' \
- '(-b -B)-b[Print each hosts output in a block without mingling with other hosts output]' \
- '(-b -B)-B[Allow hosts output to mingle. (default)]' \
+_arguments \
+ '(- *)--help[display this help message]' \
+ '-d-[Verbose debug]:level:(0 1 2)' \
+ '-v-[SSH debug levels]:level:(0 1 2 3)' \
+ '-m-[Run concurrently on the specified hosts at a time. "0" is used for infinite]:count' \
+ '-q[No output unless necessary]' \
+ '*-i[Load an identity file. May be used more than once]:identity:_files' \
+ '-o[Args to pass to ssh with -o option]:ssh-args' \
'(-a -A)-a[Force loading ssh-agent]' \
'(-a -A)-A[Do NOT load ssh-agent]' \
+ '(-b -B)-b[Print each hosts output in a block without mingling with other hosts output]' \
+ '(-b -B)-B[Allow hosts output to mingle. (default)]' \
'(-u -U)-u[Unique. Eliminate duplicate hosts. (default)]' \
'(-u -U)-U[Do NOT make host list unique]' \
'-P[Do NOT fall back to passwords on any host. This will skip hosts where keys fail]' \
- '-i[Load an identity file. May be used more than once]:identity' \
- '-o[Args to pass to ssh with -o option]:ssh-args' \
'(-l -L)-l[Use _login_ when no other is specified with the hostname]:login' \
'(-l -L)-L[Force use of _login_ on all hosts]:login' \
'-s[Path to shell on remote host]:shell' \
'-t[Timeout setting for each session]:timeout' \
- '-p[Host to use as proxy]:[user@]host' \
+ '(- *)-V[print version info and exit]' \
+ '-p[Host to use as proxy]:[user@]host:_hosts' \
'-po[Args to pass to ssh on proxy with -o option]:ssh-args' \
- '(-h -H)-h[Add a host to list of hosts]:[user@]host' \
- '(-h -H)-H[Add contents of file to list of hosts]:host file:_files' \
+ '*-h[Add a host to list of hosts]:user@host' \
+ '*-H[Add contents of file to list of hosts]:host file:_files' \
'(-c -C)-c[Add a command or quoted list of commands to list of commands to be executed on each host]:command' \
- '(-c -C)-C[Add file contents to list of commands to be executed on each host]:commands file:_files' \
- '(-q)-q[No output unless necessary]' && ret=0
-
-return ret
+ '(-c -C)-C[Add file contents to list of commands to be executed on each host]:commands file:_files'
# Local Variables:
# mode: Shell-Script
diff --git a/src/_rkt b/src/_rkt
deleted file mode 100644
index d4ce021..0000000
--- a/src/_rkt
+++ /dev/null
@@ -1,369 +0,0 @@
-#compdef rkt
-# ------------------------------------------------------------------------------
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the zsh-users nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# ------------------------------------------------------------------------------
-# Description
-# -----------
-#
-# Completion script for rkt (https://coreos.com/rkt/).
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
-#
-# ------------------------------------------------------------------------------
-
-typeset -A opt_args
-autoload -U regexp-replace
-
-_rkt() {
- _arguments \
- '--debug[print out more debug information to stderr]' \
- '--dir=[rkt data directory]:data directory:_files -/' \
- '--insecure-options=[comma-separated list of security features to disable]:option:{_values -s , none image tls ondisk http all}' \
- '--local-config=[local configuration directory]:configuration directory:_files -/' \
- '--system-config=[system configuration directory]:configuration directory:_files -/' \
- '--trust-keys-from-https[automatically trust gpg keys fetched from https]' \
- '--user-config=[user configuration directory]:configuration directory:_files -/' \
- '--help' \
- '1: :_rkt_cmds' \
- '*:: :->rkt_cmd_args'
-
- case $state in
- rkt_cmd_args)
- case $words[1] in
- help)
- _arguments \
- '1: :_rkt_cmds' \
- '*:: :->rkt_help_args' \
- ;;
-
- api-service)
- _arguments \
- '--listen=[address to listen for client API requests]:address' \
- ;;
-
- cat-manifest)
- _arguments \
- '--pretty-print[apply indent to format the output]' \
- '--uuid-file=[read pod UUID from file instead of argument]:uuid file:_files' \
- '1:POD:_rkt_pods' \
- ;;
-
- config)
- _arguments \
- '--pretty-print[apply indent to format the output]' \
- ;;
-
- enter)
- _arguments \
- '--app=:appname' \
- '1:POD:_rkt_pods' \
- ;;
-
- export)
- _arguments \
- '--app=:appname' \
- '--overwrite[overwrite output ACI]' \
- '1:POD:_rkt_pods' \
- '2:OUTPUT_ACI_FILE:_files' \
- ;;
-
- fetch)
- _arguments \
- '--full[print the full image hash after fetching]' \
- '--no-store[fetch images ignoring the local store]' \
- '--signature=[local signature file to use in validating the preceding image]:signature:_files' \
- '--store-only[use only available images in the store]' \
- ;;
-
- gc)
- _arguments \
- '--grace-period=[duration to wait before discarding inactive pods from garbage]:duration' \
- '--expire-prepared=[duration to wait before expiring prepared pods]:duration' \
- '--mark-only[move to the garbage directories without actually deleting]' \
- ;;
-
- image)
- _arguments \
- '1: :_rkt_image_cmds' \
- '*:: :->rkt_image_args'
- ;;
-
- list)
- _arguments \
- '--full[use long output format]' \
- '--no-legend[suppress a legend with the list]' \
- ;;
-
- metadata-service)
- _arguments \
- '--listen-port=[listen port]:port' \
- ;;
-
- prepare)
- # TODO: autocomplete stage1 images
- _arguments \
- '--caps-remove=[capability to remove]:capability' \
- '--caps-retain=[capability to retain]:capability' \
- '--cpu=[cpu limit for the preceding image]:cpu limit' \
- '--cpu-shares=[assign the specified CPU time share weight]:weight' \
- "--environment=[set the app's environment variables]:variable key=value" \
- '--exec=[override the exec command for the preceding image]:command' \
- '--group=[group override for the preceding image]:group' \
- '--inherit-env[inherit all environment variables not set by apps]' \
- '--memory=[memory limit for the preceding image]:memory' \
- '--mount=[mount point binding a volume to a path within an app]:mount point' \
- '--name=[set the name of the app]:name' \
- '--no-overlay[disable overlay filesystem]' \
- '--oom-score-adj=[oom-score-adj isolator override]:oom-score-adj' \
- '--pod-manifest=[the path to the pod manifest]:manifest:_files' \
- '--port=[ports to expose on the host]:NAME\:HOSTPORT' \
- '--private-users[run within user namespaces]' \
- '--quiet[suppress superfluous output on stdout, print only the UUID on success]' \
- '--readonly-rootfs=[mount rootfs read-only]:fs' \
- '--set-env=[an environment variable to set for apps]:NAME=VALUE' \
- '--set-env-file=[the path to an environment variables file]:file:_files' \
- '--signature=[local signature file to use in validating the preceding image]:signature:_files' \
- '--stage1-from-dir=[a filename of an image in stage1 images directory to use as stage1]:image' \
- '--stage1-hash=[a hash of an image to use as stage1]:image hash' \
- '--stage1-name=[a name of an image to use as stage1]:image name' \
- '--stage1-path=[a path to an image to use as stage1]:image path:_files' \
- '--stage1-url=[a URL to an image to use as stage1]:image url' \
- '--supplementary-gids=[supplementary group IDs override for the preceding image]:group IDs' \
- '--user=[user override for the preceding image]:user' \
- "--user-annotation=[set the app's annotations]:annotation key=value" \
- "--user-label=[set the app's labels]:label key=value" \
- '--volume=[volumes to make available in the pod]:volume' \
- '--working-dir=[override the working directory of the preceding image]:working directory:_files -/' \
- '1:IMAGE:_rkt_images' \
- ;;
-
- rm)
- _arguments \
- '--uuid-file=[read pod UUID from file instead of argument]:uuid file:_files' \
- '1:POD:_rkt_pods' \
- ;;
-
- run)
- _arguments \
- '--caps-remove=[capability to remove]:capability' \
- '--caps-retain=[capability to retain]:capability' \
- '--cpu=[cpu limit for the preceding image]:cpu limit' \
- '--cpu-shares=[assign the specified CPU time share weight]:weight' \
- '--dns=[name servers to write in /etc/resolv.conf]:name servers' \
- '--dns-domain=[DNS domain to write in]:domain' \
- '--dns-opt=[DNS options to write in /etc/resolv.conf]:dns options' \
- '--dns-search=[DNS search domains to write in /etc/resolv.conf]:search domains' \
- "--environment=[set the app's environment variables]:variable key=value" \
- '--exec=[override the exec command for the preceding image]:command' \
- '--group=[group override for the preceding image]:group' \
- "--hostname=[pod's hostname]:hostname" \
- "--hosts-entry=[entries to add to the pod-wide /etc/hosts. Pass 'host' to use the host's /etc/hosts]:hosts entry" \
- '--inherit-env[inherit all environment variables not set by apps]' \
- '--interactive[run pod interactively]' \
- '--mds-register[register pod with metadata service]' \
- '--memory=[memory limit for the preceding image]:memory limit' \
- '--mount=[mount point binding a volume to a path within an app]:mount point' \
- '--name=[set the name of the app]:name' \
- "--net=[configure the pod's networking]:networks" \
- '--no-overlay[disable overlay filesystem]' \
- '--pod-manifest=[the path to the pod manifest]:manifest:_files' \
- '--port=[ports to expose on the host]:NAME\:HOSTPORT' \
- '--private-users[run within user namespaces]' \
- '--set-env=[an environment variable to set for apps]:NAME=VALUE' \
- '--set-env-file=[the path to an environment variables file]:file:_files' \
- '--signature=[local signature file to use in validating the preceding image]:signature:_files' \
- '--stage1-from-dir=[a filename of an image in stage1 images directory to use as stage1]:image' \
- '--stage1-hash=[a hash of an image to use as stage1]:image hash' \
- '--stage1-name=[a name of an image to use as stage1]:image name' \
- '--stage1-path=[a path to an image to use as stage1]:image path:_files' \
- '--stage1-url=[a URL to an image to use as stage1]:image url' \
- '--supplementary-gids=[supplementary group IDs override for the preceding image]:group IDs' \
- '--user=[user override for the preceding image]:user' \
- "--user-annotation=[set the app's annotations]:annotation key=value" \
- "--user-label=[set the app's labels]:label key=value" \
- '--uuid-file-save=[write out pod UUID to specified file]:uuid file:_files' \
- '--volume=[volumes to make available in the pod]:volume' \
- '--working-dir=[override the working directory of the preceding image]:working directory:_files -/' \
- '1:IMAGE:_rkt_images' \
- ;;
-
- run-prepared)
- _arguments \
- '--dns=[name servers to write in /etc/resolv.conf]:name servers' \
- '--dns-domain=[DNS domain to write in]:domain' \
- '--dns-opt=[DNS options to write in /etc/resolv.conf]:dns options' \
- '--dns-search=[DNS search domains to write in /etc/resolv.conf]:search domains' \
- "--hostname=[pod's hostname]:hostname" \
- "--hosts-entry=[entries to add to the pod-wide /etc/hosts. Pass 'host' to use the host's /etc/hosts]:hosts entry" \
- '--interactive[run pod interactively]' \
- '--mds-register[register pod with metadata service]' \
- "--net=[configure the pod's networking]:networks" \
- '1:POD:_rkt_pods' \
- ;;
-
- status)
- _arguments \
- '--format=[choose the output format]:format:(json json-pretty)' \
- '--wait[toggles waiting for the pod to exit]' \
- '--wait-ready[toggles waiting until the pod is ready]' \
- '1:POD:_rkt_pods' \
- ;;
-
- stop)
- _arguments \
- '--force[forced stopping]' \
- '--uuid-file=[read pod UUID from file instead of argument]:uuid file:_files' \
- '1:POD:_rkt_pods' \
- ;;
-
- trust)
- _arguments \
- '--insecure-allow-http[allow HTTP use for key discovery and/or retrieval]' \
- '--prefix=[prefix to limit trust to]:prefix' \
- '--root[add root key from filesystem without a prefix]' \
- '--skip-fingerprint-review[accept key without fingerprint confirmation]' \
- ;;
- esac
- ;;
- esac
-
- case $state in
- rkt_help_args)
- case $words[1] in
- image)
- _arguments \
- '1: :_rkt_image_cmds'
- ;;
- esac
- ;;
-
- rkt_image_args)
- case $words[1] in
- cat-manifest)
- _arguments \
- '--pretty-print[apply indent to format the output]' \
- '1:IMAGE:_rkt_images' \
- ;;
-
- export)
- _arguments \
- '--overwrite[overwrite output ACI]' \
- '1:IMAGE:_rkt_images' \
- '2:OUTPUT_ACI_FILE:_files' \
- ;;
-
- extract|render)
- _arguments \
- '--overwrite[overwrite output ACI]' \
- '--rootfs-only[extract rootfs only]' \
- '1:IMAGE:_rkt_images' \
- '2:OUTPUT_DIR:_files -/' \
- ;;
-
- gc)
- _arguments \
- '--grace-period=[duration to wait before discarding inactive pods from garbage]:duration' \
- ;;
-
- list)
- _arguments \
- '--fields=[comma-separated list of fields to display]:fields:{_values -s , id name importtime lastused size latest}' \
- '--full[use long output format]' \
- '--no-legend[suppress a legend with the list]' \
- ;;
-
- rm)
- _arguments \
- '*:IMAGE:_rkt_images' \
- ;;
- esac
- ;;
- esac
-}
-
-_rkt_cmds() {
- local -a commands
- commands=(
- 'api-service:Run API service'
- 'cat-manifest:Inspect and print the pod manifest'
- 'config:Print configuration for each stage in JSON format'
- 'enter:Enter the namespaces of an app within a rkt pod'
- 'export:Export an app from an exited pod to an ACI file'
- 'fetch:Fetch image(s) and store them in the local store'
- 'gc:Garbage collect rkt pods no longer in use'
- 'image:Operate on image(s) in the local store'
- 'list:List pods'
- 'metadata-service:Run metadata service'
- 'prepare:Prepare to run image(s) in a pod in rkt'
- 'rm:Remove all files and resources associated with an exited pod'
- 'run:Run image(s) in a pod in rkt'
- 'run-prepared:Run a prepared application pod in rkt'
- 'status:Check the status of a rkt pod'
- 'stop:Stop a pod'
- 'trust:Trust a key for image verification'
- 'version:Print the version and exit'
- 'help:Help about any command'
- )
- _describe 'command' commands
-}
-
-_rkt_image_cmds() {
- local -a commands
- commands=(
- 'cat-manifest:Inspect and print the image manifest'
- 'export:Export a stored image to an ACI file'
- 'extract:Extract a stored image to a directory'
- 'gc:Garbage collect local store'
- 'list:List images in the local store'
- 'render:Render a stored image to a directory with all its dependencies'
- 'rm:Remove image(s) with the given ID(s) or name(s) from the local store'
- )
- _describe 'command' commands
-}
-
-_rkt_images() {
- local -a images
- images=($(rkt image list --fields id,name --no-legend | sed 's/\t/\n/;s/:/\\:/g' | sort | uniq))
- _describe 'IMAGE' images
-}
-
-_rkt_pods() {
- local -a pods
- IFS=$'\n'
- pods=($(rkt list --full --no-legend | sed 's/:/\\:/g;s/\t/:/;s/\t/ /g'))
- _describe 'POD' pods
-}
-
-_rkt "$@"
-
-# 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
diff --git a/src/_rslsync b/src/_rslsync
index c72fb75..f3907ba 100644
--- a/src/_rslsync
+++ b/src/_rslsync
@@ -28,7 +28,7 @@
# Description
# -----------
#
-# Completion script for resilio sync 2.7.3 (https://www.resilio.com/individuals/).
+# Completion script for resilio sync 3.1.2 (https://www.resilio.com/individuals/).
#
# ------------------------------------------------------------------------------
# Authors
@@ -38,30 +38,21 @@
#
# ------------------------------------------------------------------------------
-_rslsync(){
- integer ret=1
- local -a args
- args+=(
- '(- *)--help[Print help]'
- '--config[Use a configuration file]:file:_files'
- '--storage[Storage path for identity and license]:path:_files -/'
- '--identity[Creates user identity]:name:'
- '--license[Apply owner license]:file:_files'
- '--decrypt[Decrypt encrypted folder]:'
- '--upgradedb[Upgrade databases in specified storage or upgrade a single db]:db:_files'
- '--nodaemon[Do not daemonize]'
- '--dump-sample-config[Print a sample configuration file]'
- '--log[Set log file]:file:_files'
- '(--help)--webui.listen[Set the webui listening interface]:ip\:port:'
- '--generate-secret[Generate a read/write key]::version:(2)'
- '--get-ro-secret[Get the read-only key associated to a read/write key]:key:'
- '--server[Set Management Console address]:ip\:port:'
- )
- _arguments $args[@] && ret=0
- return ret
-}
-
-_rslsync
+_arguments \
+ '(- *)--help[Print help]' \
+ '--config[Use a configuration file]:file:_files' \
+ '--storage[Storage path for identity and license]:path:_files -/' \
+ '--identity[Creates user identity]:name' \
+ '--license[Apply owner license]:file:_files' \
+ '--decrypt[Decrypt encrypted folder]:secret_dbpath_encrypted_folder_output_folder' \
+ '--upgradedb[Upgrade databases in specified storage or upgrade a single db]:db:_files' \
+ '--nodaemon[Do not daemonize]' \
+ '--dump-sample-config[Print a sample configuration file]' \
+ '--log[Set log file]:file:_files' \
+ '(--help)--webui.listen[Set the webui listening interface]:ip_port:' \
+ '--generate-secret[Generate a read/write key]::version:(2)' \
+ '--get-ro-secret[Get the read-only key associated to a read/write key]:key' \
+ '--server[Set Management Console address]:ip_port'
# Local Variables:
# mode: Shell-Script
diff --git a/src/_rsvm b/src/_rsvm
deleted file mode 100644
index 3840eb2..0000000
--- a/src/_rsvm
+++ /dev/null
@@ -1,88 +0,0 @@
-#compdef rsvm
-# ------------------------------------------------------------------------------
-# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the zsh-users nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# ------------------------------------------------------------------------------
-# Description
-# -----------
-#
-# Completion script for rsvm (https://github.com/sdepold/rsvm).
-# Adapted from Docker Machine completion by hhatto (https://github.com/ilkka)
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * michaelmior (https://github.com/michaelmior)
-#
-# ------------------------------------------------------------------------------
-
-# helper function for completing available rusts
-__rusts() {
- declare -a rusts_cmd
- rusts_cmd=($(ls "$HOME/.rsvm/versions"))
- _describe 'rusts' rusts_cmd
-}
-
-# subcommands
-local -a _rsvm_cmds
-
-_rsvm_cmds=(
- 'help:Show a help message' \
- 'install:Download and install a version' \
- 'uninstall:Uninstall a version' \
- 'use:Activate a version for now and the future' \
- 'ls:List all installed versions of rust' \
- 'ls-remote:List remote versions available for install' \
- 'ls-channel:Print a channel version available for install' \
-)
-
-# subcommand completion functions
-__uninstall() {
- __rusts
-}
-
-__use() {
- __rusts
-}
-
-# common args
-_arguments \
- '--help[show help]' \
- '--version[print the version]' \
- '*:: :->command'
-
-# start rusts!
-if (( CURRENT == 1 )); then
- _describe -t commands 'rsvm command' _rsvm_cmds
-fi
-
-local -a _command_args
-case "$words[1]" in
- uninstall)
- __uninstall ;;
- use)
- __use ;;
-esac
diff --git a/src/_supervisorctl b/src/_supervisorctl
deleted file mode 100644
index 4c5c42b..0000000
--- a/src/_supervisorctl
+++ /dev/null
@@ -1,237 +0,0 @@
-#compdef supervisorctl
-# ------------------------------------------------------------------------------
-# Copyright (c) 2015 Github zsh-users - https://github.com/zsh-users
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the zsh-users nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# ------------------------------------------------------------------------------
-# Description
-# -----------
-#
-# Completion script for supervisorctl 4.2.5 from Supervisord (https://github.com/Supervisor/supervisor)
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Matt Black (https://github.com/mafrosis)
-# * dongweiming (https://github.com/dongweiming)
-# * Shohei Yoshida (https://github.com/syohex)
-#
-# ------------------------------------------------------------------------------
-
-_supervisorctl() {
- local -a procs
- typeset -A opt_args
- local context state line
- local curcontext="$curcontext"
- local ret=1
-
- _arguments -C \
- {--configuration,-c}='[configuration file path (default /etc/supervisor.conf)]:filename:_files' \
- '(- *)'{--help,-h}'[print usage message and exit]:' \
- {--interactive,-i}'[start an interactive shell after executing commands]' \
- {--serverurl,-s}='[URL on which supervisord server is listening (default "http://localhost:9001")]:url:_urls' \
- {--username,-u}='[username to use for authentication with server]:username:_users' \
- {--password,-p}='[password to use for authentication with server]:password' \
- {--history-file,-r}'[keep a readline history (if readline is available)]:filename:_files' \
- '1: :_supervisorctl_subcommands' \
- '*:: :->subcmds' && ret=0
-
- case $state in
- (subcmds)
- case "$words[1]" in
- (help)
- _arguments \
- '1: :_supervisorctl_subcommands' \
- && ret=0
- ;;
- (add|remove)
- _arguments \
- '1: :_supervisorctl_procs_groups' \
- && ret=0
- ;;
- (fg)
- _arguments \
- '1: :_supervisorctl_processes' \
- && ret=0
- ;;
- (pid|clear)
- _arguments \
- '*: :_supervisorctl_processes_all' \
- && ret=0
- ;;
- (restart|status)
- _arguments \
- '*:process_or_group:_supervisorctl_procs_and_group_prefixes' \
- && ret=0
- ;;
- (update)
- _arguments \
- '*: :_supervisorctl_groups' \
- && ret=0
- ;;
- (stop)
- _arguments \
- '*:running process or group:_supervisorctl_running_procs' \
- && ret=0
- ;;
- (start)
- _arguments \
- '*:stopped process or group:_supervisorctl_stopped_procs' \
- && ret=0
- ;;
- (signal)
- _arguments \
- '1:signal:_signals -s' \
- '*:running process or group:_supervisorctl_running_procs' \
- && ret=0
- ;;
- (tail)
- _arguments \
- '-f[Continuous tail of named process stdout]' \
- '-[last N *bytes* of process stdout]:number' \
- '1: :_supervisorctl_processes' \
- '2:output:(stdout stderr)' \
- && ret=0
- ;;
- (maintail)
- _arguments \
- '-f[Continuous tail of named process stdout]' \
- '-[last N *bytes* of process stdout]:number' \
- && ret=0
- ;;
- esac
- esac
-
- return 0
-}
-
-(( $+functions[_supervisorctl_subcommands] )) ||
-_supervisorctl_subcommands() {
- local -a commands=(
- 'add:Activates any updates in config for process/group'
- 'avail:Display all configured processes'
- 'clear:Clear single/multiple/all process log files'
- 'exit:Exit the supervisor shell'
- 'fg:Connect to a process in foreground mode'
- 'maintail:tail of supervisor main log file'
- 'open:Connect to a remote supervisord process. (for UNIX domain socket, use unix:///socket/path)'
- 'pid:Get the PID of process/supervisord'
- 'quit:Exit the supervisor shell'
- 'reload:Restart the remote supervisord'
- 'remove:Removes process/group from active config'
- "reread:Reload the daemon's configuration files"
- 'restart:Restart process, group or all'
- 'signal:Send signal to a process'
- 'shutdown:Shut the remote supervisord down'
- 'start:Start process, group or all'
- 'status:Get process/group status info'
- 'stop:Stop process, group or all'
- 'tail:tail of process stdout'
- 'update:Reload config and add/remove as necessary'
- 'version:Show the version of the remote supervisord process'
- 'help:Show help'
- )
-
- _describe -t commands 'command' commands "$@"
-}
-
-(( $+functions[_supervisorctl_processes] )) ||
-_supervisorctl_processes() {
- local -a procs
- procs=(${(f)"$(_call_program processes supervisorctl avail | awk '{gsub(":","\\:", $1); print $1 }')"})
- if [[ "$1" = 'all' ]]; then
- procs+=(all)
- fi
- _describe 'processes' procs
-}
-
-(( $+functions[_supervisorctl_processes_all] )) ||
-_supervisorctl_processes_all() {
- _supervisorctl_processes all
-}
-
-(( $+functions[_supervisorctl_procs_groups] )) ||
-_supervisorctl_procs_groups() {
- local -a procs
- procs=(${(f)"$(_call_program processes supervisorctl status \
- | awk '{n=$1;gsub(":","\\:",n); printf "%s\n%s\n",n,substr($1,1,index($1,":")-1)}' \
- | uniq)"})
- _describe 'process and groups' procs
-}
-
-(( $+functions[_supervisorctl_procs_and_group_prefixes] )) ||
-_supervisorctl_procs_and_group_prefixes() {
- _supervisorctl_collect_procs '.'
-}
-
-(( $+functions[_supervisorctl_running_procs] )) ||
-_supervisorctl_running_procs() {
- _supervisorctl_collect_procs 'RUNNING'
-}
-
-(( $+functions[_supervisorctl_stopped_procs] )) ||
-_supervisorctl_stopped_procs() {
- _supervisorctl_collect_procs 'STOPPED'
-}
-
-(( $+functions[_supervisorctl_collect_procs] )) ||
-_supervisorctl_collect_procs() {
- if (( $words[(I)all] )); then
- return
- fi
-
- local pattern=$1
-
- local -a procs
- procs=(${(f)"$(_call_program processes supervisorctl status \
- | awk "/$pattern/"'{n=$1;gsub(":","\\:",n); printf "%s\n%s\\:\n",n,substr($1,1,index($1,":")-1)}' \
- | uniq)"})
- procs+=(all)
- _describe 'stooped processes or groups' procs
-}
-
-(( $+functions[_supervisorctl_groups] )) ||
-_supervisorctl_groups() {
- if (( $words[(I)all] )); then
- return
- fi
-
- local -a groups
- groups=(${(f)"$(_call_program processes supervisorctl status \
- | awk '{printf "%s\n",substr($1,1,index($1,":")-1)}' \
- | uniq)"})
- groups+=(all)
- _describe 'groups' groups
-}
-
-_supervisorctl "$@"
-
-# 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
diff --git a/src/_supervisord b/src/_supervisord
index 98210a0..50f9c0f 100644
--- a/src/_supervisord
+++ b/src/_supervisord
@@ -1,4 +1,4 @@
-#compdef supervisord
+#compdef supervisord supervisorctl pidproxy
# ------------------------------------------------------------------------------
# Copyright (c) 2023 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
@@ -25,36 +25,237 @@
# Description
# -----------
#
-# Completion script for supervisord. (https://github.com/Supervisor/supervisor)
+# Completion script for supervisord tools v4.3.0 (https://github.com/Supervisor/supervisor)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
+# * Matt Black (https://github.com/mafrosis)
+# * dongweiming (https://github.com/dongweiming)
# * Shohei YOSHIDA (https://github.com/syohex)
#
# ------------------------------------------------------------------------------
-_arguments \
- '(-c --configuration)'{-c,--configuration}'[configuration file path]:config file:_files' \
- '(-n --nodaemon)'{-n,--nodaemon}'[run in the foreground]' \
- '(-s --silent)'{-s,--silent}'[no longs to stdout]' \
- '(- *)'{-h,--help}'[print this usage message and exit]' \
- '(- *)'{-v,--version}'[print supervisord version number and exit]' \
- '(-u --user)'{-u,--user}'[run supervisord as given user]:user:_users' \
- '(-m --umask)'{-m,--umask}'[use given umask for daemon subprocess]:umask' \
- '(-d --directory)'{-d,--directory}'[directory to chdir to when daemonized]:directory:_files -/' \
- '(-l --logfile)'{-l,--logfile}'[logfile path]:logfile:_files' \
- '(-y --logfile_maxbytes)'{-y,--logfile_maxbytes}'[limit the max size of logfile]:max bytes' \
- '(-z --logfile_backups)'{-z,--logfile_backups}'[number of backups to keep when max bytes reached]:number of backups' \
- '(-e --loglevel)'{-e,--loglevel}'[log level]:level:(debug info warn error critical)' \
- '(-j --pidfile)'{-j,--pidfile}'[pid file path]:pid file:_files' \
- '(-i --identifier)'{-i,--identifier}'[identifier used for this instance of supervisord]:id' \
- '(-q --childlogdir)'{-q,--childlogdir}'[the log directory for child process logs]:log dir:_files -/' \
- '(-k --nocleanup)'{-k,--nocleanup}'[prevent the process from performing cleanup]' \
- '(-a --minfds)'{-m,--minfds}'[the minimum number of file descriptors for start success]:min fds' \
- '(-t --strip_ansi)'{-t,--strip_ansi}'[strip ansi escape codes from process output]' \
- '--profile_options[profile options]:profile option:_values -s , "field" cumulative calls callers'
+_supervisorctl() {
+ local -a procs
+ typeset -A opt_args
+ local context state line
+ local curcontext="$curcontext"
+ local ret=1
+
+ _arguments -C \
+ {--configuration,-c}='[configuration file path (default /etc/supervisor.conf)]:filename:_files' \
+ '(- *)'{--help,-h}'[print usage message and exit]:' \
+ {--interactive,-i}'[start an interactive shell after executing commands]' \
+ {--serverurl,-s}='[URL on which supervisord server is listening (default "http://localhost:9001")]:url:_urls' \
+ {--username,-u}='[username to use for authentication with server]:username:_users' \
+ {--password,-p}='[password to use for authentication with server]:password' \
+ {--history-file,-r}'[keep a readline history (if readline is available)]:filename:_files' \
+ '1: :_supervisorctl_subcommands' \
+ '*:: :->subcmds' && ret=0
+
+ case $state in
+ (subcmds)
+ case "$words[1]" in
+ (help)
+ _arguments \
+ '1: :_supervisorctl_subcommands' \
+ && ret=0
+ ;;
+ (add|remove)
+ _arguments \
+ '1: :_supervisorctl_procs_groups' \
+ && ret=0
+ ;;
+ (fg)
+ _arguments \
+ '1: :_supervisorctl_processes' \
+ && ret=0
+ ;;
+ (pid|clear)
+ _arguments \
+ '*: :_supervisorctl_processes_all' \
+ && ret=0
+ ;;
+ (restart|status)
+ _arguments \
+ '*:process_or_group:_supervisorctl_procs_and_group_prefixes' \
+ && ret=0
+ ;;
+ (update)
+ _arguments \
+ '*: :_supervisorctl_groups' \
+ && ret=0
+ ;;
+ (stop)
+ _arguments \
+ '*:running process or group:_supervisorctl_running_procs' \
+ && ret=0
+ ;;
+ (start)
+ _arguments \
+ '*:stopped process or group:_supervisorctl_stopped_procs' \
+ && ret=0
+ ;;
+ (signal)
+ _arguments \
+ '1:signal:_signals -s' \
+ '*:running process or group:_supervisorctl_running_procs' \
+ && ret=0
+ ;;
+ (tail)
+ _arguments \
+ '-f[Continuous tail of named process stdout]' \
+ '-[last N *bytes* of process stdout]:number' \
+ '1: :_supervisorctl_processes' \
+ '2:output:(stdout stderr)' \
+ && ret=0
+ ;;
+ (maintail)
+ _arguments \
+ '-f[Continuous tail of named process stdout]' \
+ '-[last N *bytes* of process stdout]:number' \
+ && ret=0
+ ;;
+ esac
+ esac
+
+ return 0
+}
+
+(( $+functions[_supervisorctl_subcommands] )) ||
+_supervisorctl_subcommands() {
+ local -a commands=(
+ 'add:Activates any updates in config for process/group'
+ 'avail:Display all configured processes'
+ 'clear:Clear single/multiple/all process log files'
+ 'exit:Exit the supervisor shell'
+ 'fg:Connect to a process in foreground mode'
+ 'maintail:tail of supervisor main log file'
+ 'open:Connect to a remote supervisord process. (for UNIX domain socket, use unix:///socket/path)'
+ 'pid:Get the PID of process/supervisord'
+ 'quit:Exit the supervisor shell'
+ 'reload:Restart the remote supervisord'
+ 'remove:Removes process/group from active config'
+ "reread:Reload the daemon's configuration files"
+ 'restart:Restart process, group or all'
+ 'signal:Send signal to a process'
+ 'shutdown:Shut the remote supervisord down'
+ 'start:Start process, group or all'
+ 'status:Get process/group status info'
+ 'stop:Stop process, group or all'
+ 'tail:tail of process stdout'
+ 'update:Reload config and add/remove as necessary'
+ 'version:Show the version of the remote supervisord process'
+ 'help:Show help'
+ )
+
+ _describe -t commands 'command' commands "$@"
+}
+
+(( $+functions[_supervisorctl_processes] )) ||
+_supervisorctl_processes() {
+ local -a procs
+ procs=(${(f)"$(_call_program processes supervisorctl avail | awk '{gsub(":","\\:", $1); print $1 }')"})
+ if [[ "$1" = 'all' ]]; then
+ procs+=(all)
+ fi
+ _describe 'processes' procs
+}
+
+(( $+functions[_supervisorctl_processes_all] )) ||
+_supervisorctl_processes_all() {
+ _supervisorctl_processes all
+}
+
+(( $+functions[_supervisorctl_procs_groups] )) ||
+_supervisorctl_procs_groups() {
+ local -a procs
+ procs=(${(f)"$(_call_program processes supervisorctl status \
+ | awk '{n=$1;gsub(":","\\:",n); printf "%s\n%s\n",n,substr($1,1,index($1,":")-1)}' \
+ | uniq)"})
+ _describe 'process and groups' procs
+}
+
+(( $+functions[_supervisorctl_procs_and_group_prefixes] )) ||
+_supervisorctl_procs_and_group_prefixes() {
+ _supervisorctl_collect_procs '.'
+}
+
+(( $+functions[_supervisorctl_running_procs] )) ||
+_supervisorctl_running_procs() {
+ _supervisorctl_collect_procs 'RUNNING'
+}
+
+(( $+functions[_supervisorctl_stopped_procs] )) ||
+_supervisorctl_stopped_procs() {
+ _supervisorctl_collect_procs 'STOPPED'
+}
+
+(( $+functions[_supervisorctl_collect_procs] )) ||
+_supervisorctl_collect_procs() {
+ if (( $words[(I)all] )); then
+ return
+ fi
+
+ local pattern=$1
+
+ local -a procs
+ procs=(${(f)"$(_call_program processes supervisorctl status \
+ | awk "/$pattern/"'{n=$1;gsub(":","\\:",n); printf "%s\n%s\\:\n",n,substr($1,1,index($1,":")-1)}' \
+ | uniq)"})
+ procs+=(all)
+ _describe 'stooped processes or groups' procs
+}
+
+(( $+functions[_supervisorctl_groups] )) ||
+_supervisorctl_groups() {
+ if (( $words[(I)all] )); then
+ return
+ fi
+
+ local -a groups
+ groups=(${(f)"$(_call_program processes supervisorctl status \
+ | awk '{printf "%s\n",substr($1,1,index($1,":")-1)}' \
+ | uniq)"})
+ groups+=(all)
+ _describe 'groups' groups
+}
+
+case $service in
+ (supervisord)
+ _arguments \
+ '(-c --configuration)'{-c,--configuration}'[configuration file path]:config file:_files' \
+ '(-n --nodaemon)'{-n,--nodaemon}'[run in the foreground]' \
+ '(-s --silent)'{-s,--silent}'[no longs to stdout]' \
+ '(- *)'{-h,--help}'[print this usage message and exit]' \
+ '(- *)'{-v,--version}'[print supervisord version number and exit]' \
+ '(-u --user)'{-u,--user}'[run supervisord as given user]:user:_users' \
+ '(-m --umask)'{-m,--umask}'[use given umask for daemon subprocess]:umask' \
+ '(-d --directory)'{-d,--directory}'[directory to chdir to when daemonized]:directory:_files -/' \
+ '(-l --logfile)'{-l,--logfile}'[logfile path]:logfile:_files' \
+ '(-y --logfile_maxbytes)'{-y,--logfile_maxbytes}'[limit the max size of logfile]:max bytes' \
+ '(-z --logfile_backups)'{-z,--logfile_backups}'[number of backups to keep when max bytes reached]:number of backups' \
+ '(-e --loglevel)'{-e,--loglevel}'[log level]:level:(debug info warn error critical)' \
+ '(-j --pidfile)'{-j,--pidfile}'[pid file path]:pid file:_files' \
+ '(-i --identifier)'{-i,--identifier}'[identifier used for this instance of supervisord]:id' \
+ '(-q --childlogdir)'{-q,--childlogdir}'[the log directory for child process logs]:log dir:_files -/' \
+ '(-k --nocleanup)'{-k,--nocleanup}'[prevent the process from performing cleanup]' \
+ '(-a --minfds)'{-m,--minfds}'[the minimum number of file descriptors for start success]:min fds' \
+ '(-t --strip_ansi)'{-t,--strip_ansi}'[strip ansi escape codes from process output]' \
+ '--profile_options[profile options]:profile option:_values -s , "field" cumulative calls callers'
+ ;;
+ (supervisorctl)
+ _supervisorctl "$@"
+ ;;
+ (pidproxy)
+ _arguments \
+ '1:pid_file:_files' \
+ '2:cmd:_command_names -e' \
+ '*::argument:_normal'
+ ;;
+esac
# Local Variables:
# mode: Shell-Script
diff --git a/src/_svm b/src/_svm
index 7782397..1fc6475 100644
--- a/src/_svm
+++ b/src/_svm
@@ -28,7 +28,7 @@
# Description
# -----------
#
-# Completion script for svm (https://github.com/yuroyoro/svm)
+# Completion script for svm, Scala2 version manager (https://github.com/yuroyoro/svm)
#
# ------------------------------------------------------------------------------
# Authors
@@ -38,130 +38,120 @@
#
# ------------------------------------------------------------------------------
-local context curcontext="$curcontext" state line ret=1
-typeset -A opt_args
+_svm() {
+ local context curcontext="$curcontext" state line ret=1
+ typeset -A opt_args
+ _arguments -C \
+ '(- *)-h[show this usage information]' \
+ '-c[show the currently use scala version]' \
+ "-l[show the scala version installed in svm_path(default is ${HOME}/.svm)]" \
+ '-v[show the available scala version not installed]' \
+ '-i[install specific scala version]: :_svm_completion_not_installed_scala_versions' \
+ '-r[uninstall specific scala version and remove their sources]: :_svm_installed_scala_versions' \
+ '(-s -u)'{-s,-u}'[setup to use a specific scala version]: :_svm_not_selected_scala_versions' \
+ '1: :_svm_commands' \
+ '*:: :->args' && ret=0
-local -a _1st_arguments
-_1st_arguments=(
- 'help:show this usage information'
- 'current:show the currently use scala version'
- "list:show the scala version installed in svm_path(default is ${HOME}/.svm)"
- "versions:show the available scala version not installed"
- 'install:install specific scala version'
- 'remove:uninstall specific scala version and remove their sources'
- 'switch:setup to use a specific scala version'
- 'update-latest:install or update nightly build scala version'
- 'latest:setup to use nightly build scala version'
- 'stable:setup to use stable(x.x.x.final) scala version'
- 'self-update:update svm itself'
-)
+ case $state in
+ (args)
+ # scala version number
+ case $words[1] in
+ (install)
+ # install not installed version
+ _arguments \
+ '--docs[download scala-devel-docs]' \
+ '--sources[download scala-sources]' \
+ '1: :_svm_not_installed_scala_versions' \
+ && ret=0
+ ;;
+ (update-latest)
+ # update nightly build scala version
+ _arguments \
+ '--docs[download scala-devel-docs]' \
+ '--sources[download scala-sources]' \
+ && ret=0
+ ;;
+ (remove|uninstall)
+ # remove installed version
+ _arguments \
+ '1: :_svm_installed_scala_versions' \
+ && ret=0
+ ;;
+ (switch|use)
+ # use installed version
+ _arguments \
+ '1: :_svm_not_selected_scala_versions' \
+ && ret=0
+ ;;
+ esac
-_arguments -C \
- '(-)-h[show this usage information]' \
- '-c[show the currently use scala version]' \
- "-l[show the scala version installed in svm_path(default is ${HOME}/.svm)]" \
- '-v[show the available scala version not installed]' \
- '-i[install specific scala version]: :_svm_completion_not_installed_scala_versions' \
- '-r[uninstall specific scala version and remove their sources]: :_svm_completion_installed_scala_versions' \
- '(-s -u)'{-s,-u}'[setup to use a specific scala version]: :_svm_completion_not_selected_scala_versions' \
- '1: :->cmds' \
- '*:: :->args' && ret=0
+ ;; # end args
+ esac
+ return ret
+}
-# installed scala versions
-(( $+functions[_svm_completion_installed_scala_versions] )) ||
-_svm_completion_installed_scala_versions() {
- local -a _installed_versions
- _current_version="${$(_call_program installed svm current)#currently version is[[:space:]]*}"
+(( $+functions[_svm_commands] )) ||
+_svm_commands() {
+ case $PREFIX in
+ (u*)
+ local -a synonyms=(
+ 'uninstall:uninstall specific scala version and remove their sources'
+ 'use:setup to use a specific scala version'
+ 'update-latest:install or update nightly build scala version'
+ )
- # collect lines starts with digit
- _installed_versions=( ${(M)${(@f)"$(_call_program installed svm list)"}:#[[:digit:]]*} )
+ _describe -t actions 'svm actions' synonyms
+ ;;
+ (*)
+ local -a commands=(
+ 'help:show this usage information'
+ 'current:show the currently use scala version'
+ "list:show the scala version installed in svm_path(default is ${HOME}/.svm)"
+ "versions:show the available scala version not installed"
+ 'install:install specific scala version'
+ 'remove:uninstall specific scala version and remove their sources'
+ 'switch:setup to use a specific scala version'
+ 'update-latest:install or update nightly build scala version'
+ 'latest:setup to use nightly build scala version'
+ 'stable:setup to use stable(x.x.x.final) scala version'
+ 'self-update:update svm itself'
+ )
- _describe -t installed "installed versions" _installed_versions
+ _describe -t actions 'svm actions' commands
+ ;;
+ esac
}
-# installed and not selected scala versions
-(( $+functions[_svm_completion_not_selected_scala_versions] )) ||
-_svm_completion_not_selected_scala_versions() {
- local _current_version
- local -a _not_selected_versions
-
- _current_version="${$(_call_program installed svm current)#currently version is[[:space:]]*}"
-
+# installed scala versions
+(( $+functions[_svm_installed_scala_versions] )) ||
+_svm_installed_scala_versions() {
# collect lines starts with digit
- _not_selected_versions=( ${(M)${(@f)"$(_call_program installed svm list)"}:#[[:digit:]]*} )
+ local -a installed_versions=( ${(M)${(@f)"$(_call_program installed svm list)"}:#[[:digit:]]*} )
+ _describe -t installed "installed versions" installed_versions
+}
+
+# installed and not selected scala versions
+(( $+functions[_svm_not_selected_scala_versions] )) ||
+_svm_not_selected_scala_versions() {
+ local current_version=$(_call_program current svm current | sed 's/currently version is //')
+ local -a not_selected_versions=( ${(M)${(@f)"$(_call_program installed svm list)"}:#[[:digit:]]*} )
# remove current version
- _not_selected_versions=( ${_not_selected_versions:#$_current_version})
- _describe -t installed "not selected versions" _not_selected_versions
+ not_selected_versions=( ${not_selected_versions:#$current_version})
+ _describe -t installed "not selected versions" not_selected_versions
}
# not installed scala versions
-(( $+functions[_svm_completion_not_installed_scala_versions] )) ||
-_svm_completion_not_installed_scala_versions() {
- local -a _not_installed_versions
- # collect lines starts with digit
- _not_installed_versions=( ${(M)${(@f)"$(_call_program installed svm versions)"}:#[[:digit:]]*} )
+(( $+functions[_svm_not_installed_scala_versions] )) ||
+_svm_not_installed_scala_versions() {
+ local -a not_installed_versions=( ${(M)${(@f)"$(_call_program installed svm versions)"}:#[[:digit:]]*} )
- _describe -t notinstalled "not installed versions" _not_installed_versions
+ _describe -t notinstalled "not installed versions" not_installed_versions
}
-
-case $state in
- cmds)
- # action
- case $PREFIX in
- u*)
- # complete command synonyms
- local -a _synonym_arguments
- _synonym_arguments=(
- 'uninstall:uninstall specific scala version and remove their sources'
- 'use:setup to use a specific scala version'
- 'update-latest:install or update nightly build scala version'
- )
- _describe -t actions 'svm actions' _synonym_arguments && ret=0
- ;;
-
- *)
- _describe -t actions 'svm actions' _1st_arguments
- _svm_completion_not_selected_scala_versions && ret=0
- ;;
- esac
- ;; # end action
-
- args)
- # scala version number
- case $words[1] in
- (install)
- # install not installed version
- _arguments \
- '1: :_svm_completion_not_installed_scala_versions' \
- '--docs[download scala-devel-docs]' \
- '--sources[download scala-sources]' && ret=0
- ;;
- (update-latest)
- # update nightly build scala version
- _arguments \
- '--docs[download scala-devel-docs]' \
- '--sources[download scala-sources]' && ret=0
- ;;
- (remove|uninstall)
- # remove installed version
- _arguments \
- '1: :_svm_completion_installed_scala_versions' && ret=0
- ;;
- (switch|use)
- # use installed version
- _arguments \
- '1: :_svm_completion_not_selected_scala_versions' && ret=0
- ;;
- esac
-
- ;; # end args
-esac
-
-return ret
+_svm "$@"
# Local Variables:
# mode: Shell-Script