Merge pull request #1230 from zsh-users/ai_review

Fix various issues that are detected claude code
This commit is contained in:
Shohei YOSHIDA 2026-03-09 23:54:39 +09:00 committed by GitHub
commit 28c5bdcaf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
71 changed files with 874 additions and 1244 deletions

View File

@ -45,14 +45,14 @@ _arguments \
"(-t --tag -m --move-mails)"{-w,--watch}"[continuously monitor the mailbox for new messages matching the given query]" \ "(-t --tag -m --move-mails)"{-w,--watch}"[continuously monitor the mailbox for new messages matching the given query]" \
"(-m --move-mails -w --watch)"{-t,--tag}"[run the tag filters]" \ "(-m --move-mails -w --watch)"{-t,--tag}"[run the tag filters]" \
"(-w --watch -m --move-mails)"{-m,--move-mails}"[move mail files between maildir folders]" \ "(-w --watch -m --move-mails)"{-m,--move-mails}"[move mail files between maildir folders]" \
"(-n --all)"{-a,--all}"[operate on all email]" \ "(-a --all)"{-a,--all}"[operate on all email]" \
"(-a --new)"{-n,--new}"[operate on all new email]" \ "(-n --new)"{-n,--new}"[operate on all new email]" \
{-C,--notmuch-config=}"[specify path to notmuch configuration file]:files:_files" \ {-C,--notmuch-config=}"[specify path to notmuch configuration file]:files:_files" \
{-e,--enable-filters=}"[specify filter classes to use]:filter" \ {-e,--enable-filters=}"[specify filter classes to use]:filter" \
{-d,--dry-run}"[don't change the DB]" \ {-d,--dry-run}"[don't change the DB]" \
{-R,--reference-set-size=}"[specify size of the reference set]:size [1000]" \ {-R,--reference-set-size=}"[specify size of the reference set]:size [1000]" \
{-T,--reference-set-timeframe-days=}"[don't use emails older than specified age]:age (days) [30]" \ {-T,--reference-set-timeframe-days=}"[don't use emails older than specified age]:age (days) [30]" \
{-N,--notmuch-args=}"[arguments for nutmuch new(in move mode)]:notmuch arg" \ {-N,--notmuch-args=}"[arguments for notmuch new(in move mode)]:notmuch arg" \
{-v,--verbose}"[be more verbose]" \ {-v,--verbose}"[be more verbose]" \
'*: :_guard "^-*" query' '*: :_guard "^-*" query'

View File

@ -1,308 +0,0 @@
#compdef android
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for the android command (Revision 12)
# (http://developer.android.com/guide/developing/tools/android.html).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
#
# ------------------------------------------------------------------------------
_android() {
typeset -A opt_args
local context state line curcontext="$curcontext"
local ret=1
_arguments -C -A "-*" \
'(- : *)'{-h,--help}'[get help on a specific command]:command:_android_cmds' \
'(-s --silent -v --verbose)'{-v,--verbose}'[verbose mode: errors, warnings and informational messages are printed]' \
'(-v --verbose -s --silent)'{-s,--silent}'[silent mode: only errors are printed out]' \
'1: :_android_cmds' \
'*::arg:->args' \
&& ret=0
case "$state" in
(args)
curcontext="${curcontext%:*:*}:android-cmd-$words[1]:"
case $words[1] in
(list)
_arguments -C \
'1: :_android_list_entities' \
'*::list-arg:->list-args' \
&& ret=0
case "$state" in
(list-args)
case $words[1] in
(avd|target)
_arguments \
'(-0 --null)'{-0,--null}'[terminate lines with \0 instead of \n (e.g. for xargs -0)]' \
'(-c --compact)'{-c,--compact}'[compact output (suitable for scripts)]' \
&& ret=0
;;
(sdk)
_arguments \
'(-o --obsolete)'{-o,--obsolete}'[install obsolete packages]' \
'--proxy-host[HTTP/HTTPS proxy host (overrides settings if defined)]:proxy host:_hosts' \
'--proxy-port[HTTP/HTTPS proxy port (overrides settings if defined)]:proxy port number' \
'(-s --no-https)'{-s,--no-https}'[use HTTP instead of HTTPS (the default) for downloads]' \
'(-u --no-ui)'{-u,--no-ui}'[display list result on console (no GUI)]' \
&& ret=0
;;
esac
;;
esac
;;
(create)
_arguments -C \
'1: :_android_create_entities' \
'*::create-arg:->create-args' \
&& ret=0
case "$state" in
(create-args)
case $words[1] in
(avd)
_arguments \
'(-c --sdcard)'{-c,--sdcard}'[path to a shared SD card image, or size of a new sdcard for the new AVD]:SD card image or size:_files -g "*.img"' \
'(-n --name)'{-n,--name}'[name of the new AVD]:name' \
'(-a --snapshot)'{-a,--snapshot}'[place a snapshots file in the AVD, to enable persistence]' \
'(-p --path)'{-p,--path}'[directory where the new AVD will be created]: :_files -/' \
'(-f --force)'{-f,--force}'[forces creation (overwrites an existing AVD)]' \
'(-s --skin)'{-s,--skin}'[skin for the new AVD]:skin' \
'(-t --target)'{-t,--target}'[target ID of the new AVD]: :_android_targets' \
&& ret=0
;;
(project)
_arguments \
'(-n --name)'{-n,--name}'[project name]:project name' \
'(-p --path)'{-p,--path}'[the new project'\''s directory]: :_files -/' \
'(-k --package)'{-k,--package}'[Android package name for the application]:package name' \
'(-a --activity)'{-a,--activity}'[name of the default Activity that is created]:activity name' \
'(-t --target)'{-t,--target}'[target ID of the new project]: :_android_targets' \
&& ret=0
;;
(test-project)
_arguments \
'(-n --name)'{-n,--name}'[project name]:project name' \
'(-p --path)'{-p,--path}'[the new project'\''s directory]: :_files -/' \
'(-m --main)'{-m,--main}'[path to directory of the app under test, relative to the test project directory]:path' \
&& ret=0
;;
(lib-project)
_arguments \
'(-n --name)'{-n,--name}'[project name]:project name' \
'(-p --path)'{-p,--path}'[the new project'\''s directory]: :_files -/' \
'(-k --package)'{-k,--package}'[Android package name for the application]:package name' \
'(-t --target)'{-t,--target}'[target ID of the new project]: :_android_targets' \
&& ret=0
;;
esac
;;
esac
;;
(update)
_arguments -C \
'1: :_android_update_entities' \
'*::update-arg:->update-args' \
&& ret=0
case "$state" in
(update-args)
case $words[1] in
(avd)
_arguments \
'(-n --name)'{-n,--name}'[name of the AVD to update]: :_android_avd_names' \
&& ret=0
;;
(project)
_arguments \
'(-l --library)'{-l,--library}'[directory of an Android library to add, relative to this project'\''s directory]: :_files -/' \
'(-p --path)'{-p,--path}'[the project'\''s directory]: :_files -/' \
'(-n --name)'{-n,--name}'[project name]:name' \
'(-t --target)'{-t,--target}'[target ID to set for the project]: :_android_targets' \
'(-s --subprojects)'{-s,--subprojects}'[also updates any projects in sub-folders, such as test projects]' \
&& ret=0
;;
(test-project)
_arguments \
'(-p --path)'{-p,--path}'[the project'\''s directory]: :_files -/' \
'(-m --main)'{-m,--main}'[directory of the app under test, relative to the test project directory]:path' \
&& ret=0
;;
(lib-project)
_arguments \
'(-p --path)'{-p,--path}'[the project'\''s directory]: :_files -/' \
'(-t --target)'{-t,--target}'[target ID to set for the project]: :_android_targets' \
&& ret=0
;;
(sdk)
_arguments \
'(-o --obsolete)'{-o,--obsolete}'[install obsolete packages]' \
'--proxy-host[HTTP/HTTPS proxy host (overrides settings if defined)]:proxy host:_hosts' \
'--proxy-port[HTTP/HTTPS proxy port (overrides settings if defined)]:proxy port number' \
'(-s --no-https)'{-s,--no-https}'[use HTTP instead of HTTPS (the default) for downloads]' \
'(-u --no-ui)'{-u,--no-ui}'[update from command-line (no GUI)]' \
'(-f --force)'{-f,--force}'[force replacement of a package or its parts, even if something has been modified]' \
'(-t --filter)'{-t,--filter}'[a filter that limits the update to the specified types of packages]: :_android_sdk_update_filters -s ,' \
'(-n --dry-mode)'{-n,--dry-mode}'[simulate the update but does not download or install anything]' \
&& ret=0
;;
esac
;;
esac
;;
(move)
_arguments -C \
'1: :_android_move_entities' \
'*::move-arg:->move-args' \
&& ret=0
case "$state" in
(move-args)
case $words[1] in
(avd)
_arguments \
'(-n --name)'{-n,--name}'[name of the AVD to move or rename]: :_android_avd_names' \
'(-p --path)'{-p,--path}'[path to the AVD'\''s new directory]: :_files -/' \
'(-r --rename)'{-r,--rename}'[new name of the AVD]:name' \
&& ret=0
;;
esac
;;
esac
;;
(delete)
_arguments -C \
'1: :_android_delete_entities' \
'*::delete-arg:->delete-args' \
&& ret=0
case "$state" in
(delete-args)
case $words[1] in
(avd)
_arguments \
'(-n --name)'{-n,--name}'[name of the AVD to delete]: :_android_avd_names' \
&& ret=0
;;
esac
;;
esac
;;
(display)
_arguments \
'1: :_android_display_entities' \
&& ret=0
;;
esac
;;
esac
return ret
}
(( $+functions[_android_cmds] )) ||
_android_cmds() {
local commands; commands=(
'list:list existing targets or virtual devices'
'create:create new virtual devices or projects'
'update:update a virtual device, project, SDK or adb'
'move:move a virtual device'
'delete:delete a virtual device'
'avd:displays the AVD Manager window'
'sdk:displays the SDK Manager window'
'display:display manager windows'
)
_describe -t commands 'command' commands "$@"
}
(( $+functions[_android_list_entities] )) ||
_android_list_entities() {
local entities; entities=(
'avd:list existing Android Virtual Devices'
'target:list existing targets'
'sdk:list remote SDK repository'
)
_describe -t entities 'entity' entities "$@"
}
(( $+functions[_android_create_entities] )) ||
_android_create_entities() {
local entities; entities=(
'avd:create a new Android Virtual Device'
'project:create a new Android project'
'test-project:create a new Android project for a test package'
'lib-project:create a new Android library project'
)
_describe -t entities 'entity' entities "$@"
}
(( $+functions[_android_update_entities] )) ||
_android_update_entities() {
local entities; entities=(
'avd:update an Android Virtual Device to match the folders of a new SDK'
'project:update an Android project'
'test-project:update the Android project for a test package'
'lib-project:update an Android library project'
'adb:update adb to support the USB devices declared in the SDK add-ons'
'sdk:update the SDK by suggesting new platforms to install if available'
)
_describe -t entities 'entity' entities "$@"
}
(( $+functions[_android_move_entities] )) ||
_android_move_entities() {
local entities; entities=(
'avd:move or rename an Android Virtual Device'
)
_describe -t entities 'entity' commands "$@"
}
(( $+functions[_android_delete_entities] )) ||
_android_delete_entities() {
local entities; entities=(
'avd:delete an Android Virtual Device'
)
_describe -t entities 'entity' entities "$@"
}
(( $+functions[_android_display_entities] )) ||
_android_display_entities() {
local entities; entities=(
'sdk:display the SDK Manager window'
'avd:display the AVD Manager window'
)
_describe -t entities 'entity' entities "$@"
}
(( $+functions[_android_targets] )) ||
_android_targets() {
local targets; targets=(${(f)"$(_call_program targets $service list target --compact)"//:/\\:})
_describe -t targets 'target' targets "$@"
}
(( $+functions[_android_avd_names] )) ||
_android_avd_names() {
local avd_names; avd_names=(${(f)"$(_call_program targets $service list avd --compact)"//:/\\:})
_describe -t avd-names 'AVD name' avd_names "$@"
}
(( $+functions[_android_sdk_update_filters] )) ||
_android_sdk_update_filters() {
local filters; filters=(platform tool platform-tool doc sample extra)
_values $@ 'filter' "${filters[@]}"
}
_android "$@"
# 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

@ -43,7 +43,7 @@ _archlinux-java_command_arguments() {
case $words[1] in case $words[1] in
(set) (set)
local java_versions=("${(@f)$(archlinux-java status | tail -n +2 | tr -s ' ' | cut -d ' ' -f2)}") local java_versions=("${(@f)$(archlinux-java status | tail -n +2 | tr -s ' ' | cut -d ' ' -f2)}")
_describe -t output 'Downloads to delete' java_versions _describe -t output 'Java environments' java_versions
;; ;;
esac esac
} }

View File

@ -1,63 +0,0 @@
#compdef artisan
# ------------------------------------------------------------------------------
# Copyright (c) 2011 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 artisan (http://laravel.com/docs/artisan).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * loranger (https://github.com/loranger)
# * Yohan Tambè (https://github.com/Cronos87)
#
# ------------------------------------------------------------------------------
_artisan_get_command_list () {
IFS=" "
php artisan --no-ansi | \
sed "1,/Available commands/d" | \
awk '/ [a-z]+/ { print $1 }' | \
sed -E 's/^[ ]+//g' | \
sed -E 's/[:]+/\\:/g' | \
sed -E 's/[ ]{2,}/\:/g'
}
_artisan () {
if [ -f artisan ]; then
local -a commands
IFS=$'\n'
commands=(`_artisan_get_command_list`)
_describe 'commands' commands
fi
}
compdef _artisan php artisan
compdef _artisan artisan

View File

@ -306,7 +306,7 @@ case $service in
esac esac
_arguments \ _arguments \
$options[@] \ "${options[@]}" \
"*::file:_files" "*::file:_files"
# Local Variables: # Local Variables:

View File

@ -40,6 +40,7 @@
_bitcoin-cli() { _bitcoin-cli() {
local context state line curcontext="$curcontext" local context state line curcontext="$curcontext"
local ret=1
_arguments -C \ _arguments -C \
-?'[This help message]' \ -?'[This help message]' \

View File

@ -50,14 +50,14 @@ _arguments \
'(-o --output)'{-o+,--output}'[Use the specified output format]:format:(full value list device udev export)' \ '(-o --output)'{-o+,--output}'[Use the specified output format]:format:(full value list device udev export)' \
'(-O --offset)'{-O+,--offset}'[Probe at the given offset]:offset' \ '(-O --offset)'{-O+,--offset}'[Probe at the given offset]:offset' \
'(-p --probe)'{-p,--probe}'[Switch to low-level superblock probing mode]' \ '(-p --probe)'{-p,--probe}'[Switch to low-level superblock probing mode]' \
'(-s --match-tag)'{-m+,--match-tag}'[Show only the tags that match tag]:tag' \ '(-s --match-tag)'{-s+,--match-tag}'[Show only the tags that match tag]:tag' \
'(-S --size)'{-S,--size}'[Override the size of device/file]' \ '(-S --size)'{-S,--size}'[Override the size of device/file]' \
'(-t --match-token)'{-t+,--match-token}'[Search for block devices with tokens named NAME that have the VALUE]:name' \ '(-t --match-token)'{-t+,--match-token}'[Search for block devices with tokens named NAME that have the VALUE]:name' \
'(-u --usages)'{-u,--usages}'[Restrict the probing functions to the specified comma-separated list of usage types]:list' \ '(-u --usages)'{-u,--usages}'[Restrict the probing functions to the specified comma-separated list of usage types]:list' \
'(-U --uuid)'{-U,--uuid}'[Look up the device that uses this filesystem uuid]:uuid' \ '(-U --uuid)'{-U,--uuid}'[Look up the device that uses this filesystem uuid]:uuid' \
'(- *)'{-h,--help}'[Display help text and exit]' \ '(- *)'{-h,--help}'[Display help text and exit]' \
'(- *)'{-V,--version}'[Print version and exit]' \ '(- *)'{-V,--version}'[Print version and exit]' \
'*:device:_files -g /dev' '*:device:_files -W /dev'
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -49,7 +49,7 @@ _bundle() {
_arguments -C -A "-v" -A "--version" \ _arguments -C -A "-v" -A "--version" \
'(- 1 *)'{-v,--version}'[display version information]' \ '(- 1 *)'{-v,--version}'[display version information]' \
'(-r --retry)'{-r,--retry}'[specify the number of times you with to attempt network commands]:number:' \ '(-r --retry)'{-r,--retry}'[specify the number of times you with to attempt network commands]:number:' \
'(-v --verbose)'{-V,--verbose}'[print out additional logging information]' \ '(-V --verbose)'{-V,--verbose}'[print out additional logging information]' \
'--no-color[print all output without color]' \ '--no-color[print all output without color]' \
'1: :_bundle_commands' \ '1: :_bundle_commands' \
'*:: :->args' && ret=0 '*:: :->args' && ret=0
@ -111,7 +111,7 @@ _bundle() {
'--cache-path=-[specify a different cache path than the default(vendor/cache)]: :_files -/' \ '--cache-path=-[specify a different cache path than the default(vendor/cache)]: :_files -/' \
'--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \ '--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \
"--no-install[don't install the gems, only update the cache]" \ "--no-install[don't install the gems, only update the cache]" \
'--quite[only output warnings and errors]' \ '--quiet[only output warnings and errors]' \
&& ret=0 && ret=0
;; ;;
(exec) (exec)

137
src/_cf
View File

@ -38,117 +38,130 @@
# Output a selectable list of organizations # Output a selectable list of organizations
__cf_orgs() { __cf_orgs() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(CF_COLOR=false CF_TRACE=false cf orgs | awk 'NR>3{print $1}')) cont_cmd=($(CF_COLOR=false CF_TRACE=false cf orgs | awk 'NR>3{print $1}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'ORG' cont_cmd _describe 'ORG' cont_cmd
fi
} }
# Output a selectable list of spaces # Output a selectable list of spaces
__cf_spaces() { __cf_spaces() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(CF_COLOR=false CF_TRACE=false cf spaces | awk 'NR>3{print $1}')) cont_cmd=($(CF_COLOR=false CF_TRACE=false cf spaces | awk 'NR>3{print $1}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'SPACE' cont_cmd _describe 'SPACE' cont_cmd
fi
} }
# Output a selectable list of applications # Output a selectable list of applications
__cf_apps() { __cf_apps() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(CF_COLOR=false CF_TRACE=false cf apps | awk 'NR>4{print $1}')) cont_cmd=($(CF_COLOR=false CF_TRACE=false cf apps | awk 'NR>4{print $1}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'APP' cont_cmd _describe 'APP' cont_cmd
fi
} }
# Output a selectable list of stacks # Output a selectable list of stacks
__cf_stacks() { __cf_stacks() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(CF_COLOR=false CF_TRACE=false cf stacks | awk 'NR>4{print $1}')) cont_cmd=($(CF_COLOR=false CF_TRACE=false cf stacks | awk 'NR>4{print $1}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'STACK' cont_cmd _describe 'STACK' cont_cmd
fi
} }
# Output a selectable list of services # Output a selectable list of services
__cf_marketplace_services() { __cf_marketplace_services() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(CF_COLOR=false CF_TRACE=false cf marketplace | awk 'NR>4{print $1}')) cont_cmd=($(CF_COLOR=false CF_TRACE=false cf marketplace | awk 'NR>4{print $1}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'SERVICE' cont_cmd _describe 'SERVICE' cont_cmd
fi
} }
# Output a selectable list of services # Output a selectable list of services
__cf_services() { __cf_services() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(CF_COLOR=false CF_TRACE=false cf services | awk 'NR>4{print $1}')) cont_cmd=($(CF_COLOR=false CF_TRACE=false cf services | awk 'NR>4{print $1}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'SERVICE' cont_cmd _describe 'SERVICE' cont_cmd
fi
} }
# Output a selectable list of domains # Output a selectable list of domains
__cf_domains() { __cf_domains() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(CF_COLOR=false CF_TRACE=false cf domains | grep -v shared | awk 'NR>2{print $1}')) cont_cmd=($(CF_COLOR=false CF_TRACE=false cf domains | grep -v shared | awk 'NR>2{print $1}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'DOMAIN' cont_cmd _describe 'DOMAIN' cont_cmd
fi
} }
# Output a selectable list of shared domains # Output a selectable list of shared domains
__cf_shared_domains() { __cf_shared_domains() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(CF_COLOR=false CF_TRACE=false cf domains | grep -v owned | awk 'NR>2{print $1}')) cont_cmd=($(CF_COLOR=false CF_TRACE=false cf domains | grep -v owned | awk 'NR>2{print $1}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'SHARED-DOMAIN' cont_cmd _describe 'SHARED-DOMAIN' cont_cmd
fi
} }
# Output a selectable list of hostnames # Output a selectable list of hostnames
__cf_hostnames() { __cf_hostnames() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(CF_COLOR=false CF_TRACE=false cf routes | awk 'NR>3{print $2}')) cont_cmd=($(CF_COLOR=false CF_TRACE=false cf routes | awk 'NR>3{print $2}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'ROUTE' cont_cmd _describe 'ROUTE' cont_cmd
fi
} }
# Output a selectable list of buildpacks # Output a selectable list of buildpacks
__cf_buildpacks() { __cf_buildpacks() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(CF_COLOR=false CF_TRACE=false cf buildpacks | awk 'NR>3{print $1}')) cont_cmd=($(CF_COLOR=false CF_TRACE=false cf buildpacks | awk 'NR>3{print $1}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'BUILDPACK' cont_cmd _describe 'BUILDPACK' cont_cmd
fi
} }
# Output a selectable list of feature flags # Output a selectable list of feature flags
__cf_feature_flags() { __cf_feature_flags() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(CF_COLOR=false CF_TRACE=false cf feature-flags | awk 'NR>4{print $1}')) cont_cmd=($(CF_COLOR=false CF_TRACE=false cf feature-flags | awk 'NR>4{print $1}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'FEATURE-FLAG' cont_cmd _describe 'FEATURE-FLAG' cont_cmd
fi
} }
# Output a selectable list of plugin repos # Output a selectable list of plugin repos
__cf_repo_plugins() { __cf_repo_plugins() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(CF_COLOR=false CF_TRACE=false cf list-plugin-repos | awk 'NR>3{print $1}')) cont_cmd=($(CF_COLOR=false CF_TRACE=false cf list-plugin-repos | awk 'NR>3{print $1}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'REPO-PLUGIN' cont_cmd _describe 'REPO-PLUGIN' cont_cmd
fi
} }
# Output a selectable list of plugins # Output a selectable list of plugins
__cf_plugins() { __cf_plugins() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(cf plugins | awk 'NR>4{print $1}')) cont_cmd=($(cf plugins | awk 'NR>4{print $1}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'PLUGIN' cont_cmd _describe 'PLUGIN' cont_cmd
fi
} }
# Output a selectable list of targets (requires cf-targets plugin) # Output a selectable list of targets (requires cf-targets plugin)
__cf_targets() { __cf_targets() {
declare -a cont_cmd declare -a cont_cmd
cont_cmd=($(cf targets | awk '{print $1}')) cont_cmd=($(cf targets | awk '{print $1}'))
if [[ 'X$cont_cmd' != 'X' ]] if [[ "X$cont_cmd" != 'X' ]]; then
_describe 'TARGET' cont_cmd _describe 'TARGET' cont_cmd
fi
} }
# -------------------------- # --------------------------
# ----- end Helper functions # ----- end Helper functions
# -------------------------- # --------------------------
@ -795,7 +808,7 @@ _1st_arguments=(
"targets":"List all saved targets (requires cf-targets plugin)" "targets":"List all saved targets (requires cf-targets plugin)"
"save-target":"Save the current target under a given name (requires cf-targets plugin)" "save-target":"Save the current target under a given name (requires cf-targets plugin)"
"set-target":"Restore a previously saved target (requires cf-targets plugin)" "set-target":"Restore a previously saved target (requires cf-targets plugin)"
"delete-target":"Delete a saved target (requires cf-targets plugin)" "delete-target":"Delete a saved target (requires cf-targets plugin)"
) )
# ----------------------- # -----------------------
@ -992,3 +1005,11 @@ case "$words[1]" in
delete-target) delete-target)
__delete-target ;; __delete-target ;;
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

View File

@ -40,7 +40,7 @@ _arguments \
'(-c --configure)'{-c,--configure}'[configure the specified CPUs]:cpu_list' \ '(-c --configure)'{-c,--configure}'[configure the specified CPUs]:cpu_list' \
'(-d --disable)'{-d,--disable}'[disable the specified CPUs]:cpu_list' \ '(-d --disable)'{-d,--disable}'[disable the specified CPUs]:cpu_list' \
'(-e --enable)'{-e,--enable}'[enable the specified CPUs]:cpu_list' \ '(-e --enable)'{-e,--enable}'[enable the specified CPUs]:cpu_list' \
'(-g --deconfigure)'{-d,--deconfigure}'[deconfigure the specified CPUs]:cpu_list' \ '(-g --deconfigure)'{-g,--deconfigure}'[deconfigure the specified CPUs]:cpu_list' \
'(-p --dispatch)'{-p,--dispatch}'[set the CPU dispatching mode]:mode:(horizontal vertical)' \ '(-p --dispatch)'{-p,--dispatch}'[set the CPU dispatching mode]:mode:(horizontal vertical)' \
'(-r --rescan)'{-r,--rescan}'[trigger a rescan of CPUs]' '(-r --rescan)'{-r,--rescan}'[trigger a rescan of CPUs]'

View File

@ -33,17 +33,17 @@
# or submit itself to any jurisdiction. # or submit itself to any jurisdiction.
_arguments \ _arguments \
"--user-data-dir=[Specify the directory that user data is kept in]:directory:_path_files -/" \ "--user-data-dir=[Specify the directory that user data is kept in]:directory:_path_files -/" \
"--app=[Runs URL in app mode]:url:_urls" \ "--app=[Runs URL in app mode]:url:_urls" \
"--incognito[Open in incognito mode]" \ "--incognito[Open in incognito mode]" \
"--new-window[open in new window]" \ "--new-window[open in new window]" \
"(--no-proxy-server --proxy-auto-detect --proxy-pac-url --password-store)--proxy-server=[specify proxy server]:[<proxy-scheme>\://]<proxy-host>[\:<proxy-port>]:_chromium_proxyurls" \ "(--no-proxy-server --proxy-auto-detect --proxy-pac-url)--proxy-server=[specify proxy server]:[<proxy-scheme>\://]<proxy-host>[\:<proxy-port>]:_chromium_proxyurls" \
"--no-proxy-server[Disables the proxy server]" \ "--no-proxy-server[Disables the proxy server]" \
"--proxy-auto-detect[Autodetect proxy configuration]" \ "--proxy-auto-detect[Autodetect proxy configuration]" \
"--proxy-pac-url=[Specify proxy autoconfiguration URL]:proxy autoconfiguration url:_urls" \ "--proxy-pac-url=[Specify proxy autoconfiguration URL]:proxy autoconfiguration url:_urls" \
"--password-store=[Set the password store to use]:password store: _wanted arguments expl 'wallet store' compadd -- basic gnome kwallet" \ "--password-store=[Set the password store to use]:password store: _wanted arguments expl 'wallet store' compadd -- basic gnome kwallet" \
"--version[print version]" \ "--version[print version]" \
"*:: :{ _alternative _urls _files }" '*:: :{ _alternative "urls\:url\:_urls" "file\:file\:_files" }'
# excerpt from the chromium help message: # excerpt from the chromium help message:
# #
@ -84,128 +84,136 @@ _arguments \
_chromium_proxyurls () { _chromium_proxyurls () {
#TODO: semicolon separated urls not yet implemented #TODO: semicolon separated urls not yet implemented
# mostly copied from _urls # mostly copied from _urls
local ipre scheme host user uhosts ret=1 expl match glob suf local ipre scheme host user uhosts ret=1 expl match glob suf
local localhttp local localhttp
zstyle -a ":completion:${curcontext}:urls" local localhttp zstyle -a ":completion:${curcontext}:urls" local localhttp
local localhttp_servername="$localhttp[1]" local localhttp_servername="$localhttp[1]"
local localhttp_documentroot="$localhttp[2]" local localhttp_documentroot="$localhttp[2]"
local localhttp_userdir="$localhttp[3]" local localhttp_userdir="$localhttp[3]"
zstyle -a ":completion:${curcontext}:urls" urls urls zstyle -a ":completion:${curcontext}:urls" urls urls
if [[ $#urls -gt 1 || ( $#urls -eq 1 && ! -d $urls[1] ) ]] if [[ $#urls -gt 1 || ( $#urls -eq 1 && ! -d $urls[1] ) ]]
then then
[[ $#urls -eq 1 && -f $urls[1] ]] && urls=($(< $urls[1])) [[ $#urls -eq 1 && -f $urls[1] ]] && urls=($(< $urls[1]))
_wanted urls expl 'URL' compadd "$@" -a urls && return 0 _wanted urls expl 'URL' compadd "$@" -a urls && return 0
urls=() urls=()
fi fi
urls="$urls[1]" urls="$urls[1]"
glob=(-g '*(^/)') glob=(-g '*(^/)')
zparseopts -D -K -E 'g:=glob' zparseopts -D -K -E 'g:=glob'
ipre="$IPREFIX" ipre="$IPREFIX"
if ! compset -P '(#b)([-+.a-z0-9]#):' if ! compset -P '(#b)([-+.a-z0-9]#):'
then then
_tags -C argument prefixes _tags -C argument prefixes
while _tags while _tags
do do
while _next_label prefixes expl 'URL prefix' -S '' "$@" while _next_label prefixes expl 'URL prefix' -S '' "$@"
do do
compset -S '[^:/]*' && compstate[to_end]='' compset -S '[^:/]*' && compstate[to_end]=''
compadd "$expl[@]" http:// socks:// socks4:// socks5:// && ret=0 compadd "$expl[@]" http:// socks:// socks4:// socks5:// && ret=0
done done
(( ret )) || return 0 (( ret )) || return 0
done done
return 1 return 1
fi fi
scheme="$match[1]" scheme="$match[1]"
case "$scheme" in case "$scheme" in
(http(|s)|socks(|4|5)) if ! compset -P // (http(|s)|socks(|4|5)) if ! compset -P //
then then
_wanted -C "$scheme" prefixes expl 'end of prefix' compadd -S '' "$@" // _wanted -C "$scheme" prefixes expl 'end of prefix' compadd -S '' "$@" //
return return
fi ;; fi ;;
(file) [[ -prefix //(127.0.0.1|localhost)/ ]] && compset -P '//(127.0.0.1|localhost)' (file) [[ -prefix //(127.0.0.1|localhost)/ ]] && compset -P '//(127.0.0.1|localhost)'
[[ -prefix /// ]] && compset -P // [[ -prefix /// ]] && compset -P //
if ! compset -P // if ! compset -P //
then then
_tags -C file files _tags -C file files
while _tags while _tags
do do
while _next_label files expl 'local file' while _next_label files expl 'local file'
do do
if [[ -prefix / ]] if [[ -prefix / ]]
then then
_path_files "$expl[@]" -S '' "${glob[@]}" && ret=0 _path_files "$expl[@]" -S '' "${glob[@]}" && ret=0
_path_files "$expl[@]" -S/ -r '/' -/ && ret=0 _path_files "$expl[@]" -S/ -r '/' -/ && ret=0
elif [[ -z "$PREFIX" ]] elif [[ -z "$PREFIX" ]]
then then
compadd -S '/' -r '/' "$expl[@]" "$@" - "${PWD%/}" && ret=0 compadd -S '/' -r '/' "$expl[@]" "$@" - "${PWD%/}" && ret=0
fi fi
done done
(( ret )) || return 0 (( ret )) || return 0
done done
return 1 return 1
fi ;; fi ;;
esac esac
if ! compset -P '(#b)([^:/]#)([:/])' if ! compset -P '(#b)([^:/]#)([:/])'
then then
uhosts=($urls/$scheme/$PREFIX*$SUFFIX(/:t)) uhosts=($urls/$scheme/$PREFIX*$SUFFIX(/:t))
_tags hosts _tags hosts
while _tags while _tags
do do
while _next_label hosts expl host while _next_label hosts expl host
do do
compset -S '[:/]*' || suf="/" compset -S '[:/]*' || suf="/"
(( $#uhosts )) || _hosts -S "$suf" -r '/:' "$expl[@]" && ret=0 (( $#uhosts )) || _hosts -S "$suf" -r '/:' "$expl[@]" && ret=0
[[ "$scheme" = http ]] && uhosts=($uhosts $localhttp_servername) [[ "$scheme" = http ]] && uhosts=($uhosts $localhttp_servername)
compadd -S "$suf" -r '/:' "$expl[@]" -a uhosts && ret=0 compadd -S "$suf" -r '/:' "$expl[@]" -a uhosts && ret=0
done done
(( ret )) || return 0 (( ret )) || return 0
done done
return 1 return 1
fi fi
host="$match[1]" host="$match[1]"
[[ $match[2] = ':' ]] && ! compset -P '<->/' && _message -e ports 'port number' && return 0 [[ $match[2] = ':' ]] && ! compset -P '<->/' && _message -e ports 'port number' && return 0
_tags remote-files files || return 1 _tags remote-files files || return 1
if [[ "$localhttp_servername" = "$host" ]] if [[ "$localhttp_servername" = "$host" ]]
then then
if compset -P \~ if compset -P \~
then then
if ! compset -P '(#b)([^/]#)/' if ! compset -P '(#b)([^/]#)/'
then then
_users -S/ "$@" _users -S/ "$@"
return return
fi fi
user="$match[1]" user="$match[1]"
while _tags while _tags
do do
while _next_label files expl 'local file' while _next_label files expl 'local file'
do do
_path_files "$expl[@]" "$@" -W ~$user/$localhttp_userdir "${glob[@]}" && ret=0 _path_files "$expl[@]" "$@" -W ~$user/$localhttp_userdir "${glob[@]}" && ret=0
_path_files -S/ -r '/' "$expl[@]" -W ~$user/$localhttp_userdir-/ && ret=0 _path_files -S/ -r '/' "$expl[@]" -W ~$user/$localhttp_userdir-/ && ret=0
done done
(( ret )) || return 0 (( ret )) || return 0
done done
else else
while _tags while _tags
do do
while _next_label files expl 'local file' while _next_label files expl 'local file'
do do
_path_files "$expl[@]" "$@" -W $localhttp_documentroot "${glob[@]}" && ret=0 _path_files "$expl[@]" "$@" -W $localhttp_documentroot "${glob[@]}" && ret=0
_path_files -S/ -r '/' "$expl[@]" -W $localhttp_documentroot -/ && ret=0 _path_files -S/ -r '/' "$expl[@]" -W $localhttp_documentroot -/ && ret=0
done done
(( ret )) || return 0 (( ret )) || return 0
done done
fi fi
else else
while _tags while _tags
do do
(( $#urls )) && while _next_label files expl 'local file' (( $#urls )) && while _next_label files expl 'local file'
do do
_path_files "$expl[@]" "$@" -W $urls/$scheme/$host "${glob[@]}" && ret=0 _path_files "$expl[@]" "$@" -W $urls/$scheme/$host "${glob[@]}" && ret=0
_path_files -S/ -r '/' "$expl[@]" -W $urls/$scheme/$host -/ && ret=0 _path_files -S/ -r '/' "$expl[@]" -W $urls/$scheme/$host -/ && ret=0
done done
[[ $scheme = (scp|sftp) ]] && _requested remote-files && _remote_files -h $host -- ssh && ret=0 [[ $scheme = (scp|sftp) ]] && _requested remote-files && _remote_files -h $host -- ssh && ret=0
(( ret )) || return 0 (( ret )) || return 0
done done
fi fi
return $ret return $ret
} }
# 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

@ -509,6 +509,8 @@ _conan_remote() {
) )
;; ;;
esac esac
_arguments "${opts[@]}"
;; ;;
esac esac
} }

View File

@ -102,7 +102,7 @@ _concourse_quickstart_or_web() {
'--debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports' '--debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports'
'--intercept-idle-timeout=[length of time for a intercepted session to be idle before terminating]: :_concourse_durations' '--intercept-idle-timeout=[length of time for a intercepted session to be idle before terminating]: :_concourse_durations'
'--component-runner-interval=[interval on which runners are kicked off for builds, locks, scans and checks]:interval:_concourse_durations' '--component-runner-interval=[interval on which runners are kicked off for builds, locks, scans and checks]:interval:_concourse_durations'
'--lidar-scanner-interval[interval on which the resource scanner will run to see if new checkes need to be scheduled]:interval:_concourse_durations' '--lidar-scanner-interval=[interval on which the resource scanner will run to see if new checks need to be scheduled]:interval:_concourse_durations'
'--global-resource-check-timeout=[time limit on checking for new versions of resources]: :_concourse_durations' '--global-resource-check-timeout=[time limit on checking for new versions of resources]: :_concourse_durations'
'--resource-checking-interval=[interval on which to check for new versions of resources]: :_concourse_durations' '--resource-checking-interval=[interval on which to check for new versions of resources]: :_concourse_durations'
'--resource-type-checking-interval=[interval on which to check for new versions of resource types]: :_concourse_durations' '--resource-type-checking-interval=[interval on which to check for new versions of resource types]: :_concourse_durations'

View File

@ -68,14 +68,13 @@ _cppcheck() {
"*--disable=[Disable individual checks]:id:$check_ids" \ "*--disable=[Disable individual checks]:id:$check_ids" \
"--dump[Dump xml data for each translation unit]" \ "--dump[Dump xml data for each translation unit]" \
"-D[Define preprocessor symbol]" \ "-D[Define preprocessor symbol]" \
"-U[Undefine preprocessor symbol]" \
"-E[Print preprocessor output on stdout and don't do any further processing]" \ "-E[Print preprocessor output on stdout and don't do any further processing]" \
"--enable=[Enable additional checks]:id:$check_ids" \ "--enable=[Enable additional checks]:id:$check_ids" \
"--error-exitcode=[Integer to return if errors are found]" \ "--error-exitcode=[Integer to return if errors are found]" \
"--errorlist[Print a list of all the error messages in XML format]" \ "--errorlist[Print a list of all the error messages in XML format]" \
"--exitcode-suppressions=[Used when certain messages should be displayed but should not cause a non-zero exitcode]:_files" \ "--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-filter=[Analyze only those files matching the given filter str]:filter" \
"--file-list=[Specify the files to check in a text file]:_files" \ "--file-list=[Specify the files to check in a text file]:file:_files" \
"(-f --force)"{-f,--force}"[Force checking of all configurations in files]" \ "(-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)--fsigned-char[Treat char type as signed]" \
"(--fsigned-char --funsigned-char)--funsigned-char[Treat char type as unsigned]" \ "(--fsigned-char --funsigned-char)--funsigned-char[Treat char type as unsigned]" \
@ -95,12 +94,11 @@ _cppcheck() {
"--output-file=[File to save results]:file:_files" \ "--output-file=[File to save results]:file:_files" \
"--output-format=[Specify the output format]:format:(text sarif xml)" \ "--output-format=[Specify the output format]:format:(text sarif xml)" \
"--platform=[Specified platform specific types and sizes]:platform:$platforms" \ "--platform=[Specified platform specific types and sizes]:platform:$platforms" \
"--plist-output=[Generate Clang-plist output files in folder]:_files" \ "--plist-output=[Generate Clang-plist output files in folder]:file:_files" \
"--project=[Run Cppcheck on project]:file:_files" \ "--project=[Run Cppcheck on project]:file:_files" \
"--project-configuration=[Limit the configuration cppcheck should check]:configuration" \ "--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" \ {-rp,--relative-paths}"=[Use relative paths in output (separated with ;)]:file:_files" \
"--report-progress[Report progress messages while checking a file]" \ "--report-progress[Report progress messages while checking a file]" \
"--report-type=[Add guideline and classification fields for specified coding standard]:standard:$coding_standards" \ "--report-type=[Add guideline and classification fields for specified coding standard]:standard:$coding_standards" \
"--rule=[Match regular expression]:rule" \ "--rule=[Match regular expression]:rule" \
@ -108,8 +106,8 @@ _cppcheck() {
"--showtime=[show timing information]:type:(none file file-total summary top5_file top5_summary top5)" \ "--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)" \ "--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\])]" \ "--suppress=[Suppress warnings (format: \[error id\]:\[filename\]:\[line\])]" \
"--suppressions-list=[Suppress warnings listed in the file]:_files" \ "--suppressions-list=[Suppress warnings listed in the file]:file:_files" \
"--suppress-xml=[Suppress warnings listed in a xml file]:_files" \ "--suppress-xml=[Suppress warnings listed in a xml file]:file:_files" \
"--template=[Format the error messages]" \ "--template=[Format the error messages]" \
"--template-location=[Format the error message location]" \ "--template-location=[Format the error message location]" \
"*-U[Undefine preprocessor symbol]:symbol" \ "*-U[Undefine preprocessor symbol]:symbol" \

View File

@ -55,12 +55,12 @@ _dad() {
"-u[Set aria2c username]:username:->val" \ "-u[Set aria2c username]:username:->val" \
"-p[Set aria2c password]:password:->val" \ "-p[Set aria2c password]:password:->val" \
'1:cmd:->cmds' \ '1:cmd:->cmds' \
'*: : :->args' '*: :->args'
case "$state" in case "$state" in
(cmds) (cmds)
_describe -t commands 'commands' commands _describe -t commands 'commands' commands
;; ;;
esac esac
} }

View File

@ -170,7 +170,7 @@ _dart() {
'--disable-service-auth-codes[Disables the requirement for an authentication code]' \ '--disable-service-auth-codes[Disables the requirement for an authentication code]' \
'--enable-service-port-fallback[Use 0 if binding port is failed]' \ '--enable-service-port-fallback[Use 0 if binding port is failed]' \
'--root-certs-file=[The path to a file containing the trusted root certificates]:file:_files' \ '--root-certs-file=[The path to a file containing the trusted root certificates]:file:_files' \
'--root-certs-cache=[The path to a cache directory containing the trusted root certificates]:_files -/' \ '--root-certs-cache=[The path to a cache directory containing the trusted root certificates]:file:_files -/' \
'--trace-loading[Enable tracing of library and script loading]' \ '--trace-loading[Enable tracing of library and script loading]' \
'--packages=[The path to the package resolution configuration file]:file:_files'\ '--packages=[The path to the package resolution configuration file]:file:_files'\
'--write-service-info=[Outputs information necessary to connect to the VM service]:service_info:_files' \ '--write-service-info=[Outputs information necessary to connect to the VM service]:service_info:_files' \
@ -334,7 +334,7 @@ _dart_pub() {
'(-v --verbose)'{-v,--verbose}'[Print detailed logging]' \ '(-v --verbose)'{-v,--verbose}'[Print detailed logging]' \
'(--color --no-color)--color[Use colors in terminal output]' \ '(--color --no-color)--color[Use colors in terminal output]' \
'(--color --no-color)--no-color[Do not use colors in terminal output]' \ '(--color --no-color)--no-color[Do not use colors in terminal output]' \
'(-C --directory)'{-d,--directory=}'[Run the subcommand in the directory]:dir:_files -/'\ '(-C --directory)'{-C,--directory=}'[Run the subcommand in the directory]:dir:_files -/'\
'1: :_dart_pub_subcommands' \ '1: :_dart_pub_subcommands' \
'*:: :->arg' \ '*:: :->arg' \
&& ret=0 && ret=0

View File

@ -16,7 +16,7 @@
_arguments \ _arguments \
'(-b --background)'{-b,--background}'[Background immediately]' \ '(-b --background)'{-b,--background}'[Background immediately]' \
'(-c --script)'{-c,--script}'[Use this script instead of the default]: :_files' \ '(-c --script)'{-c,--script}'[Use this script instead of the default]: :_files' \
'(-D --duid)'{-d,--duid}'[Use a DHCP Unique Identifier]:id' \ '(-D --duid)'{-D,--duid}'[Use a DHCP Unique Identifier]:id' \
'(-d --debug)'{-d,--debug}'[Echo debug messages to the stderr and syslog]' \ '(-d --debug)'{-d,--debug}'[Echo debug messages to the stderr and syslog]' \
'(-E --lastlease)'{-E,--lastlease}'[If dhcpcd cannot obtain a lease, then try to use the last lease acquired for the interface]' \ '(-E --lastlease)'{-E,--lastlease}'[If dhcpcd cannot obtain a lease, then try to use the last lease acquired for the interface]' \
'--lastleaseextend[Same as the -E/--lastlease, but the lease will be retained even if it expires]' \ '--lastleaseextend[Same as the -E/--lastlease, but the lease will be retained even if it expires]' \

View File

@ -38,7 +38,7 @@
_arguments \ _arguments \
'(- *)'{-h,--help}'[display help message and exit]' \ '(- *)'{-h,--help}'[display help message and exit]' \
'--date=[data for calculating the version]:date' \ '--date=[date for calculating the version]:date' \
'(-a --all)'{-a,--all}'[list all known versions]' \ '(-a --all)'{-a,--all}'[list all known versions]' \
'(-y --days)'{-y,--days=}'[display number of days until specified version reaches the specified milestone]:milestone:(created release eol eol-server)' \ '(-y --days)'{-y,--days=}'[display number of days until specified version reaches the specified milestone]:milestone:(created release eol eol-server)' \
'(-d --devel)'{-d,--devel}'[latest development version]' \ '(-d --devel)'{-d,--devel}'[latest development version]' \

View File

@ -19,16 +19,15 @@ _ecdsautil_args() {
_arguments '1:somefile:_files' _arguments '1:somefile:_files'
;; ;;
(verify) (verify)
_arguments '-s[signature]:secret:_files' '-p[publickey]:pubkey:_files' _arguments \
'-n[signaturecount]:signaturecount:""' ':file:_files' '-s[signature]:secret:_files' '-p[publickey]:pubkey:_files' \
'-n[signaturecount]:signaturecount:""' ':file:_files'
;; ;;
esac esac
} }
_ecdsautil() { _ecdsautil() {
local -a commands local -a commands=(
commands=(
"help:Show help" "help:Show help"
"generate-key:generate a new secret on stdout" "generate-key:generate a new secret on stdout"
"show-key:output public key of secret read from stdin" "show-key:output public key of secret read from stdin"
@ -38,16 +37,24 @@ _ecdsautil() {
_arguments -C \ _arguments -C \
'1:cmd:->cmds' \ '1:cmd:->cmds' \
'*:: :->args' \ '*:: :->args'
case "$state" in case "$state" in
(cmds) (cmds)
_describe -t commands 'commands' commands _describe -t commands 'commands' commands
;; ;;
(*) (*)
_ecdsautil_args _ecdsautil_args
;; ;;
esac esac
} }
_ecdsautil "$@" _ecdsautil "$@"
# 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

@ -72,7 +72,7 @@ case $service in
\*{-l,--load}'[load Emacs Lisp FILE using the load function]: :_files' \ \*{-l,--load}'[load Emacs Lisp FILE using the load function]: :_files' \
'(-bg --background-color)'{-bg,--background-color}'[window background color]:color' \ '(-bg --background-color)'{-bg,--background-color}'[window background color]:color' \
'(-D --basic-display)'{-D,--basic-display}'[disable many display features]' \ '(-D --basic-display)'{-D,--basic-display}'[disable many display features]' \
'(-bg --border-color)'{-bg,--border-color}'[main border color]:color' \ '(-bd --border-color)'{-bd,--border-color}'[main border color]:color' \
'(-bw --border-width)'{-bw,--border-width}'[width of main border]' \ '(-bw --border-width)'{-bw,--border-width}'[width of main border]' \
'--color=-[override color mode for character terminals]:: :(auto never always ansi8)' \ '--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' \ '(-cr --cursor-color)'{-cr,--cursor-color}'[color of the Emacs cursor indicating point]:color' \
@ -89,12 +89,12 @@ case $service in
'(-lsp --line-spacing)'{-lsp,--line-spacing}'[additional space to put between lines]' \ '(-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' \ '(-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' \ '(-T --name --title)'{-T,--name,--title}'[title for initial Emacs frame]:title' \
'(-nbc,--no-blinking-cursor)'{-nbc,--no-blinking-cursor}'[disable blinking cursor]' \ '(-nbc --no-blinking-cursor)'{-nbc,--no-blinking-cursor}'[disable blinking cursor]' \
'(-r -rv --reverse-video)'{-r,-rv,--reverse-video}'[switch foreground and background]' \ '(-r -rv --reverse-video)'{-r,-rv,--reverse-video}'[switch foreground and background]' \
'(-vb --vertical-scroll-bars)'{-vb,--vertical-scroll-bars}'[enable vertical scroll bars]' \ '(-vb --vertical-scroll-bars)'{-vb,--vertical-scroll-bars}'[enable vertical scroll bars]' \
'--xrm[set additional X resources]:resource' \ '--xrm[set additional X resources]:resource' \
'--parent-id[set parent window]:xid' \ '--parent-id[set parent window]:xid' \
'(- *)--help{display help and exit}' \ '(- *)--help[display help and exit]' \
'(- *)--version[output version information and exit]' \ '(- *)--version[output version information and exit]' \
'*:: :_files' '*:: :_files'
;; ;;

View File

@ -35,11 +35,32 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_f2bc_jails() { _fail2ban_client() {
LANG=C fail2ban-client status 2> /dev/null | sed -n -e 's/.*Jail list:\s\+//' -e 'T' -e 's/,\s\+/\'$'\n/g' -e 'p' integer NORMARG
_arguments -A "-*" -n \
'-c[configuration directory]:dir:_files -/' \
'-s[socket path]:file:_files' \
'-p[pidfile path]:file:_files' \
'--loglevel[logging level]:level:(CRITICAL ERROR WARNING NOTICE INFO DEBUG TRACEDEBUG HEAVYDEBUG)' \
'--logtarget[logging target]:target:(stdout stderr syslog sysout)' \
'--syslogsocket[syslog socket path]:file:_files' \
'-d[dump configuration]' \
'(--dp --dump-pretty)'{--dp,--dump-pretty}'[dump the configuration using more human readable representation]' \
'(-t --test)'{-t,--test}'[test configuration]' \
'-i[interactive mode]' \
'-v[increase verbosity]' \
'-q[decrease verbosity]' \
'-x[force execution of the server (remove socket file)]' \
'-b[start server in background]' \
'-f[start server in foreground]' \
'--str2sec[convert time abbreviation format to seconds]:_message str2sec' \
'(-h --help)'{-h,--help}'[display this help message]' \
'(-V --version)'{-V,--version}'[print the version]' \
'1:fail2ban command:_fail2ban_client_commands' \
'*:fail2ban command argument:_fail2ban_client_command_arguments'
} }
_complete_f2bc_cmds() { _fail2ban_client_commands() {
local cmds=( local cmds=(
'unban:unbans all IP addresses' 'unban:unbans all IP addresses'
'set:set property' 'set:set property'
@ -58,14 +79,14 @@ _complete_f2bc_cmds() {
_describe -V "fail2ban commands" cmds _describe -V "fail2ban commands" cmds
} }
_complete_f2bc_cmdargs() { _fail2ban_client_command_arguments() {
local f2barg="$words[$NORMARG]" local f2barg="$words[$NORMARG]"
case "$f2barg" in case "$f2barg" in
unban) (unban)
local jail local jail
if (( $words[(I)(--all)] == 0 )) ; then if (( $words[(I)(--all)] == 0 )); then
for jail in $(_f2bc_jails) ; do for jail in $(_fail2ban_client_print_jails); do
_complete_f2bc_ips $jail _fail2ban_client_jails "$jail"
done done
local unban_opts=(--all) local unban_opts=(--all)
_describe -o "unban options" unban_opts _describe -o "unban options" unban_opts
@ -73,18 +94,18 @@ _complete_f2bc_cmdargs() {
_nothing _nothing
fi fi
;; ;;
(set|get)) (set|get)
if (( $NORMARG + 1 == $CURRENT )) ; then if (( $NORMARG + 1 == $CURRENT )); then
_complete_f2bc_jails _fail2ban_client_jails
_complete_f2bc_settings _fail2ban_client_settings
else else
_complete_f2bc_jail${f2barg} _fail2ban_client_jail_${f2barg}
fi fi
;; ;;
status) (status)
if (( $NORMARG + 1 == $CURRENT )) ; then if (( $NORMARG + 1 == $CURRENT )); then
_complete_f2bc_jails _fail2ban_client_jails
elif (( $NORMARG + 2 == $CURRENT )) ; then elif (( $NORMARG + 2 == $CURRENT )); then
_values "flavor" basic cymru _values "flavor" basic cymru
else else
_nothing _nothing
@ -93,69 +114,40 @@ _complete_f2bc_cmdargs() {
esac esac
} }
_complete_f2bc_jails() { _fail2ban_client_jail_set() {
local jails=($(_f2bc_jails)) if (( $NORMARG + 2 == $CURRENT )); then
_describe -V "jails" jails
}
_complete_f2bc_ips() {
local ips=("${(@f)$(LANG=C fail2ban-client status $1 2> /dev/null | sed -n -e 's/^.*Banned IP list:\s\+//' -e 'T' -e 's/\s\+/\'$'\n/g' -e 'p')}")
if [[ -n "${ips[@]}" ]] ; then
_describe -t "f2b_jail_$1" -V "banned ips of jail $1" ips
else
_nothing
fi
}
_complete_f2bc_jailset() {
if (( $NORMARG + 2 == $CURRENT )) ; then
case $words[$NORMARG+1] in case $words[$NORMARG+1] in
loglevel) (loglevel)
local loglevel=(CRITICAL ERROR WARNING NOTICE INFO DEBUG TRACEDEBUG HEAVYDEBUG) local loglevel=(CRITICAL ERROR WARNING NOTICE INFO DEBUG TRACEDEBUG HEAVYDEBUG)
_describe -V "loglevel" loglevel ;; _describe -V "loglevel" loglevel
logtarget) ;;
(logtarget)
local logtarget=(STDOUT STDERR SYSLOG) local logtarget=(STDOUT STDERR SYSLOG)
_describe -V "logtarget" logtarget _describe -V "logtarget" logtarget
_files ;; _files
syslogsocket) ;;
(syslogsocket)
local syslogsocket=(auto) local syslogsocket=(auto)
_describe -V "logtarget" syslogsocket _describe -V "logtarget" syslogsocket
_files ;; _files
dbfile) ;;
_files ;; (dbfile)
dbpurgeage) _files
_message "sets the max age in <SECONDS> that history of bans will be kept" ;; ;;
*) (dbpurgeage)
# jail _message "sets the max age in <SECONDS> that history of bans will be kept"
local jailsettings=( ;;
unbanip (*)
banip local jailsettings=(
action unbanip banip action addaction addfailregex addignoreip
addaction addignoreregex addjournalmatch addlogpath bantime
addfailregex datepattern delaction delfailregex delignoreip
addignoreip delignorerexgex deljournalmatch dellogpath findtime idle
addignoreregex ignorecache ignorecommand ignoreself logencoding maxlines
addjournalmatch maxretry usedns
addlogpath )
bantime _describe -t "f2b_jail_setting" -V "jail setting" jailsettings
datepattern ;;
delaction
delfailregex
delignoreip
delignorerexgex
deljournalmatch
dellogpath
findtime
idle
ignorecache
ignorecommand
ignoreself
logencoding
maxlines
maxretry
usedns
)
_describe -t "f2b_jail_setting" -V "jail setting" jailsettings ;;
esac esac
else else
local jail="$words[$NORMARG+1]" local jail="$words[$NORMARG+1]"
@ -163,11 +155,14 @@ _complete_f2bc_jailset() {
if (( $NORMARG + 3 == $CURRENT )) ; then if (( $NORMARG + 3 == $CURRENT )) ; then
case $words[$NORMARG+2] in case $words[$NORMARG+2] in
unbanip) unbanip)
_complete_f2bc_ips "$jail" ;; _fail2ban_client_ips "$jail"
;;
delfailregex) delfailregex)
_complete_f2bc_regex fail "$jail" ;; _fail2ban_client_regexs fail "$jail"
;;
delignorerexgex) delignorerexgex)
_complete_f2bc_regex ignore "$jail" ;; _fail2ban_client_regexs ignore "$jail"
;;
dellogpath) dellogpath)
local filelist=("${(@f)$(LANG=C fail2ban-client status $jail 2> /dev/null | sed -n -e 's/^.*File list:\s\+//' -e 'T' -e 's/\s\+/\'$'\n/g' -e 'p')}") local filelist=("${(@f)$(LANG=C fail2ban-client status $jail 2> /dev/null | sed -n -e 's/^.*File list:\s\+//' -e 'T' -e 's/\s\+/\'$'\n/g' -e 'p')}")
@ -175,45 +170,56 @@ _complete_f2bc_jailset() {
_describe -t "f2b_filelist" -V "filelist of jail $1" filelist _describe -t "f2b_filelist" -V "filelist of jail $1" filelist
else else
_nothing _nothing
fi ;; fi
;;
idle) idle)
_values 'fail2ban idle' on off ;; _values 'fail2ban idle' on off
;;
ignoreself) ignoreself)
_values 'fail2ban ignoreself' true false ;; _values 'fail2ban ignoreself' true false
;;
delignoreip) delignoreip)
local ignoreips=("${(@f)$(fail2ban-client get "$jail" ignoreip 2> /dev/null | sed -e 's/^[|`]-\s\+//p')}") local ignoreips=("${(@f)$(fail2ban-client get "$jail" ignoreip 2> /dev/null | sed -e 's/^[|`]-\s\+//p')}")
if [[ -n "${ignoreips[@]}" ]] ; then if [[ -n "${ignoreips[@]}" ]] ; then
_describe -t "f2b_ignoreip" -V "fail2ban ignored ips" ignoreips _describe -t "f2b_ignoreip" -V "fail2ban ignored ips" ignoreips
else else
_nothing _nothing
fi ;; fi
delaction|action) ;;
_complete_f2bc_action "$jail" ;; delaction|action)
addlogpath) _fail2ban_client_actions "$jail"
_files ;; ;;
*) addlogpath)
_message "No completion for ${words[NORMARG+2]}" ;; _files
esac ;;
elif (( $NORMARG + 4 == $CURRENT )) ; then *)
case $words[$NORMARG+2] in _message "No completion for ${words[NORMARG+2]}"
action) ;;
_complete_f2bc_actionproperties "$jail" $words[$NORMARG+3] ;; esac
addaction) elif (( $NORMARG + 4 == $CURRENT )) ; then
_files ;; case $words[$NORMARG+2] in
*) action)
_nothing ;; _fail2ban_client_actionproperties "$jail" $words[$NORMARG+3]
esac ;;
else addaction)
_files
;;
*)
_nothing _nothing
;;
esac
else
_nothing
fi fi
fi fi
} }
_complete_f2bc_jailget() { _fail2ban_client_jail_get() {
if (( $NORMARG + 2 == $CURRENT )) ; then if (( $NORMARG + 2 == $CURRENT )) ; then
case $words[$NORMARG+1] in case $words[$NORMARG+1] in
(loglevel|logtarget|syslogsocket|dbfile|dbpurgeage)) (loglevel|logtarget|syslogsocket|dbfile|dbpurgeage)
_nothing ;; _nothing
;;
*) *)
# jail # jail
local jailprops=( local jailprops=(
@ -236,24 +242,29 @@ _complete_f2bc_jailget() {
actionproperties actionproperties
actionmethods actionmethods
) )
_describe -t "f2b_jail_props" -V "jail properties" jailprops ;; _describe -t "f2b_jail_props" -V "jail properties" jailprops
;;
esac esac
else else
local jail="$words[$NORMARG+1]" local jail="$words[$NORMARG+1]"
if (( $NORMARG + 3 == $CURRENT )) ; then if (( $NORMARG + 3 == $CURRENT )); then
case $words[$NORMARG+2] in case $words[$NORMARG+2] in
(action|actionproperties|actionmethods)) (action|actionproperties|actionmethods)
_complete_f2bc_action "$jail" ;; _fail2ban_client_actions "$jail"
;;
*) *)
_nothing ;; _nothing
;;
esac esac
elif (( $NORMARG + 4 == $CURRENT )) ; then elif (( $NORMARG + 4 == $CURRENT )); then
case $words[$NORMARG+2] in case $words[$NORMARG+2] in
(action|actionproperties|actionmethods)) (action|actionproperties|actionmethods)
_complete_f2bc_actionproperties "$jail" $words[$NORMARG+3] ;; _fail2ban_client_actionproperties "$jail" $words[$NORMARG+3]
;;
*) *)
_nothing ;; _nothing
;;
esac esac
else else
_nothing _nothing
@ -261,7 +272,21 @@ _complete_f2bc_jailget() {
fi fi
} }
_complete_f2bc_action() { _fail2ban_client_settings() {
local setargs=(loglevel logtarget syslogsocket dbfile dbpurgeage)
_describe -t "f2b_settings" -V "fail2ban-client settings" setargs
}
_fail2ban_client_regexs() {
local regex=("${(@f)$(fail2ban-client get $2 ${1}regex 2> /dev/null | sed -n -e 's/[|`]- \[\([0-9]\+\)\]:\s\+/\1:/p')}")
if [[ -n "${regex[@]}" ]] ; then
_describe -t "f2b_regex" -V "jail $2 ${1}regex" regex
else
_nothing
fi
}
_fail2ban_client_actions() {
local jailactions=("${(@f)$(fail2ban-client get $1 actions 2>/dev/null | sed -e '1d' -e 's/,\s\+/\'$'\n/g')}") local jailactions=("${(@f)$(fail2ban-client get $1 actions 2>/dev/null | sed -e '1d' -e 's/,\s\+/\'$'\n/g')}")
if [[ -n "${jailactions[@]}" ]] ; then if [[ -n "${jailactions[@]}" ]] ; then
@ -271,8 +296,22 @@ _complete_f2bc_action() {
fi fi
} }
_complete_f2bc_actionproperties() { _fail2ban_client_jails() {
local default_actionproperties=( local jails=($(_fail2ban_client_print_jails))
_describe -V "jails" jails
}
_fail2ban_client_ips() {
local ips=("${(@f)$(LANG=C fail2ban-client status $1 2> /dev/null | sed -n -e 's/^.*Banned IP list:\s\+//' -e 'T' -e 's/\s\+/\'$'\n/g' -e 'p')}")
if [[ -n "${ips[@]}" ]]; then
_describe -t "f2b_jail_$1" -V "banned ips of jail $1" ips
else
_nothing
fi
}
_fail2ban_client_actionproperties() {
local default_actionproperties=(
actionstart actionstart
actionstop actionstop
actioncheck actioncheck
@ -292,43 +331,11 @@ _complete_f2bc_actionproperties() {
fi fi
} }
_complete_f2bc_regex() { _fail2ban_client_print_jails() {
local regex=("${(@f)$(fail2ban-client get $2 ${1}regex 2> /dev/null | sed -n -e 's/[|`]- \[\([0-9]\+\)\]:\s\+/\1:/p')}") LANG=C fail2ban-client status 2> /dev/null | sed -n -e 's/.*Jail list:\s\+//' -e 'T' -e 's/,\s\+/\'$'\n/g' -e 'p'
if [[ -n "${regex[@]}" ]] ; then
_describe -t "f2b_regex" -V "jail $2 ${1}regex" regex
else
_nothing
fi
} }
_complete_f2bc_settings() { _fail2ban_client "$@"
local setargs=(loglevel logtarget syslogsocket dbfile dbpurgeage)
_describe -t "f2b_settings" -V "fail2ban-client settings" setargs
}
integer NORMARG
_arguments -A "-*" -n \
'-c[configuration directory]:_files -/' \
'-s[socket path]:_files' \
'-p[pidfile path]:_files' \
'--loglevel[logging level]:(CRITICAL ERROR WARNING, NOTICE INFO, DEBUG, TRACEDEBUG HEAVYDEBUG)' \
'--logtarget[logging target]:(stdout stderr syslog sysout)' \
'--syslogsocket:_files' \
'-d[dump configuration]' \
'(--dp --dump-pretty)'{--dp,--dump-pretty}'[dump the configuration using more human readable representation]' \
'(-t --test)'{-t,--test}'[test configuration]' \
'-i[interactive mode]' \
'-v[increase verbosity]' \
'-q[decrease verbosity]' \
'-x[force execution of the server (remove socket file)]' \
'-b[start server in background]' \
'-f[start server in foreground]' \
'--str2sec[convert time abbreviation format to seconds]:_message str2sec' \
'(-h --help)'{-h,--help}'[display this help message]' \
'(-V --version)'{-V,--version}'[print the version]' \
'1:fail2ban command:_complete_f2bc_cmds' \
'*:fail2ban command argument:_complete_f2bc_cmdargs'
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -25,12 +25,12 @@ _arguments -A "-*" -n \
'(-c --config)'{-c,--config=}'[set alternate config directory]:directory:_files -/' \ '(-c --config)'{-c,--config=}'[set alternate config directory]:directory:_files -/' \
'(-d --datepattern)'{-d,--datepattern=}'[set custom pattern used to match date/times]:DATEPATTERN' \ '(-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' \ '(--timezone= --TZ=)'{--timezone=,--TZ=}'[set time-zone used by convert time format]:TIMEZONE' \
'(-e --encoding=)'{-e,--encoding=}'[use different encoding from system locale]:ENCODING' \ '(-e --encoding)'{-e,--encoding=}'[use different encoding from system locale]:ENCODING' \
'(-r --raw)'{-r,--raw}'[raw hosts,don''t resolve dns]' \ '(-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))' \ '--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' \ '(-L --maxlines)'{-L,--maxlines}'[maxlines for multi-line regex]:MAXLINES' \
'(-m --journalmatch=)'{-m,--journalmatch=}'[journalctl style matches overriding filter file; "systemd-journal" only]:JOURNALMATCH' \ '(-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' \ '(-l --log-level)'{-l,--log-level}'[log level for the Fail2Ban logger to use]:LOG_LEVEL' \
'-V[get version in machine-readable short format]' \ '-V[get version in machine-readable short format]' \
'--verbosity=[set numerical level of verbosity]:(0 1 2 3 4)' \ '--verbosity=[set numerical level of verbosity]:(0 1 2 3 4)' \
'(--verbose-date --VD)'{--verbose-date,--VD}'[verbose date patterns/regex in output]' \ '(--verbose-date --VD)'{--verbose-date,--VD}'[verbose date patterns/regex in output]' \

View File

@ -46,7 +46,7 @@ _arguments \
'(-o --offset)'{-o+,--offset}'[Specifies the beginning offset of the range, in bytes]:offset' \ '(-o --offset)'{-o+,--offset}'[Specifies the beginning offset of the range, in bytes]:offset' \
'(-p --punch-hole)'{-p,--punch-hole}'[Deallocates space in the byte range starting at offset and continuing for length bytes]' \ '(-p --punch-hole)'{-p,--punch-hole}'[Deallocates space in the byte range starting at offset and continuing for length bytes]' \
'(-v --verbose)'{-v,--verbose}'[Enable verbose mode]' \ '(-v --verbose)'{-v,--verbose}'[Enable verbose mode]' \
'(-x --posix)'{-p,--posix}'[Enable POSIX operation mode]' \ '(-x --posix)'{-x,--posix}'[Enable POSIX operation mode]' \
'(-z --zero-range)'{-z,--zero-range}'[Zeroes space in the byte range starting at offset and continuing for length bytes]' \ '(-z --zero-range)'{-z,--zero-range}'[Zeroes space in the byte range starting at offset and continuing for length bytes]' \
'(- *)'{-h,--help}'[Display help text and exit]' \ '(- *)'{-h,--help}'[Display help text and exit]' \
'(- *)'{-V,--version}'[Print version and exit]' \ '(- *)'{-V,--version}'[Print version and exit]' \

View File

@ -21,35 +21,35 @@ _fwupdmgr() {
_arguments -C \ _arguments -C \
'(- : *)'{-h,--help}'[display help information]' \ '(- : *)'{-h,--help}'[display help information]' \
'(- : *)'{-v,--version}'[display version information]' \ '(- : *)--version[display version information]' \
{-v,--verbose}'[show extra debugging information]' \ '(-v --verbose)'{-v,--verbose}'[show extra debugging information]' \
--offline'[schedule installation for next reboot when possible]' \ '--offline[schedule installation for next reboot when possible]' \
--allow-reinstall'[allow re-installing existing firmware versions]' \ '--allow-reinstall[allow re-installing existing firmware versions]' \
--allow-older'[allow downgrading firmware versions]' \ '--allow-older[allow downgrading firmware versions]' \
--allow-branch-switch'[allow switching firmware branch]' \ '--allow-branch-switch[allow switching firmware branch]' \
--force'[override warnings and force the action]' \ '--force[override warnings and force the action]' \
'(-y, --assume-yes)'{-y,--assume-yes}'[answer yes to all questions]' \ '(-y --assume-yes)'{-y,--assume-yes}'[answer yes to all questions]' \
--sign'[sign the uploaded data with the client certificate]' \ '--sign[sign the uploaded data with the client certificate]' \
--no-unreported-check'[do not check for unreported history]' \ '--no-unreported-check[do not check for unreported history]' \
--no-metadata-check'[do not check for old metadata]' \ '--no-metadata-check[do not check for old metadata]' \
--no-reboot-check'[do not check for reboot after update]' \ '--no-reboot-check[do not check for reboot after update]' \
--no-safety-check'[do not perform device safety checks]' \ '--no-safety-check[do not perform device safety checks]' \
--no-device-prompt'[do not prompt for devices]' \ '--no-device-prompt[do not prompt for devices]' \
--no-history'[do not write to the history database]' \ '--no-history[do not write to the history database]' \
--show-all'[show all results]' \ '--show-all[show all results]' \
--disable-ssl-strict'[ignore SSL strict checks when downloading files]' \ '--disable-ssl-strict[ignore SSL strict checks when downloading files]' \
--ipfs'[only use IPFS when downloading files]' \ '--ipfs[only use IPFS when downloading files]' \
--filter'[filter with a set of device flags using a ~ prefix to exclude]:filter' \ '--filter[filter with a set of device flags using a ~ prefix to exclude]:filter' \
--json'[output in JSON format]' \ '--json[output in JSON format]' \
--no-authenticate'[do not prompt for authentication]' \ '--no-authenticate[do not prompt for authentication]' \
'(-): :->command' \ '(-): :->command' \
'(-)*:: :->arguments' \ '(-)*:: :->arguments' \
&& ret=0 && ret=0
case $state in case $state in
(command) (command)
_fwupdmgr_commands _fwupdmgr_commands
;; ;;
(arguments) (arguments)
case $words[1] in case $words[1] in
(activate|downgrade|emulation-tag|emulation-untag|get-releases|get-updates|reinstall|update|verify|verify-update) (activate|downgrade|emulation-tag|emulation-untag|get-releases|get-updates|reinstall|update|verify|verify-update)
@ -86,7 +86,7 @@ _fwupdmgr() {
;; ;;
(refresh) (refresh)
_arguments \ _arguments \
'1:file or remote ID:_alternative _files _fwupdmgr_remote_ids' \ '1:file or remote ID:_alternative "file\:file\:_files" "remotes\:remote ID\:_fwupdmgr_remote_ids"' \
&& ret=0 && ret=0
;; ;;
(switch-branch) (switch-branch)

View File

@ -38,7 +38,7 @@ local curcontext="$curcontext" state line cmds ret=1
_arguments -C \ _arguments -C \
'(- 1 *)'{-v,--version}'[display version information]' \ '(- 1 *)'{-v,--version}'[display version information]' \
'(-h|--help)'{-h,--help}'[show help information]' \ '(-h --help)'{-h,--help}'[show help information]' \
'1: :->cmds' \ '1: :->cmds' \
'*: :->args' && ret=0 '*: :->args' && ret=0
@ -67,3 +67,10 @@ esac
return ret return ret
# 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

@ -48,7 +48,7 @@ _gio() {
_arguments -C \ _arguments -C \
'(- : *)'{-h,--help}'[show help information]' \ '(- : *)'{-h,--help}'[show help information]' \
'(- : *)'--version'[display version information]' \ '(- : *)--version[display version information]' \
'1:command:->command' \ '1:command:->command' \
'*::arg:->args' \ '*::arg:->args' \
&& ret=0 && ret=0

View File

@ -48,14 +48,14 @@ _arguments -C \
'(-f --filename)'{-f,--filename}'[Sets the filename and syntax type.]:NAME' \ '(-f --filename)'{-f,--filename}'[Sets the filename and syntax type.]:NAME' \
'(-t --type)'{-t,--type}'[Sets the file extension and syntax type.]:EXT' \ '(-t --type)'{-t,--type}'[Sets the file extension and syntax type.]:EXT' \
'(-p --private --no-private)'{-p,--private}'[Makes your gist private.]' \ '(-p --private --no-private)'{-p,--private}'[Makes your gist private.]' \
'(--no-private -p --private)'--no-private'[Makes your gist no private.]' \ '(--no-private -p --private)--no-private[Makes your gist no private.]' \
'(-d --description)'{-d,--description}'[Adds a description to your gist.]:DESCRIPTION' \ '(-d --description)'{-d,--description}'[Adds a description to your gist.]:DESCRIPTION' \
'(-s --shorten)'{-s,--shorten}'[Shorten the gist URL using git.io.]' \ '(-s --shorten)'{-s,--shorten}'[Shorten the gist URL using git.io.]' \
'(-u --update)'{-u,--update}'[Update an existing gist.]:URL ID:user_gists' \ '(-u --update)'{-u,--update}'[Update an existing gist.]:URL ID:user_gists' \
'(-c --copy)'{-c,--copy}'[Copy the resulting URL to the clipboard]' \ '(-c --copy)'{-c,--copy}'[Copy the resulting URL to the clipboard]' \
'(-e --embed)'{-e,--embed}'[Copy the embed code for the gist to the clipboard]' \ '(-e --embed)'{-e,--embed}'[Copy the embed code for the gist to the clipboard]' \
'(-o --open --no-open)'{-o,--open}'[Open the resulting URL in a browser]' \ '(-o --open --no-open)'{-o,--open}'[Open the resulting URL in a browser]' \
'(--no-open -o --open)'--no-open'[No open the resulting URL in a browser]' \ '(--no-open -o --open)--no-open[No open the resulting URL in a browser]' \
'(-P --paste)'{-P,--paste}'[Paste from the clipboard to gist]' \ '(-P --paste)'{-P,--paste}'[Paste from the clipboard to gist]' \
'(-R --raw)'{-R,--raw}'[Display raw URL of the new gist]' \ '(-R --raw)'{-R,--raw}'[Display raw URL of the new gist]' \
'(-l --list)'{-l,--list}'[List all gists for user ]::user' \ '(-l --list)'{-l,--list}'[List all gists for user ]::user' \

View File

@ -53,7 +53,7 @@ _glances() {
'--disable-webui[disable the Web Interface]' \ '--disable-webui[disable the Web Interface]' \
'(--light --enable-light)'{--light,--enable-light}'[light mode for Curses UI]' \ '(--light --enable-light)'{--light,--enable-light}'[light mode for Curses UI]' \
'(-0 --disable-irix)'{-0,--disable-irix}"[task's cpu usage will be divided by the total number of CPUs]" \ '(-0 --disable-irix)'{-0,--disable-irix}"[task's cpu usage will be divided by the total number of CPUs]" \
'(-1 --percpu)'{-1,--percpu}'[start Clances in per CPU mode]' \ '(-1 --percpu)'{-1,--percpu}'[start Glances in per CPU mode]' \
'(-2 --disable-left-sidebar)'{-2,--disable-left-sidebar}'[disable network, disk I/O, FS and sensors modules]' \ '(-2 --disable-left-sidebar)'{-2,--disable-left-sidebar}'[disable network, disk I/O, FS and sensors modules]' \
'(-3 --disable-quicklook)'{-3,--disable-quicklook}'[disable quick look module]' \ '(-3 --disable-quicklook)'{-3,--disable-quicklook}'[disable quick look module]' \
'(-4 --full-quicklook)'{-4,--full-quicklook}'[disable all but quick look and load]' \ '(-4 --full-quicklook)'{-4,--full-quicklook}'[disable all but quick look and load]' \
@ -92,7 +92,7 @@ _glances() {
'(-t --time)'{-t,--time}'[set minimum refresh rate in seconds(default: 2 sec)]:seconds' \ '(-t --time)'{-t,--time}'[set minimum refresh rate in seconds(default: 2 sec)]:seconds' \
'(-w --webserver)'{-w,--webserver}'[run Glances in web server mode]' \ '(-w --webserver)'{-w,--webserver}'[run Glances in web server mode]' \
'--cached-time[set the server cache time(default: 1 sec)]:seconds' \ '--cached-time[set the server cache time(default: 1 sec)]:seconds' \
'--stop-after[stop Glances after n fresh]:' \ '--stop-after[stop Glances after n fresh]:times' \
'--open-web-browser[try to open the Web UI in the default browser]' \ '--open-web-browser[try to open the Web UI in the default browser]' \
'(-q --quiet)'{-q,--quiet}'[do not display the curses interface]' \ '(-q --quiet)'{-q,--quiet}'[do not display the curses interface]' \
'(-f --process-filter)'{-f,--process-filter}'[set the process filter pattern]:regexp' \ '(-f --process-filter)'{-f,--process-filter}'[set the process filter pattern]:regexp' \

View File

@ -46,9 +46,9 @@ _gtk-launch() {
_arguments -S -A "-*" \ _arguments -S -A "-*" \
'(- *)'{-h,--help}'[Show help options]' \ '(- *)'{-h,--help}'[Show help options]' \
'(- *)'{-v,--version}'[Show program version]' \ '(- *)'{-v,--version}'[Show program version]' \
'(- *)'--help-all'[Show all help options]' \ '(- *)--help-all[Show all help options]' \
'(- *)'--help-gtk'[Show GTK+ Options]' \ '(- *)--help-gtk[Show GTK+ Options]' \
'(- *)'--display='[X display to use]:display:_x_display' \ '(- *)--display=[X display to use]:display:_x_display' \
'--class=[Program class as used by the window manager]:class' \ '--class=[Program class as used by the window manager]:class' \
'--name=[Program name as used by the window manager]:name' \ '--name=[Program name as used by the window manager]:name' \
'--gtk-module=[Load additional GTK+ modules]:module' \ '--gtk-module=[Load additional GTK+ modules]:module' \

View File

@ -1,53 +0,0 @@
#compdef homestead
# ------------------------------------------------------------------------------
# Copyright (c) 2011 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 homestead (http://laravel.com/docs/homestead).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * loranger (https://github.com/loranger)
#
# ------------------------------------------------------------------------------
_homestead_get_command_list () {
homestead --no-ansi | sed "1,/Available commands/d" | awk '/ [a-z]+/ { print $1 }'
}
_homestead () {
if [ -f homestead ]; then
compadd `_homestead_get_command_list`
fi
}
compdef _homestead php homestead
compdef _homestead homestead

View File

@ -78,7 +78,7 @@ _inxi() {
"--indent=[Change default wide mode primary indentation width]:integer:(11 12 13 14 15 16 17 18 19 20)" \ "--indent=[Change default wide mode primary indentation width]:integer:(11 12 13 14 15 16 17 18 19 20)" \
"--indents=[Change wrapped mode primary indentation width]:integer:(0 1 2 3 4 5 6 7 8 9 10)" \ "--indents=[Change wrapped mode primary indentation width]:integer:(0 1 2 3 4 5 6 7 8 9 10)" \
"--limit[Limit max IP addresses for -i]:limit (-1 removes the limit): " \ "--limit[Limit max IP addresses for -i]:limit (-1 removes the limit): " \
'(--max-wrap --wrap-max)'{--max-wrap,--warp-max}='[Set maximum width where inxi autowraps line starters]' \ '(--max-wrap --wrap-max)'{--max-wrap,--wrap-max}='[Set maximum width where inxi autowraps line starters]:width' \
"--output[Change data output type]:type:(json screen xml)" \ "--output[Change data output type]:type:(json screen xml)" \
"--output-file[Path to output file]:output file:->output_file" \ "--output-file[Path to output file]:output file:->output_file" \
"--partition-sort[Change default sort order of partition output]:order:_inxi_partition_sort" \ "--partition-sort[Change default sort order of partition output]:order:_inxi_partition_sort" \

View File

@ -36,7 +36,7 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments -s \ _arguments -s \
'(-a --all)'{-a,--all}'-[Remove all resources]:resource:(shm msg sem)' \ '(-a --all)'{-a,--all}'[Remove all resources]:resource:(shm msg sem)' \
'(-M --shmem-key)'{-M,--shmem-key}'[Remove the shared memory segment created with shemkey]:shmkey' \ '(-M --shmem-key)'{-M,--shmem-key}'[Remove the shared memory segment created with shemkey]:shmkey' \
'(-m --shmem-id)'{-m,--shmem-id}'[Remove the shared memory segment identified by shmid]:shmid' \ '(-m --shmem-id)'{-m,--shmem-id}'[Remove the shared memory segment identified by shmid]:shmid' \
'(-Q --queue-key)'{-Q,--queue-key}'[Remove the message queue created with msgkey]:msgkey' \ '(-Q --queue-key)'{-Q,--queue-key}'[Remove the message queue created with msgkey]:msgkey' \

View File

@ -23,7 +23,6 @@ _arguments \
{-j,--jmeterlogfile}'[the jmeter log file]: :_files -g "*.log"' \ {-j,--jmeterlogfile}'[the jmeter log file]: :_files -g "*.log"' \
{-l,--logfile}'[the file to log samples to]: :_files -g "*.jtl"' \ {-l,--logfile}'[the file to log samples to]: :_files -g "*.jtl"' \
{-i,--jmeterlogconf}'[jmeter logging configuration file]: :_files -g "*.xml"' \ {-i,--jmeterlogconf}'[jmeter logging configuration file]: :_files -g "*.xml"' \
{-j,--jmeterlogfile}'[jmeter run file]: :_files -g "*.log"' \
{-n,--nongui}'[run JMeter in nongui mode]' \ {-n,--nongui}'[run JMeter in nongui mode]' \
{-s,--server}'[run the JMeter server]' \ {-s,--server}'[run the JMeter server]' \
{-H,--proxyHost}'[set a proxy server for JMeter to use]: :_hosts' \ {-H,--proxyHost}'[set a proxy server for JMeter to use]: :_hosts' \

View File

@ -58,7 +58,7 @@ _kak() {
'-i[backup the files on which a filter is applied using the given suffix]:suffix' \ '-i[backup the files on which a filter is applied using the given suffix]:suffix' \
'-q[in filter mode, do not print any errors]' \ '-q[in filter mode, do not print any errors]' \
'-ui[set the type of user interface to use (terminal, dummy, or json)]:ui_type:(terminal 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' \ '-l[list existing sessions]' \
'-clear[clear dead sessions]' \ '-clear[clear dead sessions]' \
'-debug[initial debug option value]:arg' \ '-debug[initial debug option value]:arg' \
'(- *)-version[display Kakoune version and quit]' \ '(- *)-version[display Kakoune version and quit]' \

View File

@ -40,7 +40,7 @@ _l3build() {
'(-c --config)'\*{-c,--config}'[Set the config(s) used for running tests]:lua_file:_files -g "*.(lua|tlg)"' \ '(-c --config)'\*{-c,--config}'[Set the config(s) used for running tests]:lua_file:_files -g "*.(lua|tlg)"' \
'(-d --date)'{-d,--date}'[Set the date to insert into sources]:date' \ '(-d --date)'{-d,--date}'[Set the date to insert into sources]:date' \
'--debug[Run target in debug mode]' \ '--debug[Run target in debug mode]' \
'--dev[Use the development LaTex format]' \ '--dev[Use the development LaTeX format]' \
'--dirty[Skip cleaning up the test area]' \ '--dirty[Skip cleaning up the test area]' \
'--dry-run[Dry run for install or upload]' \ '--dry-run[Dry run for install or upload]' \
'--email[Email address of CTAN uploader]:email' \ '--email[Email address of CTAN uploader]:email' \

View File

@ -211,7 +211,6 @@ _language_codes_iso_639_1() {
'uz:Uzbek' 'uz:Uzbek'
've:Venda' 've:Venda'
'vi:Vietnamese' 'vi:Vietnamese'
'vietnamien'
'vo:Volapük' 'vo:Volapük'
'cy:Welsh' 'cy:Welsh'
'wa:Walloon' 'wa:Walloon'
@ -238,7 +237,7 @@ _language_codes() {
;; ;;
esac esac
return ret return ret
} }
# Local Variables: # Local Variables:

View File

@ -41,10 +41,10 @@ local context state line
local curcontext="$curcontext" local curcontext="$curcontext"
_arguments -s -C \ _arguments -s -C \
'(-1,--onestopbit)'{-1,--onestopbit}'[Set the number of stop bits of the serial line to one]' \ '(-1 --onestopbit)'{-1,--onestopbit}'[Set the number of stop bits of the serial line to one]' \
'(-2,--twostopbits)'{-2,--twostopbits}'[Set the number of stop bits of the serial line to two]' \ '(-2 --twostopbits)'{-2,--twostopbits}'[Set the number of stop bits of the serial line to two]' \
'(-7,--sevenbits)'{-7,--sevenbits}'[Set the character size of the srial line to 7 bits]' \ '(-7 --sevenbits)'{-7,--sevenbits}'[Set the character size of the serial line to 7 bits]' \
'(-8,--eightbits)'{-8,--eightbits}'[Set the character size of the srial line to 8 bits]' \ '(-8 --eightbits)'{-8,--eightbits}'[Set the character size of the serial line to 8 bits]' \
'(-d --debug)'{-d,--debug}'[Enable debugging output]' \ '(-d --debug)'{-d,--debug}'[Enable debugging output]' \
'(-e --evenparity)'{-e,--evenparity}'[Set the parity of the serial line to even]' \ '(-e --evenparity)'{-e,--evenparity}'[Set the parity of the serial line to even]' \
'(-i --iflag)'{-i,--iflag}'[Set the specified bits in the c_iflag word of the serial line]:value' \ '(-i --iflag)'{-i,--iflag}'[Set the specified bits in the c_iflag word of the serial line]:value' \
@ -55,6 +55,7 @@ _arguments -s -C \
'(-p --pause)'{-p,--pause}'[Sleep for given seconds before the invocation of ldattach]:value' \ '(-p --pause)'{-p,--pause}'[Sleep for given seconds before the invocation of ldattach]:value' \
'(- *)'{-h,--help}'[Display help text and exit]'\ '(- *)'{-h,--help}'[Display help text and exit]'\
'(- *)'{-V,--version}'[Print version and exit]' \ '(- *)'{-V,--version}'[Print version and exit]' \
'1:line discipline' \
'2::device:->device' '2::device:->device'
# Complete device argument # Complete device argument

View File

@ -95,7 +95,7 @@ _arguments \
'(- *)'{-V,--version}'[display version]' \ '(- *)'{-V,--version}'[display version]' \
'(-m --shmems)'{-m,--shmems}'[shared memory segments]' \ '(-m --shmems)'{-m,--shmems}'[shared memory segments]' \
'(-M --posix-shmems)'{-M,--posix-shmems}'[POSIX shared memory segments]' \ '(-M --posix-shmems)'{-M,--posix-shmems}'[POSIX shared memory segments]' \
'(-q --queues)'{-q,--queues}'[POSIX shared memory segments]' \ '(-q --queues)'{-q,--queues}'[message queues]' \
'(-Q --posix-mqueues)'{-Q,--posix-mqueues}'[POSIX message queues]' \ '(-Q --posix-mqueues)'{-Q,--posix-mqueues}'[POSIX message queues]' \
'(-s --semaphores)'{-s,--semaphores}'[semaphores]' \ '(-s --semaphores)'{-s,--semaphores}'[semaphores]' \
'(-S --posix-semaphores)'{-S,--posix-semaphores}'[POSIX semaphores]' \ '(-S --posix-semaphores)'{-S,--posix-semaphores}'[POSIX semaphores]' \
@ -111,7 +111,7 @@ _arguments \
'(-n --newline)'{-n,--newline}'[display each piece of information on a new line]' \ '(-n --newline)'{-n,--newline}'[display each piece of information on a new line]' \
'(-l --list)'{-l,--list}'[force list output format]' \ '(-l --list)'{-l,--list}'[force list output format]' \
'(-o --output)'{-o,--output=-}'[define the columns to output]:columns:_lsipc_output_columns' \ '(-o --output)'{-o,--output=-}'[define the columns to output]:columns:_lsipc_output_columns' \
'(-P --numeric-perms)'{-p,--numeric-perms}'[print numeric permissions]' \ '(-P --numeric-perms)'{-P,--numeric-perms}'[print numeric permissions]' \
'(-r --raw)'{-r,--raw}'[display in raw mode]' \ '(-r --raw)'{-r,--raw}'[display in raw mode]' \
'(-t --time)'{-t,--time}'[show attach, detach and change times]' \ '(-t --time)'{-t,--time}'[show attach, detach and change times]' \
'(-y --shell)'{-y,--shell}'[use column names to be usable as shell variables]' '(-y --shell)'{-y,--shell}'[use column names to be usable as shell variables]'

View File

@ -35,8 +35,7 @@
setopt localoptions warncreateglobal typesetsilent setopt localoptions warncreateglobal typesetsilent
local -a opts local -a opts=(
opts=(
{-h,--help}'[show help on options]' {-h,--help}'[show help on options]'
--help-all'[show help on all options]' --help-all'[show help on all options]'
--help-terminal'[terminal options help]' --help-terminal'[terminal options help]'
@ -47,7 +46,6 @@ opts=(
{-C,--colors=}'[specifies a color configuration]:arg:' {-C,--colors=}'[specifies a color configuration]:arg:'
--configure-options'[print configure options]' --configure-options'[print configure options]'
{-d,--nomouse}'[disable mouse support in text version]' {-d,--nomouse}'[disable mouse support in text version]'
{-d,--debuglevel=}'[save the debug level for SMB VFS]:debug level:(0 1 2 3 4 5 6 7 8 9 10)'
{-e,--edit=}'[edit files]:file:_files' {-e,--edit=}'[edit files]:file:_files'
{-f,--datadir}'[print data directory]' {-f,--datadir}'[print data directory]'
{-F,--datadir-info}'[print extended info about used data directories]' {-F,--datadir-info}'[print extended info about used data directories]'

View File

@ -23,7 +23,7 @@ _arguments \
'(-F --fullwidth)'{-F,--fullwidth}'[use two columns per character]' \ '(-F --fullwidth)'{-F,--fullwidth}'[use two columns per character]' \
'(-f --fps)'{-f+,--fps=}'[set a frame rate target]: :_numbers -d 60' \ '(-f --fps)'{-f+,--fps=}'[set a frame rate target]: :_numbers -d 60' \
'(-G --glitchpct)'{-G+,--glitchpct=}'[set the percentage of characters onscreen that glitch]: :_numbers -f -d 10.0' \ '(-G --glitchpct)'{-G+,--glitchpct=}'[set the percentage of characters onscreen that glitch]: :_numbers -f -d 10.0' \
'(-g --glitchms)'{-g+,--glitchms=}'[control how often the characters on screen glitch]:N [300,400]]' \ '(-g --glitchms)'{-g+,--glitchms=}'[control how often the characters on screen glitch]:N [300,400]' \
'(-h --help)'{-h,--help}'[shows the help message]' \ '(-h --help)'{-h,--help}'[shows the help message]' \
'(-l --lingerms)'{-l+,--lingerms=}'[control how long characters stay onscreen after they finish scrolling]:N [1,3000]' \ '(-l --lingerms)'{-l+,--lingerms=}'[control how long characters stay onscreen after they finish scrolling]:N [1,3000]' \
'(-M --shadingmode)'{-M+,--shadingmode=}'[control how neo assigns color values to characters on the screen]:choice [1]:((0\:random\ \(default\) 1\:gradient))' \ '(-M --shadingmode)'{-M+,--shadingmode=}'[control how neo assigns color values to characters on the screen]:choice [1]:((0\:random\ \(default\) 1\:gradient))' \

View File

@ -31,8 +31,8 @@ options=(
{-I,--includepath}'[add specified directory to the paths searched for include files]:include directory [/usr/share]:include directory:_directories' {-I,--includepath}'[add specified directory to the paths searched for include files]:include directory [/usr/share]:include directory:_directories'
) )
# start a state machine. The state is modified by _arguments if the # start a state machine. The state is modified by _arguments if the
# current argument (descriptors) cannot be completed. Each state has to define is successive state and the # current argument (descriptors) cannot be completed. Each state has to define is successive state and the
# 'descriptors' for _arguments, which essentially tells _arguments how to complete # 'descriptors' for _arguments, which essentially tells _arguments how to complete
local _i=0 local _i=0
while true;do while true;do
@ -42,10 +42,10 @@ while true;do
descriptors=() descriptors=()
nextstate="end" nextstate="end"
case $state in case $state in
(start) (start)
##if line is empty (at the start) or ends with semicolon, autocomplete subcommands, ##if line is empty (at the start) or ends with semicolon, autocomplete subcommands,
# else if we are after a space,complete a semicolon (end the current nft command) and start anew # else if we are after a space,complete a semicolon (end the current nft command) and start anew
if [[ $line[1] = "" || $line[1] =~ ';$' ]] ; then if [[ $line[1] = "" || $line[1] =~ ';$' ]] ; then
descriptors=( ":: :_nft_subcommands" ) descriptors=( ":: :_nft_subcommands" )
nextstate="category" nextstate="category"
@ -98,7 +98,7 @@ while true;do
esac esac
;; ;;
#all completions for create and insert match with the completions of add #all completions for create and insert match with the completions of add
(create | insert) (create | insert)
state="add" state="add"
;| ;|
#all completions for reset and flush match with the completions of list #all completions for reset and flush match with the completions of list
@ -234,7 +234,7 @@ while true;do
#TODO #TODO
# _nft_rule $cmd_fam $cmd_tab $cmd_chain\ # _nft_rule $cmd_fam $cmd_tab $cmd_chain\
# && return 0; # && return 0;
descriptors=":expression: " descriptors=(":expression: ")
nextstate="start" nextstate="start"
;; ;;
(list-set | list-map | delete-map | list-chain | list-flowtable | delete-flowtable | list-ct\\ helper | list-counter | list-quota | list-meter) (list-set | list-map | delete-map | list-chain | list-flowtable | delete-flowtable | list-ct\\ helper | list-counter | list-quota | list-meter)
@ -440,7 +440,7 @@ _nft_table(){
1="${1/-handle/}" 1="${1/-handle/}"
_describe -t tables "table" tables -V "handle" _describe -t tables "table" tables -V "handle"
fi fi
case $1 in case $1 in
(arp | bridge | inet | ip | ip6 | netdev) (arp | bridge | inet | ip | ip6 | netdev)
tables=( ${(f)"$(_call_program -p tables nft -a list ruleset 2>/dev/null \ tables=( ${(f)"$(_call_program -p tables nft -a list ruleset 2>/dev/null \
| grep '^table '"$1" | sed 's/table // ;s/{ # handle // ;s/\(\S*\) \(\S*\) \(\S*\)/\2:type \1, handle \3/' )"} ) | grep '^table '"$1" | sed 's/table // ;s/{ # handle // ;s/\(\S*\) \(\S*\) \(\S*\)/\2:type \1, handle \3/' )"} )
@ -454,7 +454,6 @@ _nft_table_handle(){
#$1:protocol family #$1:protocol family
local tables=( ${(f)"$(_call_program -p tables nft -a list ruleset 2>/dev/null \ local tables=( ${(f)"$(_call_program -p tables nft -a list ruleset 2>/dev/null \
| grep '^table '"$1" | sed 's/table // ;s/{ # handle // ;s/\(\S*\) \(\S*\) \(\S*\)/\3:\2(type \1)/' )"} ) | grep '^table '"$1" | sed 's/table // ;s/{ # handle // ;s/\(\S*\) \(\S*\) \(\S*\)/\3:\2(type \1)/' )"} )
echo $1 > /tmp/znfttab
_describe -t tables "table handle" tables _describe -t tables "table handle" tables
} }
@ -462,7 +461,7 @@ _nft_table_handle_all(){
# complete the handles of tables of all families (with the table name in the description) # complete the handles of tables of all families (with the table name in the description)
local tables=( ${(f)"$(_call_program -p tables nft -a list ruleset 2>/dev/null \ local tables=( ${(f)"$(_call_program -p tables nft -a list ruleset 2>/dev/null \
| grep '^table' | sed 's/table // ;s/{ # handle // ;s/\(\S*\) \(\S*\) \(\S*\)/\3:\2(type \1)/' )"} ) | grep '^table' | sed 's/table // ;s/{ # handle // ;s/\(\S*\) \(\S*\) \(\S*\)/\3:\2(type \1)/' )"} )
_describe -t tables "table handle" tables _describe -t tables "table handle" tables
} }
_nft_object(){ _nft_object(){
@ -502,3 +501,11 @@ _nft_rule_handle(){
#currently, only the `nft` command is covered by this script. #currently, only the `nft` command is covered by this script.
_nft "$@" _nft "$@"
# 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

@ -79,7 +79,7 @@ _node() {
'--allow-addons[allow use of addons when any permissions are set]' \ '--allow-addons[allow use of addons when any permissions are set]' \
'--allow-child-process[allow use of child process when any permissions are set]' \ '--allow-child-process[allow use of child process when any permissions are set]' \
'--allow-fs-read=[allow permissions to read the filesystem]: :_files' \ '--allow-fs-read=[allow permissions to read the filesystem]: :_files' \
'--allow-fs-write=[allow permissions to write in the filesystem]:_files' \ '--allow-fs-write=[allow permissions to write in the filesystem]: :_files' \
'--allow-inspector[allow use of inspector when any permissions are set]' \ '--allow-inspector[allow use of inspector when any permissions are set]' \
'--allow-net[allow use of network when any permissions are set]' \ '--allow-net[allow use of network when any permissions are set]' \
'--allow-wasi[allow wasi when any permissions are set]' \ '--allow-wasi[allow wasi when any permissions are set]' \
@ -131,7 +131,7 @@ _node() {
'--frozen-intrinsics[experimental frozen intrinsics support]' \ '--frozen-intrinsics[experimental frozen intrinsics support]' \
'--heap-prof[Start the V8 heap profiler on start up]' \ '--heap-prof[Start the V8 heap profiler on start up]' \
'--heap-prof-dir=[Directory where the V8 profiles generated by --heap-prof]: :_files -/' \ '--heap-prof-dir=[Directory where the V8 profiles generated by --heap-prof]: :_files -/' \
'--heap-prof-interval=[sampling interval in bytes for the V8 heap profile]: :number' \ '--heap-prof-interval=[sampling interval in bytes for the V8 heap profile]:number' \
'--heap-prof-name=[file name of the V8 heap profile generated]: :_files' \ '--heap-prof-name=[file name of the V8 heap profile generated]: :_files' \
'--heapsnapshot-near-heap-limit=[Generate heapsnapshots whenever V8 is approaching the heap limit]:limit' \ '--heapsnapshot-near-heap-limit=[Generate heapsnapshots whenever V8 is approaching the heap limit]:limit' \
'--heapsnapshot-signal=[Generate heap snapshot on specified signal]:signals:_signals -s' \ '--heapsnapshot-signal=[Generate heap snapshot on specified signal]:signals:_signals -s' \
@ -148,7 +148,7 @@ _node() {
'--interpreted-frames-native-stack[help system profilers to translate JavaScript interpreted frames]' \ '--interpreted-frames-native-stack[help system profilers to translate JavaScript interpreted frames]' \
'--jitless[Disable runtime allocation of executable memory]' \ '--jitless[Disable runtime allocation of executable memory]' \
'--localstorage-file=[file used to persist localStorage data]:file:_files' \ '--localstorage-file=[file used to persist localStorage data]:file:_files' \
'--max-http-header-size=[set the maximum size of HTTP headers]: :number' \ '--max-http-header-size=[set the maximum size of HTTP headers]:number' \
"--max-old-space-size-percentage=[set V8's max old space size as a percentage of available memory]:memory" \ "--max-old-space-size-percentage=[set V8's max old space size as a percentage of available memory]:memory" \
'--network-family-autoselection-attempt-timeout=[sets the default value for the network family autoselection attempt timeout]:timeout' \ '--network-family-autoselection-attempt-timeout=[sets the default value for the network family autoselection attempt timeout]:timeout' \
'--no-addons[disable loading native addons]' \ '--no-addons[disable loading native addons]' \
@ -192,7 +192,7 @@ _node() {
'(--require-module --no-require-module --no-experimental-require-module)--require-module[support for loading a synchronous ES module graph in require()]' \ '(--require-module --no-require-module --no-experimental-require-module)--require-module[support for loading a synchronous ES module graph in require()]' \
'*'{-r,--require}'[module to preload (option can be repeated)]: :_node_files' \ '*'{-r,--require}'[module to preload (option can be repeated)]: :_node_files' \
'--run=[run a script specified in package.json]:script:_node_scripts' \ '--run=[run a script specified in package.json]:script:_node_scripts' \
'--secure-heap=[total size of the OpenSSL secure heap]: :number' \ '--secure-heap=[total size of the OpenSSL secure heap]:number' \
'--secure-heap-min=[minimum allocation size from the OpenSSL secure heap]' \ '--secure-heap-min=[minimum allocation size from the OpenSSL secure heap]' \
'--snapshot-blob=[path to the snapshot blob that is used to restore the application state]:snapshot:_files' \ '--snapshot-blob=[path to the snapshot blob that is used to restore the application state]:snapshot:_files' \
'--test[launch test runner on startup]' \ '--test[launch test runner on startup]' \

View File

@ -122,7 +122,7 @@ __nvm() {
;; ;;
(deactivate) (deactivate)
_arguments \ _arguments \
'--silent=[Silences stdout/stderr output]' \ '--silent[Silences stdout/stderr output]' \
&& ret=0 && ret=0
;; ;;
(alias) (alias)
@ -138,7 +138,7 @@ __nvm() {
;; ;;
(reinstall-package) (reinstall-package)
_arguments \ _arguments \
'--silent=[Silences stdout/stderr output]' \ '--silent[Silences stdout/stderr output]' \
'1: :__nvm_installed_versions' \ '1: :__nvm_installed_versions' \
&& ret=0 && ret=0
;; ;;

View File

@ -70,7 +70,7 @@ _openssl() {
'-xcert[extra certificate file]:file:_files' '-xcert[extra certificate file]:file:_files'
'-xchain[extra certificate chain file]:file:_files' '-xchain[extra certificate chain file]:file:_files'
'-xchain_build[build the certificate chain for the extra certificates]' '-xchain_build[build the certificate chain for the extra certificates]'
'-xcertform[extra certificate format]:format[DER PEM P12]' '-xcertform[extra certificate format]:format:(DER PEM P12)'
) )
local -a openssl_supported_commands_flags=( local -a openssl_supported_commands_flags=(
@ -348,55 +348,55 @@ _openssl_subcommands() {
'chacha20:Chacha20 Cipher' 'chacha20:Chacha20 Cipher'
'des:DES Ciper' 'des:DES Cipher'
'des-cbc:DES CBC Ciper' 'des-cbc:DES CBC Cipher'
'des-cfb:DES CFB Ciper' 'des-cfb:DES CFB Cipher'
'des-ecb:DES ECB Ciper' 'des-ecb:DES ECB Cipher'
'des-ede:DES EDE Ciper' 'des-ede:DES EDE Cipher'
'des-ede-cbc:DES EDE CBC Ciper' 'des-ede-cbc:DES EDE CBC Cipher'
'des-ede-cfb:DES EDE CFB Ciper' 'des-ede-cfb:DES EDE CFB Cipher'
'des-ede-ofb:DES EDE OFB Ciper' 'des-ede-ofb:DES EDE OFB Cipher'
'des-ofb:DES OFB Ciper' 'des-ofb:DES OFB Cipher'
'des3:Triple-DES Ciper' 'des3:Triple-DES Cipher'
'desx:Triple-DES X Ciper' 'desx:Triple-DES X Cipher'
'des-ede3:Triple-DES EDE Ciper' 'des-ede3:Triple-DES EDE Cipher'
'des-ede3-cbc:Triple-DES EDE CBC Ciper' 'des-ede3-cbc:Triple-DES EDE CBC Cipher'
'des-ede3-cfb:Triple-DES EDE CFB Ciper' 'des-ede3-cfb:Triple-DES EDE CFB Cipher'
'des-ede3-ofb:Triple-DES EDE OFB Ciper' 'des-ede3-ofb:Triple-DES EDE OFB Cipher'
'idea:IDEA Ciper' 'idea:IDEA Cipher'
'idea-cbc:IDEA CBC Ciper' 'idea-cbc:IDEA CBC Cipher'
'idea-cfb:IDEA CFB Ciper' 'idea-cfb:IDEA CFB Cipher'
'idea-ecb:IDEA ECB Ciper' 'idea-ecb:IDEA ECB Cipher'
'idea-ofb:IDEA OFB Ciper' 'idea-ofb:IDEA OFB Cipher'
'rc2:RC2 Ciper' 'rc2:RC2 Cipher'
'rc2-cbc:RC2 CBC Ciper' 'rc2-cbc:RC2 CBC Cipher'
'rc2-cfb:RC2 CFB Ciper' 'rc2-cfb:RC2 CFB Cipher'
'rc2-ecb:RC2 ECB Ciper' 'rc2-ecb:RC2 ECB Cipher'
'rc2-ofb:RC2 OFB Ciper' 'rc2-ofb:RC2 OFB Cipher'
'rc4:RC4 Ciper' 'rc4:RC4 Cipher'
'rc5:RC5 Ciper' 'rc5:RC5 Cipher'
'rc5-cbc:RC5 CBC Ciper' 'rc5-cbc:RC5 CBC Cipher'
'rc5-cfb:RC5 CFB Ciper' 'rc5-cfb:RC5 CFB Cipher'
'rc5-ecb:RC5 ECB Ciper' 'rc5-ecb:RC5 ECB Cipher'
'rc5-ofb:RC5 OFB Ciper' 'rc5-ofb:RC5 OFB Cipher'
'seed:SEED Ciper' 'seed:SEED Cipher'
'seed-cbc:SEED CBC Ciper' 'seed-cbc:SEED CBC Cipher'
'seed-cfb:SEED CFB Ciper' 'seed-cfb:SEED CFB Cipher'
'seed-ecb:SEED ECB Ciper' 'seed-ecb:SEED ECB Cipher'
'seed-ofb:SEED OFB Ciper' 'seed-ofb:SEED OFB Cipher'
'sm4:SM4 Ciper' 'sm4:SM4 Cipher'
'sm4-cbc:SM4 CBC Ciper' 'sm4-cbc:SM4 CBC Cipher'
'sm4-cfb:SM4 CFB Ciper' 'sm4-cfb:SM4 CFB Cipher'
'sm4-ctr:SM4 CTR Ciper' 'sm4-ctr:SM4 CTR Cipher'
'sm4-ecb:SM4 ECB Ciper' 'sm4-ecb:SM4 ECB Cipher'
'sm4-ofb:SM4 OFB Ciper' 'sm4-ofb:SM4 OFB Cipher'
) )
_describe -t commands 'command' commands "$@" _describe -t commands 'command' commands "$@"
@ -582,7 +582,7 @@ _openssl_cmp() {
'-extracerts[certificates files or URIs to append in extraCerts field]:file_or_uri:_files' \ '-extracerts[certificates files or URIs to append in extraCerts field]:file_or_uri:_files' \
'-unprotected_errors[send request messages without CMP-level protection]' \ '-unprotected_errors[send request messages without CMP-level protection]' \
'-certform[file format to use when saving a certificate]:format:(PEM DER)' \ '-certform[file format to use when saving a certificate]:format:(PEM DER)' \
'-crlform[file format to use when saving a CRL]:format(PEM DER)' \ '-crlform[file format to use when saving a CRL]:format:(PEM DER)' \
'-keyform[format of the key input]:format:(PEM DER P12 ENGINE)' \ '-keyform[format of the key input]:format:(PEM DER P12 ENGINE)' \
'-otherpass[pass phrase source for certificate]:source:_openssl_pass_phrase_options' \ '-otherpass[pass phrase source for certificate]:source:_openssl_pass_phrase_options' \
$openssl_provider_options[@] \ $openssl_provider_options[@] \
@ -1029,7 +1029,7 @@ _openssl_fipsinstall() {
'(- *)-help[print help message]' \ '(- *)-help[print help message]' \
'-module[file name of the FIPS module]:file:_files' \ '-module[file name of the FIPS module]:file:_files' \
'-out[file name to output configuration data to]:file:_files' \ '-out[file name to output configuration data to]:file:_files' \
'-in[input file name to load configuration data from]:_files' \ '-in[input file name to load configuration data from]:file:_files' \
'-verify[verify the input configuration file]' \ '-verify[verify the input configuration file]' \
'-provider_name[name of the provider inside the configuration file(default: "fips")]:name' \ '-provider_name[name of the provider inside the configuration file(default: "fips")]:name' \
'-section_name[name of the section inside the configuration file(default: "fips_sect")]:name' \ '-section_name[name of the section inside the configuration file(default: "fips_sect")]:name' \
@ -2012,13 +2012,13 @@ _openssl_smime() {
'-in[input message file]:file:_files' \ '-in[input message file]:file:_files' \
'-out[output file name]:file:_files' \ '-out[output file name]:file:_files' \
'-inform[input format]:format:(DER PEM SMIME)' \ '-inform[input format]:format:(DER PEM SMIME)' \
'-outform[output format]:format(DER PEM SMIME)' \ '-outform[output format]:format:(DER PEM SMIME)' \
'-keyform[key format]:format:(DER PEM P12 ENGINE)' \ '-keyform[key format]:format:(DER PEM P12 ENGINE)' \
'(-stream -indef)'{-stream,-indef}'[enable streaming I/O for encoding operations]' \ '(-stream -indef)'{-stream,-indef}'[enable streaming I/O for encoding operations]' \
'-noindef[disable streaming I/O]' \ '-noindef[disable streaming I/O]' \
'-content[file containing the detached content]:file:_files' \ '-content[file containing the detached content]:file:_files' \
'-text[add plain text MIME headers to the supplied message]' \ '-text[add plain text MIME headers to the supplied message]' \
'-md[digest algorithm to use when signing or resigning]:digest:(sha256 sha1 md5' \ '-md[digest algorithm to use when signing or resigning]:digest:(sha256 sha1 md5)' \
$cipher_flags[@] \ $cipher_flags[@] \
'-nointern[use only the certificate in the -certificate]' \ '-nointern[use only the certificate in the -certificate]' \
'-noverify[do not verify the signers certificate of a signed message]' \ '-noverify[do not verify the signers certificate of a signed message]' \
@ -2069,7 +2069,7 @@ _openssl_speed() {
'(- *)-help[print help message]' \ '(- *)-help[print help message]' \
'-config[configuration file]:file:_files' \ '-config[configuration file]:file:_files' \
'-elapsed[use wall-clock time instead of CPU user time as divisor]' \ '-elapsed[use wall-clock time instead of CPU user time as divisor]' \
'-evp[use specified cipher or message digest algorithm via the EVP interface]:alg: _alternative "ciphers\:cipher\:_openssl_digests" "digests\:digest\:_openssl_cipher_algorithms"' \ '-evp[use specified cipher or message digest algorithm via the EVP interface]:alg: _alternative "ciphers\:cipher\:_openssl_cipher_algorithms" "digests\:digest\:_openssl_digests"' \
'-multi[run multiple operations in parallel]:number' \ '-multi[run multiple operations in parallel]:number' \
'-async_jobs[enable async mode and start specified number of jobs]:number' \ '-async_jobs[enable async mode and start specified number of jobs]:number' \
'-misalign[misalign the buffers by the specified number of bytes]:number' \ '-misalign[misalign the buffers by the specified number of bytes]:number' \

View File

@ -49,198 +49,203 @@ local sessions_names=$(openvpn3 sessions-list | grep 'Session name:' | awk '{pri
local configs_names=$(openvpn3 configs-list | awk 'count&&!--count; /\/net\/openvpn\//{count=2}' | awk '{print $1}' | xargs) local configs_names=$(openvpn3 configs-list | awk 'count&&!--count; /\/net\/openvpn\//{count=2}' | awk '{print $1}' | xargs)
local configs_paths=$(openvpn3 configs-list | grep '/net/openvpn/v3/configuration/' | xargs) local configs_paths=$(openvpn3 configs-list | grep '/net/openvpn/v3/configuration/' | xargs)
_openvpn3_config-acl(){ _openvpn3_config-acl() {
_arguments \ _arguments \
{-s,--show}"[Show the current access control lists]" \ {-s,--show}"[Show the current access control lists]" \
{-o,--path}"[OBJ-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \ {-o,--path}"[OBJ-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \
{-h,--help}"[This help screen]" \ {-h,--help}"[This help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \ {-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \
{-S,--seal}"[Make the configuration profile permanently read-only]" \ {-S,--seal}"[Make the configuration profile permanently read-only]" \
{-R,--revoke}"[<UID | username> Revoke this user access from this configuration profile]" \ {-R,--revoke}"[<UID | username> Revoke this user access from this configuration profile]" \
{-G,--grant}"[<UID | username> Grant this user access to this configuration profile]" \ {-G,--grant}"[<UID | username> Grant this user access to this configuration profile]" \
"--public-access[<true|false> Set/unset the public access flag]" \ "--public-access[<true|false> Set/unset the public access flag]" \
"--lock-down[<true|false> Set/unset the lock-down flag.Will disable config retrieval for users]: :(true false)" \ "--lock-down[<true|false> Set/unset the lock-down flag.Will disable config retrieval for users]: :(true false)" \
"--config-path[OBJ-PATH Alias for --path]: :($configs_paths)" \ "--config-path[OBJ-PATH Alias for --path]: :($configs_paths)"
} }
_openvpn3_config-import(){ _openvpn3_config-import() {
_arguments \ _arguments \
{-p,--persistent}"[Make the configuration profile persistent through service restarts]" \ {-p,--persistent}"[Make the configuration profile persistent through service restarts]" \
{-n,--name}"[NAME Provide a different name for the configuration (default: CFG-FILE)]" \ {-n,--name}"[NAME Provide a different name for the configuration (default: CFG-FILE)]" \
{-h,--help}"[This help screen]" \ {-h,--help}"[This help screen]" \
{-c,--config}"[CFG-FILE Configuration file to import]: :_files" \ {-c,--config}"[CFG-FILE Configuration file to import]: :_files"
} }
_openvpn3_config-manage(){ _openvpn3_config-manage() {
_arguments \ _arguments \
{-s,--show}"[Show current configuration options]" \ {-s,--show}"[Show current configuration options]" \
{-r,--rename}"[NEW-CONFIG-NAME Renames the configuration]" \ {-r,--rename}"[NEW-CONFIG-NAME Renames the configuration]" \
{-o,--path}"[CONFIG-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \ {-o,--path}"[CONFIG-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \
{-h,--help}"[This help screen]" \ {-h,--help}"[This help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \ {-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \
"--unset-override[<name> Removes the <name> override]" \ "--unset-override[<name> Removes the <name> override]" \
"--tls-version-min[<tls_1_0|tls_1_1|tls_1_2|tls_1_3> Sets the minimal TLS version for the control channel]: :(tls_1_0 tls_1_1 tls_1_2 tls_1_3)" \ "--tls-version-min[<tls_1_0|tls_1_1|tls_1_2|tls_1_3> Sets the minimal TLS version for the control channel]: :(tls_1_0 tls_1_1 tls_1_2 tls_1_3)" \
"--tls-cert-profile[<legacy preferred suiteb> Sets the control channel tls profile]: :(legacy preferred suiteb)" \ "--tls-cert-profile[<legacy preferred suiteb> Sets the control channel tls profile]: :(legacy preferred suiteb)" \
"--server-override[<value> Replace the remote, connecting to this server instead the server specified in the configuration]" \ "--server-override[<value> Replace the remote, connecting to this server instead the server specified in the configuration]" \
"--proxy-username[<value> HTTP Proxy username to authenticate as]" \ "--proxy-username[<value> HTTP Proxy username to authenticate as]" \
"--proxy-port[<value> HTTP Proxy port to connect on]" \ "--proxy-port[<value> HTTP Proxy port to connect on]" \
"--proxy-password[<value> HTTP Proxy password to use for authentication]" \ "--proxy-password[<value> HTTP Proxy password to use for authentication]" \
"--proxy-host[<value> HTTP Proxy to connect via, overrides configuration file http-proxy]" \ "--proxy-host[<value> HTTP Proxy to connect via, overrides configuration file http-proxy]" \
"--proxy-auth-cleartext[<true|false> Adds the boolean override proxy-auth-cleartext]: :(true false)" \ "--proxy-auth-cleartext[<true|false> Adds the boolean override proxy-auth-cleartext]: :(true false)" \
"--proto-override[<tcp|udp> Overrides the protocol being used]: :(tcp upd)" \ "--proto-override[<tcp|udp> Overrides the protocol being used]: :(tcp udp)" \
"--port-override[<value> Replace the remote port, connecting to this port instead of the configuration value]" \ "--port-override[<value> Replace the remote port, connecting to this port instead of the configuration value]" \
"--persist-tun[<true|false> Adds the boolean override persist-tun]: :(true false)" \ "--persist-tun[<true|false> Adds the boolean override persist-tun]: :(true false)" \
"--ipv6[<yes|no|default> Sets the IPv6 policy of the client]: :(yes no default)" \ "--ipv6[<yes|no|default> Sets the IPv6 policy of the client]: :(yes no default)" \
"--force-cipher-aes-cbc[<true|false> Adds the boolean override force-cipher-aes-cbc]: :(true false)" \ "--force-cipher-aes-cbc[<true|false> Adds the boolean override force-cipher-aes-cbc]: :(true false)" \
"--dns-sync-lookup[<true|false> Adds the boolean override dns-sync-lookup]: :(true false)" \ "--dns-sync-lookup[<true|false> Adds the boolean override dns-sync-lookup]: :(true false)" \
"--dns-setup-disabled[<true|false> Adds the boolean override dns-setup-disabled]: :(true false)" \ "--dns-setup-disabled[<true|false> Adds the boolean override dns-setup-disabled]: :(true false)" \
"--dns-fallback-google[<true|false> Adds the boolean override dns-fallback-google]: :(true false)" \ "--dns-fallback-google[<true|false> Adds the boolean override dns-fallback-google]: :(true false)" \
"--config-path[CONFIG-PATH Alias for --path]: :($configs_paths)" \ "--config-path[CONFIG-PATH Alias for --path]: :($configs_paths)" \
"--auth-fail-retry[<true|false> Adds the boolean override auth-fail-retry]: :(true false)" \ "--auth-fail-retry[<true|false> Adds the boolean override auth-fail-retry]: :(true false)" \
"--allow-compression[<no asym yes> Set compression mode]: :(no asym yes)" \ "--allow-compression[<no asym yes> Set compression mode]: :(no asym yes)" \
}
_openvpn3_config-remove() {
_arguments \
{-o,--path}"[OBJ-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \
{-h,--help}"[This help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \
"--force[Force the deletion process without asking for confirmation]" \
"--config-path[OBJ-PATH Alias for --path]: :($configs_paths)"
} }
_openvpn3_config-remove(){ _openvpn3_config-show() {
_arguments \ _arguments \
{-o,--path}"[OBJ-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \ {-o,--path}"[OBJ-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \
{-h,--help}"[This help screen]" \ {-j,--json}"[Dump the configuration in JSON format]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \ {-h,--help}"[This help screen]" \
"--force[Force the deletion process without asking for confirmation]" \ {-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \
"--config-path[OBJ-PATH Alias for --path]: :($configs_paths)" \ "--config-path[OBJ-PATH Alias for --path]: :($configs_paths)"
} }
_openvpn3_config-show(){ _openvpn3_configs-list() {
_arguments \ _arguments \
{-o,--path}"[OBJ-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \ {-h,--help}"[This help screen]"
{-j,--json}"[Dump the configuration in JSON format]" \
{-h,--help}"[This help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \
"--config-path[OBJ-PATH Alias for --path]: :($configs_paths)" \
} }
_openvpn3_configs-list(){ _openvpn3_help() {
_arguments \ _arguments \
{-h,--help}"[This help screen]" \ {-h,--help}"[This help screen]"
} }
_openvpn3_help(){ _openvpn3_log() {
_arguments \ _arguments \
{-h,--help}"[This help screen]" \ {-h,--help}"[This help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --session-path, where configuration profile name is used instead]: :($sessions_configs_names $configs_names)" \
{-I,--interface}"[INTERFACE Alternative to --session-path, where tun interface name is used instead]: :($sessions_interfaces)" \
"--session-path[SESSION-PATH Receive log events for a specific session]: :($sessions_paths)" \
"--log-level[LOG-LEVEL Set the log verbosity level of messages to be shown (default: 4)]" \
"--config-events[Receive log events issued by the configuration manager]"
} }
_openvpn3_log(){ _openvpn3_session-acl() {
_arguments \ _arguments \
{-h,--help}"[This help screen]" \ {-s,--show}"[Show the current access control lists]" \
{-c,--config}"[CONFIG-NAME Alternative to --session-path, where configuration profile name is used instead]: :($sessions_configs_names $configs_names)" \ {-o,--path}"[SESSION-PATH Path to the session in the session manager]: :($sessions_paths)" \
{-I,--interface}"[INTERFACE Alternative to --session-path, where tun interface name is used instead]: :($sessions_interfaces)" \ {-h,--help}"[This help screen]" \
"--session-path[SESSION-PATH Receive log events for a specific session]: :($sessions_paths)" \ {-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($sessions_configs_names)" \
"--log-level[LOG-LEVEL Set the log verbosity level of messages to be shown (default: 4)]" \ {-R,--revoke}"[<UID | username> Revoke this user access from this session]" \
"--config-events[Receive log events issued by the configuration manager]" \ {-I,--interface}"[INTERFACE Alternative to --path, where tun interface name is used instead]: :($sessions_interfaces)" \
{-G,--grant}"[<UID | username> Grant this user access to this session]" \
"--session-path[SESSION-PATH Alias for --path]: :($sessions_paths)" \
"--public-access[<true|false> Set/unset the public access flag]: :(true false)" \
"--allow-log-access[<true|false> Can users granted access also access the session log?]: :(true false)"
} }
_openvpn3__session-acl(){ _openvpn3_session-manage() {
_arguments \ _arguments \
{-s,--show}"[Show the current access control lists]" \ {-o,--path}"[SESSION-PATH Path to the session in the session manager]: :($sessions_paths)" \
{-o,--path}"[SESSION-PATH Path to the session in the session manager]: :($sessions_paths)" \ {-h,--help}"[This help screen]" \
{-h,--help}"[This help screen]" \ {-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($sessions_configs_names)" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($sessions_configs_names)" \ {-R,--resume}"[Resumes a paused VPN session]" \
{-R,--revoke}"[<UID | username> Revoke this user access from this session]" \ {-P,--pause}"[Pauses the VPN session]" \
{-I,--interface}"[INTERFACE Alternative to --path, where tun interface name is used instead]: :($sessions_interfaces)" \ {-I,--interface}"[INTERFACE Alternative to --path, where tun interface name is used instead]: :($sessions_interfaces)" \
{-G,--grant}"[<UID | username> Grant this user access to this session]" \ {-D,--disconnect}"[Disconnects a VPN session]" \
"--session-path[SESSION-PATH Alias for --path]: :($sessions_paths)" \ "--session-path[SESSION-PATH Alias for --path]: :($sessions_paths)" \
"--public-access[<true|false> Set/unset the public access flag]: :(true false)" \ "--restart[Disconnect and reconnect a running VPN session]" \
"--allow-log-access[<true|false> Can users granted access also access the session log?]: :(true false)" \ "--cleanup[Clean up stale sessions]"
} }
_openvpn3_session-manage(){ _openvpn3_session-start() {
_arguments \ _arguments \
{-o,--path}"[SESSION-PATH Path to the session in the session manager]: :($sessions_paths)" \ {-p,--config-path}"[CONFIG-PATH Configuration path to an already imported configuration]: :($configs_paths)" \
{-h,--help}"[This help screen]" \ {-h,--help}"[This help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($sessions_configs_names)" \ {-c,--config}"[CONFIG-FILE Configuration file to start directly]: :_files" \
{-R,--resume}"[Resumes a paused VPN session]" \ "--persist-tun[Enforces persistent tun/seamless tunnel (requires --config)]"
{-P,--pause}"[Pauses the VPN session]" \
{-I,--interface}"[INTERFACE Alternative to --path, where tun interface name is used instead]: :($sessions_interfaces)" \
{-D,--disconnect}"[Disconnects a VPN session]" \
"--session-path[SESSION-PATH Alias for --path]: :($sessions_paths)" \
"--restart[Disconnect and reconnect a running VPN session]" \
"--cleanup[Clean up stale sessions]" \
} }
_openvpn3_session-start(){ _openvpn3_session-stats() {
_arguments \ _arguments \
{-p,--config-path}"[CONFIG-PATH Configuration path to an already imported configuration]: :($configs_paths)" \ {-o,--path}"[SESSION-PATH Path to the configuration in the configuration manager]: :($sessions_paths)" \
{-h,--help}"[This help screen]" \ {-j,--json}"[Dump the configuration in JSON format]" \
{-c,--config}"[CONFIG-FILE Configuration file to start directly]: :_files" \ {-h,--help}"[This help screen]" \
"--persist-tun[Enforces persistent tun/seamless tunnel (requires --config)]" \ {-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($sessions_configs_names)" \
{-I,--interface}"[INTERFACE Alternative to --path, where tun interface name is used instead]: :($sessions_interfaces)" \
"--session-path[SESSION-PATH Alias for --path]: :($sessions_paths)"
} }
_openvpn3_session-stats(){ _openvpn3_sessions-list() {
_arguments \ _arguments \
{-o,--path}"[SESSION-PATH Path to the configuration in the configuration manager]: :($sessions_paths)" \ {-h,--help}"[This help screen]"
{-j,--json}"[Dump the configuration in JSON format]" \
{-h,--help}"[This help screen]" \
{-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($sessions_configs_names)" \
{-I,--interface}"[INTERFACE Alternative to --path, where tun interface name is used instead]: :($sessions_interfaces)" \
"--session-path[SESSION-PATH Alias for --path]: :($sessions_paths)" \
} }
_openvpn3_sessions-list(){ _openvpn3_shell-completion() {
_arguments \ _arguments \
{-h,--help}"[This help screen]" \ {-h,--help}"[This help screen]" \
"--list-commands[List all available commands]" \
"--list-options[COMMAND List all available options for a specific command]: :($(openvpn3 shell-completion --list-commands))" \
"--arg-helper[OPTION Used together with --list-options, lists value hint to an option]"
} }
_openvpn3_shell-completion(){ _openvpn3_version() {
_arguments \ _arguments \
{-h,--help}"[This help screen]" \ {-h,--help}"[This help screen]"
"--list-commands[List all available commands]" \
"--list-options[COMMAND List all available options for a specific command]: :($(openvpn3 shell-completion --list-commands))" \
"--arg-helper[OPTION Used together with --list-options, lists value hint to an option]"
} }
_openvpn3_version(){ _openvpn3_command() {
_arguments \ local -a openvpn3_cmds=(
{-h,--help}"[This help screen]" \ "config-acl: Manage access control lists for configurations"
} "config-import: Import configuration profiles"
"config-manage: Manage configuration properties"
"config-remove: Remove an available configuration profile"
"config-show: Show/dump a configuration profile"
"configs-list: List all available configuration profiles"
"help: This help screen"
"log: Receive log events as they occur"
"session-acl: Manage access control lists for sessions"
"session-manage: Manage VPN sessions"
"session-start: Start a new VPN session"
"session-stats: Show session statistics"
"sessions-list: List available VPN sessions"
"shell-completion: Helper function to provide shell completion data"
"version: Show program version information"
)
if ((CURRENT == 1)); then
_openvpn3_command(){ _describe -t commands 'openvpn3 commands' openvpn3_cmds
local -a _openvpn3_cmds else
_openvpn3_cmds=( local curcontext="$curcontext"
"config-acl: Manage access control lists for configurations" \ cmd="${${openvpn3_cmds[(r)$words[1]:*]%%:*}}"
"config-import: Import configuration profiles" \ if (($#cmd)); then
"config-manage: Manage configuration properties" \ if (( $+functions[_openvpn3_$cmd] )); then
"config-remove: Remove an available configuration profile" \ _openvpn3_$cmd
"config-show: Show/dump a configuration profile" \ else
"configs-list: List all available configuration profiles" \ _message "no options for $cmd"
"help: This help screen" \ fi
"log: Receive log events as they occur" \
"session-acl: Manage access control lists for sessions" \
"session-manage: Manage VPN sessions" \
"session-start: Start a new VPN session" \
"session-stats: Show session statistics" \
"sessions-list: List available VPN sessions" \
"shell-completion: Helper function to provide shell completion data" \
"version: Show program version information" \
)
if ((CURRENT == 1)); then
_describe -t commands 'openvpn3 commands' _openvpn3_cmds
else else
local curcontext="$curcontext" _message "no more options"
cmd="${${_openvpn3_cmds[(r)$words[1]:*]%%:*}}"
if (($#cmd)); then
if (( $+functions[_openvpn3_$cmd] )); then
_openvpn3_$cmd
else
_message "no options for $cmd"
fi
else
_message "no more options"
fi
fi fi
fi
} }
_arguments \ _arguments \
{-h,--help}"[that This help screen]" \ {-h,--help}"[that This help screen]" \
"*::openvpn3 commands:_openvpn3_command" \ "*::openvpn3 commands:_openvpn3_command" \
# 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

@ -41,7 +41,6 @@ _phing() {
# Follow https://www.phing.info/guide/chunkhtml/sec.commandlineargs.html for more information # Follow https://www.phing.info/guide/chunkhtml/sec.commandlineargs.html for more information
_arguments -C \ _arguments -C \
'(-h -help)'{-h,-help}'[display the help screen]' \ '(-h -help)'{-h,-help}'[display the help screen]' \
'(-v -version)'{-v,-version}'[print version information and exit]' \
'(-l -list)'{-l,-list}'[list all available targets in buildfile]' \ '(-l -list)'{-l,-list}'[list all available targets in buildfile]' \
'(-i -init)'{-i,-init}'[generates an initial buildfile]:file:_files' \ '(-i -init)'{-i,-init}'[generates an initial buildfile]:file:_files' \
'(-q -quiet)'{-q,-quiet}'[quiet operation, no output at all]' \ '(-q -quiet)'{-q,-quiet}'[quiet operation, no output at all]' \
@ -63,7 +62,7 @@ _phing() {
'-propertyfileoverride[values in property file override existing values]' \ '-propertyfileoverride[values in property file override existing values]' \
'-find[search for buildfile towards the root of the filesystem and use it]:file:_files' \ '-find[search for buildfile towards the root of the filesystem and use it]:file:_files' \
'-inputhandler[the class to use to handle user input]:class' \ '-inputhandler[the class to use to handle user input]:class' \
'(- *)'{-v,-version}'[show version]' \ '(- *)'{-v,-version}'[show version and exit]' \
'1: :->targets' \ '1: :->targets' \
'*:: :->args' \ '*:: :->args' \
&& ret=0 && ret=0

View File

@ -55,7 +55,7 @@ _pixz() {
'(- 1 *)'-h"[Show help and exit]" \ '(- 1 *)'-h"[Show help and exit]" \
'(- 1 *)-l[List tarball contents very fast]:file:_files -g "*.(tpxz|xz)"' \ '(- 1 *)-l[List tarball contents very fast]:file:_files -g "*.(tpxz|xz)"' \
'(- 1 *)-x[Extract one file very fast]:filepath' \ '(- 1 *)-x[Extract one file very fast]:filepath' \
'(- 1 *)-d[Decompress]:file:_files -g "*.(tpxz|xz)' \ '(- 1 *)-d[Decompress]:file:_files -g "*.(tpxz|xz)"' \
'-i[Input]:file:_files' \ '-i[Input]:file:_files' \
'-o[Output]:output:_files' \ '-o[Output]:output:_files' \
'-p[Use a maximum of NUM CPU-intensive threads]:cpu:_pixz_cpus' \ '-p[Use a maximum of NUM CPU-intensive threads]:cpu:_pixz_cpus' \

View File

@ -36,13 +36,12 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
local -a command_options local -a command_options=(
command_options=(
'--version[Show the program version and exit]' '--version[Show the program version and exit]'
'--filter[Set the filter, e.g. installed]' '--filter[Set the filter, e.g. installed]'
"--root[Set the install root, e.g. '/' or '/mnt/ltsp']" "--root[Set the install root, e.g. '/' or '/mnt/ltsp']"
'(-n --nowait)'{-n,--nowait}'[Exit without waiting for actions to complete]' '(-n --nowait)'{-n,--nowait}'[Exit without waiting for actions to complete]'
'(-y --noninteractive)'{-g,--noninteractive}'[Install the packages without asking for confirmation]' '(-y --noninteractive)'{-y,--noninteractive}'[Install the packages without asking for confirmation]'
'--background[Run the command using idle network bandwidth and also using less power]' '--background[Run the command using idle network bandwidth and also using less power]'
'(-p --plain)'{-p,--plain}'[Print to screen a machine readable output, rather than using animated widgets]' '(-p --plain)'{-p,--plain}'[Print to screen a machine readable output, rather than using animated widgets]'
'(-c --cache-age)'{-c,--cache-age}"[The maximum metadata cache age. Use -1 for 'never'.]" '(-c --cache-age)'{-c,--cache-age}"[The maximum metadata cache age. Use -1 for 'never'.]"
@ -50,8 +49,7 @@ command_options=(
'(-v --verbose)'{-v,--verbose}'[Show debugging information for all files]' '(-v --verbose)'{-v,--verbose}'[Show debugging information for all files]'
) )
local -a actions local -a actions=(
actions=(
'accept-eula' 'accept-eula'
'get-roles' 'get-roles'
'get-distro-upgrades' 'get-distro-upgrades'

View File

@ -50,13 +50,13 @@ _pm2() {
'--max-memory-restart[restart the app if an amount of memory is exceeded (in bytes)]:bytes' \ '--max-memory-restart[restart the app if an amount of memory is exceeded (in bytes)]:bytes' \
'--restart-delay[specify a delay between restarts(in milliseconds)]:delay' \ '--restart-delay[specify a delay between restarts(in milliseconds)]:delay' \
'--exp-backoff-restart-delay[specify a delay between restarts(in milliseconds)]:delay' \ '--exp-backoff-restart-delay[specify a delay between restarts(in milliseconds)]:delay' \
'(-x --execute-command)'{-e,--execute-command}'[execute a program using fork system]' \ '(-x --execute-command)'{-x,--execute-command}'[execute a program using fork system]' \
'--max-restarts[only start the script COUNT times]:count' \ '--max-restarts[only start the script COUNT times]:count' \
'(-u --user)'{-u,--user}'[define user when generating startup script]:username' \ '(-u --user)'{-u,--user}'[define user when generating startup script]:username' \
'--uid[run target script with <uid> rights]:uid' \ '--uid[run target script with <uid> rights]:uid' \
'--gid[run target script with <gid> rights]:gui' \ '--gid[run target script with <gid> rights]:gui' \
'--namespace[start application within specified namespace]:namespace' \ '--namespace[start application within specified namespace]:namespace' \
'--cwd[run target script from path <cwd>]:cwd:_paths -/' \ '--cwd[run target script from path <cwd>]:cwd:_files -/' \
'--hp[define home path when generating startup script]: :_paths -/' \ '--hp[define home path when generating startup script]: :_paths -/' \
'--wait-ip[override systemd script to wait for full internet connectivity to launch pm2]' \ '--wait-ip[override systemd script to wait for full internet connectivity to launch pm2]' \
'--service-name[define service name when generating startup script]' \ '--service-name[define service name when generating startup script]' \

View File

@ -250,10 +250,10 @@ _port() {
;; ;;
(select) (select)
options+=( options+=(
'--summary:Display summary of selected options' '--summary[Display summary of selected options]'
'--list:List available versions for the group' '--list[List available versions for the group]'
'--set:Select the given version for the group' '--set[Select the given version for the group]'
'--show:Show which version is currently selected for the group (default if none given)' '--show[Show which version is currently selected for the group (default if none given)]'
'1:group:_port_select_groups' '1:group:_port_select_groups'
'2:variant:_port_select_variants' '2:variant:_port_select_variants'
) )

View File

@ -69,7 +69,7 @@ _protoc() {
'--cpp_out=[Generate C++ header and source]:out_dir:_files -/' \ '--cpp_out=[Generate C++ header and source]:out_dir:_files -/' \
'--csharp_out=[Generate C# source file]:out_dir:_files -/' \ '--csharp_out=[Generate C# source file]:out_dir:_files -/' \
'--java_out=[Generate Java source file]:out_dir:_files -/' \ '--java_out=[Generate Java source file]:out_dir:_files -/' \
'--kotlin_out[Generate Kotlin file]:out_dir:_files -/' \ '--kotlin_out=[Generate Kotlin file]:out_dir:_files -/' \
'--js_out=[Generate JavaScript source]:out_dir:_files -/' \ '--js_out=[Generate JavaScript source]:out_dir:_files -/' \
'--objc_out=[Generate Objective C header and source]:out_dir:_files -/' \ '--objc_out=[Generate Objective C header and source]:out_dir:_files -/' \
'--php_out=[Generate PHP source file]:out_dir:_files -/' \ '--php_out=[Generate PHP source file]:out_dir:_files -/' \

View File

@ -203,7 +203,7 @@ _qmk_chibios-confmigrate() {
'(-f --force)'{-f,--force}'[Re-migrates an already migrated file, even if it does not detect a full ChibiOS config]' \ '(-f --force)'{-f,--force}'[Re-migrates an already migrated file, even if it does not detect a full ChibiOS config]' \
'(-d --delete)'{-d,--delete}'[If the file has no overrides, migration will delete the input file]' \ '(-d --delete)'{-d,--delete}'[If the file has no overrides, migration will delete the input file]' \
'(-o --overwrite)'{-o,--overwrite}'[Overwrites the input file during migration]' \ '(-o --overwrite)'{-o,--overwrite}'[Overwrites the input file during migration]' \
'(-r,--reference)'{-r,--reference}'[Specify the reference file to compare against]:reference' \ '(-r --reference)'{-r,--reference}'[Specify the reference file to compare against]:reference' \
'(-i --input)'{-i,--input}'[Specify input config file]: :_files' '(-i --input)'{-i,--input}'[Specify input config file]: :_files'
} }
@ -221,7 +221,7 @@ _qmk_compile() {
'(-c --clean)'{-c,--clean}'[Remove object files before compiling]' \ '(-c --clean)'{-c,--clean}'[Remove object files before compiling]' \
\*{-e,--env}'[Set a variable to be passed to make]:env' \ \*{-e,--env}'[Set a variable to be passed to make]:env' \
'(-j --parallel)'{-j,--parallel}'[Set the number of parallel make jobs; 0 means unlimited]' \ '(-j --parallel)'{-j,--parallel}'[Set the number of parallel make jobs; 0 means unlimited]' \
'(-n --dry-run)'{-d,--dry-run}"[Don't actually build, just show the make command to be run]" \ '(-n --dry-run)'{-n,--dry-run}"[Don't actually build, just show the make command to be run]" \
'(-km --keymap)'{-km,--keymap}'[The keymap to build a firmware for]:keymap' \ '(-km --keymap)'{-km,--keymap}'[The keymap to build a firmware for]:keymap' \
'(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \ '(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \
'*: :_files' '*: :_files'
@ -242,7 +242,7 @@ _qmk_flash() {
'(-c --clean)'{-c,--clean}'[Remove object files before compiling]' \ '(-c --clean)'{-c,--clean}'[Remove object files before compiling]' \
\*{-e,--env}'[Set a variable to be passed to make]:env' \ \*{-e,--env}'[Set a variable to be passed to make]:env' \
'(-j --parallel)'{-j,--parallel}'[Set the number of parallel make jobs; 0 means unlimited]' \ '(-j --parallel)'{-j,--parallel}'[Set the number of parallel make jobs; 0 means unlimited]' \
'(-n --dry-run)'{-d,--dry-run}"[Don't actually build, just show the make command to be run]" \ '(-n --dry-run)'{-n,--dry-run}"[Don't actually build, just show the make command to be run]" \
'(-km --keymap)'{-km,--keymap}'[The keymap to build a firmware for]:keymap' \ '(-km --keymap)'{-km,--keymap}'[The keymap to build a firmware for]:keymap' \
'(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \ '(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \
'(-m --mcu)'{-m,--mcu}'[The MCS name]:mcu' \ '(-m --mcu)'{-m,--mcu}'[The MCS name]:mcu' \

View File

@ -49,7 +49,7 @@ _rails() {
'(- *)'{-v,--version}'[Show Rails version and quit]' '(- *)'{-v,--version}'[Show Rails version and quit]'
) )
runtime_options=( rails_options=(
'(-f --force)'{-f,--force}'[Overwrite files that already exist]' '(-f --force)'{-f,--force}'[Overwrite files that already exist]'
'(-p --pretend)'{-p,--pretend}'[Run but do not make any changes]' '(-p --pretend)'{-p,--pretend}'[Run but do not make any changes]'
'(-q --quiet)'{-q,--quiet}'[Suppress status output]' '(-q --quiet)'{-q,--quiet}'[Suppress status output]'
@ -59,7 +59,7 @@ _rails() {
local ret=1 local ret=1
_arguments -C \ _arguments -C \
$rails_options \ $runtime_options \
'1: :_rails_subcommands' \ '1: :_rails_subcommands' \
'*:: :->command' && ret=0 '*:: :->command' && ret=0
@ -513,7 +513,7 @@ _rails_is_in_app() {
if [[ -f "${dir}/bin/rails" ]]; then if [[ -f "${dir}/bin/rails" ]]; then
return 0 return 0
fi fi
dir="${dir/*}" dir="${dir%/*}"
done done
return 1 return 1

View File

@ -66,7 +66,7 @@ _arguments \
'--force-default-config[Use default configuration even if configuration files are present in the directory tree]' \ '--force-default-config[Use default configuration even if configuration files are present in the directory tree]' \
'(-s --stdin)'{-s,--stdin}'[Pipe source from STDIN, using FILE in offense reports]: :_files' \ '(-s --stdin)'{-s,--stdin}'[Pipe source from STDIN, using FILE in offense reports]: :_files' \
'--editor-mode[Optimize real-time feedback in editors, adjusting behaviors for editing experience]' \ '--editor-mode[Optimize real-time feedback in editors, adjusting behaviors for editing experience]' \
'(-P --parallel --no-parallel)'{-p,--parallel}'[Use available CPUs to execute inspection in parallel]' \ '(-P --parallel --no-parallel)'{-P,--parallel}'[Use available CPUs to execute inspection in parallel]' \
'(-P --parallel --no-parallel)--no-parallel[Execute not parallel]' \ '(-P --parallel --no-parallel)--no-parallel[Execute not parallel]' \
'--raise-cop-error[Raise cop-related errors with cause and location]' \ '--raise-cop-error[Raise cop-related errors with cause and location]' \
'--fail-level[Minimum severity for exit with error code]:severity:(autocorrect info refactor convention warning error fatal)' \ '--fail-level[Minimum severity for exit with error code]:severity:(autocorrect info refactor convention warning error fatal)' \

View File

@ -38,33 +38,29 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_shallow-backup() { _arguments \
_arguments \ '(- 1 *)'{-h,--help}'[Show help and exit]' \
'(- 1 *)'{-h,--help}'[Show help and exit]' \ '(- 1 *)'{-v,--version}'[Print version]' \
'(- 1 *)'{-v,--version}'[Print version]' \ '--add-dot[Add a dotfile or dotfolder to config by path]:PATH:_files' \
'--add-dot[Add a dotfile or dotfolder to config by path]:PATH:_files' \ '--backup-all[Full back up]' \
'--backup-all[Full back up]' \ '--backup-configs[Back up app config files]' \
'--backup-configs[Back up app config files]' \ '--backup-dots[Back up dotfiles]' \
'--backup-dots[Back up dotfiles]' \ '--backup-fonts[Back up installed fonts]' \
'--backup-fonts[Back up installed fonts]' \ '--backup-packages[Back up package libraries]' \
'--backup-packages[Back up package libraries]' \ '--delete-config[Delete config file]' \
'--delete-config[Delete config file]' \ '--destroy-backup[Delete backup directory]' \
'--destroy-backup[Delete backup directory]' \ '--dry-run[Do not backup or reinstall any files, just give verbose output]' \
'--dry-run[Do not backup or reinstall any files, just give verbose output]' \ '--new-path[Input a new back up directory path]:PATH:_files -/' \
'--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-new-backup-path-prompt[Skip setting new back up directory path prompt]' \ '--no-splash[Do not display splash screen]' \
'--no-splash[Do not display splash screen]' \ '--reinstall-all[Full reinstallation]' \
'--reinstall-all[Full reinstallation]' \ '--reinstall-configs[Reinstall configs]' \
'--reinstall-configs[Reinstall configs]' \ '--reinstall-dots[Reinstall dotfiles and dotfolders]' \
'--reinstall-dots[Reinstall dotfiles and dotfolders]' \ '--reinstall-fonts[Reinstall fonts]' \
'--reinstall-fonts[Reinstall fonts]' \ '--reinstall-packages[Reinstall packages]' \
'--reinstall-packages[Reinstall packages]' \ '--remote[Set remote URL for the git repo]:url' \
'--remote[Set remote URL for the git repo]':url \ '--edit[Open config file in $EDITOR]' \
'--edit[Open config file in $EDITOR]' \ '--show[Display config file]'
'--show[Display config file]'
}
_shallow-backup
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -49,7 +49,7 @@ _arguments \
"--norc[don't look for .shellcheckrc files]" \ "--norc[don't look for .shellcheckrc files]" \
'--rcfile=[specify configuration file over searching for one]:rcfile:_files' \ '--rcfile=[specify configuration file over searching for one]:rcfile:_files' \
{-o,--enable=}"[give list of optional checks to enable (or 'all')]:error code" \ {-o,--enable=}"[give list of optional checks to enable (or 'all')]:error code" \
{-P,--source-path=}'[specify path when looking for sourced files]:_files -/' \ {-P,--source-path=}'[specify path when looking for sourced files]:path:_files -/' \
{-s,--shell=}'[specify dialect]:dialect:(sh bash dash ksh busybox)' \ {-s,--shell=}'[specify dialect]:dialect:(sh bash dash ksh busybox)' \
{-S,--severity=}'[specify minimum severity of errors to consider]:severity:(error warning info style)' \ {-S,--severity=}'[specify minimum severity of errors to consider]:severity:(error warning info style)' \
{-V,--version}'[print version information]' \ {-V,--version}'[print version information]' \

View File

@ -425,7 +425,7 @@ _sox_ng_supported_formats() {
local -a formats=( local -a formats=(
'raw:Raw audio files' 'raw:Raw audio files'
'3gp:Third Generation Partnership Project format' '3gp:Third Generation Partnership Project format'
'3g2:Third Generation Partnership Project 2 format'. '3g2:Third Generation Partnership Project 2 format'
'8svx:Amiga 8SVX musical instrument description format' '8svx:Amiga 8SVX musical instrument description format'
'aac:Advanced Audio Coding format' 'aac:Advanced Audio Coding format'
'ac3:Audio Codec 3 (Dolby Digital) format' 'ac3:Audio Codec 3 (Dolby Digital) format'

View File

@ -53,7 +53,7 @@ _subliminal() {
'(-e --encoding)'{-e,--encoding}'[Subtitle file encoding]:encoding' \ '(-e --encoding)'{-e,--encoding}'[Subtitle file encoding]:encoding' \
'(-s --single)'{-s,--single}'[Save subtitle without language code in the file name]' \ '(-s --single)'{-s,--single}'[Save subtitle without language code in the file name]' \
'(-f --force)'{-f,--force}'[Force download even if a subtitle already exist]' \ '(-f --force)'{-f,--force}'[Force download even if a subtitle already exist]' \
'(-hi,--hearing-impaired)'{-hi,--hearing-impaired}'[Prefer hearing impaired subtitles]' \ '(-hi --hearing-impaired)'{-hi,--hearing-impaired}'[Prefer hearing impaired subtitles]' \
'(-m --min-score)'{-m,--min-score}'[Minimum score for a subtitle to be downloaded]:integer range:' \ '(-m --min-score)'{-m,--min-score}'[Minimum score for a subtitle to be downloaded]:integer range:' \
'(-w --max-worked)'{-w,--max-workers}'[Maximum number of threads to use]:integer range:' \ '(-w --max-worked)'{-w,--max-workers}'[Maximum number of threads to use]:integer range:' \
'(-z --archives -Z --no-archives)'{-z,--archives}'[Scan archives for videos]' \ '(-z --archives -Z --no-archives)'{-z,--archives}'[Scan archives for videos]' \

View File

@ -46,7 +46,7 @@ _supervisorctl() {
_arguments -C \ _arguments -C \
{--configuration,-c}='[configuration file path (default /etc/supervisor.conf)]:filename:_files' \ {--configuration,-c}='[configuration file path (default /etc/supervisor.conf)]:filename:_files' \
'(- *)'{--help,-h}'[print usage message and exit]:' \ '(- *)'{--help,-h}'[print usage message and exit]' \
{--interactive,-i}'[start an interactive shell after executing commands]' \ {--interactive,-i}'[start an interactive shell after executing commands]' \
{--serverurl,-s}='[URL on which supervisord server is listening (default "http://localhost:9001")]:url:_urls' \ {--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' \ {--username,-u}='[username to use for authentication with server]:username:_users' \
@ -206,7 +206,7 @@ _supervisorctl_collect_procs() {
| awk "/$pattern/"'{n=$1;gsub(":","\\:",n); printf "%s\n%s\\:\n",n,substr($1,1,index($1,":")-1)}' \ | awk "/$pattern/"'{n=$1;gsub(":","\\:",n); printf "%s\n%s\\:\n",n,substr($1,1,index($1,":")-1)}' \
| uniq)"}) | uniq)"})
procs+=(all) procs+=(all)
_describe 'stooped processes or groups' procs _describe 'stoped processes or groups' procs
} }
(( $+functions[_supervisorctl_groups] )) || (( $+functions[_supervisorctl_groups] )) ||
@ -242,7 +242,7 @@ case $service in
'(-i --identifier)'{-i,--identifier}'[identifier used for this instance of supervisord]:id' \ '(-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 -/' \ '(-q --childlogdir)'{-q,--childlogdir}'[the log directory for child process logs]:log dir:_files -/' \
'(-k --nocleanup)'{-k,--nocleanup}'[prevent the process from performing cleanup]' \ '(-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' \ '(-a --minfds)'{-a,--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]' \ '(-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' '--profile_options[profile options]:profile option:_values -s , "field" cumulative calls callers'
;; ;;

View File

@ -47,7 +47,7 @@ _svm() {
'-c[show the currently use scala version]' \ '-c[show the currently use scala version]' \
"-l[show the scala version installed in svm_path(default is ${HOME}/.svm)]" \ "-l[show the scala version installed in svm_path(default is ${HOME}/.svm)]" \
'-v[show the available scala version not installed]' \ '-v[show the available scala version not installed]' \
'-i[install specific scala version]: :_svm_completion_not_installed_scala_versions' \ '-i[install specific scala version]: :_svm_not_installed_scala_versions' \
'-r[uninstall specific scala version and remove their sources]: :_svm_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' \ '(-s -u)'{-s,-u}'[setup to use a specific scala version]: :_svm_not_selected_scala_versions' \
'1: :_svm_commands' \ '1: :_svm_commands' \

View File

@ -39,15 +39,15 @@ local -a format=(txt html rtf rtfd doc docx wordml odt webarchive)
_arguments -S \ _arguments -S \
'-help[Show the usage information for the command and exit]' \ '-help[Show the usage information for the command and exit]' \
'-info[Display information about the specified files]' \ '-info[Display information about the specified files]' \
'-convert[Convert the specified files to the indicated format and write]:format:(($format))' \ '-convert[Convert the specified files to the indicated format and write]:format:($format)' \
'-cat[Read the specified files, concatenate them in the indicated format]:format:(($format))' \ '-cat[Read the specified files, concatenate them in the indicated format]:format:($format)' \
'-extension[Specify an extension to be used for output files]:ext' \ '-extension[Specify an extension to be used for output files]:ext' \
'-output[Specify the file name to be used for the first output file]:path:_files' \ '-output[Specify the file name to be used for the first output file]:path:_files' \
'-stdin[Specify that input should be read from stdin rather than from files]' \ '-stdin[Specify that input should be read from stdin rather than from files]' \
'-stdout[Specify that the first output file should go to stdout]' \ '-stdout[Specify that the first output file should go to stdout]' \
'-encoding[Specify the encoding to be used for plain text or HTML output files]:name' \ '-encoding[Specify the encoding to be used for plain text or HTML output files]:name' \
'-inputencoding[Force all plain text input files to be interpreted using the specified encoding]' \ '-inputencoding[Force all plain text input files to be interpreted using the specified encoding]' \
'-format[Force all input files to be interpreted using the indicated format]:format:(($format))' \ '-format[Force all input files to be interpreted using the indicated format]:format:($format)' \
'-font[Specify the name of the font to be used for converting plain to rich text]:font' \ '-font[Specify the name of the font to be used for converting plain to rich text]:font' \
'-fontsize[Specify the size in points of the font to be used for converting plain to rich text]:size' \ '-fontsize[Specify the size in points of the font to be used for converting plain to rich text]:size' \
'-noload[Do not load subsidiary resources]' \ '-noload[Do not load subsidiary resources]' \

View File

@ -40,8 +40,7 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_tmuxp() { _tmuxp() {
local curcontext="$curcontext" state line ret=1
local curcontext="$curcontext" state line
typeset -A opt_args typeset -A opt_args
_arguments -C \ _arguments -C \
@ -49,81 +48,87 @@ _tmuxp() {
"*::options:->options" \ "*::options:->options" \
"--log-level[log level(default info)]: :(debug info warning error critical)" \ "--log-level[log level(default info)]: :(debug info warning error critical)" \
'(- *)'{-h,--help}'[display usage information]' \ '(- *)'{-h,--help}'[display usage information]' \
'(- *)'{-V,--version}'[show version number and exit]' '(- *)'{-V,--version}'[show version number and exit]' \
&& ret=0
case $state in case $state in
(command) (command)
local -a subcommands local -a subcommands=(
subcommands=( 'load:Load tmuxp workspaces'
'load:Load tmuxp workspaces' 'shell:launch python shell for tmux server, session, window and pane'
'shell:launch python shell for tmux server, session, window and pane' 'import:Import a teamocil/tmuxinator config'
'import:Import a teamocil/tmuxinator config' 'convert:Convert a tmuxp config between JSON and YAML'
'convert:Convert a tmuxp config between JSON and YAML' 'debug-info:print out all diagnostic info'
'debug-info:print out all diagnostic info' 'ls:list sessions in config directory'
'ls:list sessions in config directory' 'edit: run $EDITOR on config'
'edit: run $EDITOR on config' 'freeze:Snapshot a session into a config'
'freeze:Snapshot a session into a config' )
) _describe -t commands 'commands' subcommands && ret=0
_describe -t commands 'commands' subcommands ;;
;; (options)
(options) case $line[1] in
case $line[1] in (load)
(load) __tmuxp_load && ret=0
__tmuxp_load ;;
;; (import)
(import) __tmuxp_import && ret=0
__tmuxp_import ;;
;; (freeze)
(freeze) local sessions="$(__tmux_sessions)"
local sessions="$(__tmux_sessions)" _arguments \
_arguments -C \ '(- *)'{-h,--help}'[show help message and exit]' \
'(- *)'{-h,--help}'[show help message and exit]' \ '-S[pass-through for tmux -S]: :_files' \
'-S[pass-through for tmux -S]: :_files' \ '-L[pass-through for tmux -L]: :' \
'-L[pass-through for tmux -L]: :' \ '(-f --config-format)'{-f,--config-format}'[format to save in]: :(yaml json)' \
'(-f --config-format)'{-f,--config-format}'[format to save in]: :(yaml json)' \ '(-o --save-to)'{-o,--save-to}'[file to save to]: :_files' \
'(-o --save-to)'{-o,--save-to}'[file to save to]: :_files' \ '(-y --yes)'{-y,--yes}'[always answer yes]' \
'(-y --yes)'{-y,--yes}'[always answer yes]' \ '(-q --quiet)'{-q,--quiet}"[don't prompt for confirmation]" \
'(-q --quiet)'{-q,--quiet}"[don't prompt for confirmation]" \ '--force[overwrite the config file]'\
'--force[overwrite the config file]'\ "1::session name:compadd $sessions" \
"1::session name:compadd $sessions" && ret=0
;; ;;
(convert) (convert)
_arguments -C \ _arguments \
'1:: :_files -g "*.(json|yaml|yml)"' '1:: :_files -g "*.(json|yaml|yml)"' \
;; && ret=0
(shell) ;;
local sessions="$(__tmux_sessions)" (shell)
local windows="$(__tmux_windows)" local sessions="$(__tmux_sessions)"
_arguments -C \ local windows="$(__tmux_windows)"
'(- *)'{-h,--help}'[show help message and exit]' \ _arguments \
'-S[pass-through for tmux -S]: :_files' \ '(- *)'{-h,--help}'[show help message and exit]' \
'-L[pass-through for tmux -L]: :' \ '-S[pass-through for tmux -S]: :_files' \
'--best[use best shell available in site packages]' \ '-L[pass-through for tmux -L]: :' \
'--pdb[use plain pdb]' \ '--best[use best shell available in site packages]' \
"--code[use stdlib's code.interact()]" \ '--pdb[use plain pdb]' \
'--ptipython[use ptpython + ipython]' \ "--code[use stdlib's code.interact()]" \
'--ptpython[use ptpython]' \ '--ptipython[use ptpython + ipython]' \
'--ipython[use ipython]' \ '--ptpython[use ptpython]' \
'--bpython[use bpython]' \ '--ipython[use ipython]' \
(--no-startup)'--use-pythonrc[load PYTHONSTARTUP env var and ~/.pythonrc.py script in --code]' \ '--bpython[use bpython]' \
(--use-pythonrc)'--no-startup[do not load PYTHONSTARTUP env var and ~/.pythonrc.py script in --code]' \ '(--no-startup --use-pythonrc)--use-pythonrc[load PYTHONSTARTUP env var and ~/.pythonrc.py script in --code]' \
(--no-vi-mode)'--use-vi-mode[use vi-mode in ptpython/ptipython]' \ '(--no-startup --use-pythonrc)--no-startup[do not load PYTHONSTARTUP env var and ~/.pythonrc.py script in --code]' \
(--vi-mode)'--no-vi-mode[do not use vi-mode in ptpython/ptipython]' \ '(--use-vi-mode --no-vi-mode)--use-vi-mode[use vi-mode in ptpython/ptipython]' \
"1::session name:compadd $sessions" \ '(--use-vi-mode --no-vi-mode)--no-vi-mode[do not use vi-mode in ptpython/ptipython]' \
"2::window name:compadd $windows" "1::session name:compadd $sessions" \
;; "2::window name:compadd $windows" \
(ls|debug-info) && ret=0
_arguments -C \ ;;
'(- *)'{-h,--help}'[show help message and exit]' (ls|debug-info)
;; _arguments \
(edit) '(- *)'{-h,--help}'[show help message and exit]' \
_arguments -C \ && ret=0
'(- *)'{-h,--help}'[show help message and exit]' \ ;;
'1:: :_files -g "*.(json|yaml|yml)"' (edit)
;; _arguments \
esac '(- *)'{-h,--help}'[show help message and exit]' \
esac '1:: :_files -g "*.(json|yaml|yml)"' \
&& ret=0
;;
esac
esac
return ret
} }
__tmuxp_load() { __tmuxp_load() {
@ -188,7 +193,6 @@ __tmux_windows () {
_tmuxp "$@" _tmuxp "$@"
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script
# sh-indentation: 2 # sh-indentation: 2

View File

@ -70,14 +70,14 @@ _tox() {
(run|run-parallel|depends|exec|list|quickstart|schema|config|devenv) (run|run-parallel|depends|exec|list|quickstart|schema|config|devenv)
options+=( options+=(
'--result-json[write a JSON file with detailed information]:file:_files' '--result-json[write a JSON file with detailed information]:file:_files'
'--hashseed[set PYTHONHASHSEED to the specified seed before running commands]:sed' '--hashseed[set PYTHONHASHSEED to the specified seed before running commands]:seed'
'--discover[for Python discovery first try these Python executables]:file:_files' '--discover[for Python discovery first try these Python executables]:file:_files'
'(--list-dependencies --no-list-dependencies)--list-dependencies[list the dependencies installed during environment setup]' '(--list-dependencies --no-list-dependencies)--list-dependencies[list the dependencies installed during environment setup]'
'(--list-dependencies --no-list-dependencies)--no-list-dependencies[never list the dependencies]' '(--list-dependencies --no-list-dependencies)--no-list-dependencies[never list the dependencies]'
'--develop[install package in development mode]' '--develop[install package in development mode]'
) )
;| ;|
(run|run-parallel|direnv) (run|run-parallel|devenv)
options+=( options+=(
'-m[label to evaluate]:label' '-m[label to evaluate]:label'
'-f[factor to evaluate]:factor' '-f[factor to evaluate]:factor'
@ -136,7 +136,7 @@ _tox_commands() {
'depends:visualize tox environment dependencies' 'depends:visualize tox environment dependencies'
'list:list environment' 'list:list environment'
'devenv:set up a development environment at ENVDIR' 'devenv:set up a development environment at ENVDIR'
'schema:ganerate schema for tox configuration' 'schema:generate schema for tox configuration'
'config:show tox configuration' 'config:show tox configuration'
'quickstart:quickly create a tox config file for a Python project' 'quickstart:quickly create a tox config file for a Python project'
'exec:execute an arbitrary command within a tox environment' 'exec:execute an arbitrary command within a tox environment'

View File

@ -34,9 +34,12 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
typeset -A opt_args
local context state line
local -a module_types=( local -a module_types=(
none commonjs amd umd system es6/es2015 es2020 es2022 esnext node16 node18 nodenext preserve none commonjs amd umd system es6/es2015 es2020 es2022 esnext node16 node18 nodenext preserve
) )
local -a bundle_libraries=( local -a bundle_libraries=(
es5 es6/es2015 es7/es2016 es2017 es2018 es2019 es2020 es2021 es2022 es5 es6/es2015 es7/es2016 es2017 es2018 es2019 es2020 es2021 es2022
@ -168,7 +171,7 @@ local -a opts=(
'--plugins[Specify a list of language service plugins to include]:plugins' '--plugins[Specify a list of language service plugins to include]:plugins'
'--emitDecoratorMetadata[Emit design-type metadata for decorated declarations in source files]' '--emitDecoratorMetadata[Emit design-type metadata for decorated declarations in source files]'
'--experimentalDecorators[Enable experimental support for legacy experimental decorators]' '--experimentalDecorators[Enable experimental support for legacy experimental decorators]'
'--jsx[Specify what JSX code is generated]:type(preserve react react-native react-jsx react-jsxdev)' '--jsx[Specify what JSX code is generated]:type:(preserve react react-native react-jsx react-jsxdev)'
"--jsxFactory[Specify the JSX factory function used when targeting React JSX emit]:funcname" "--jsxFactory[Specify the JSX factory function used when targeting React JSX emit]:funcname"
"--jsxFragmentFactory[Specify the JSX Fragment reference used for fragments when targeting React JSX emit]:reference" "--jsxFragmentFactory[Specify the JSX Fragment reference used for fragments when targeting React JSX emit]:reference"
'--jsxImportSource[Specify module specifier used to import the JSX factory functions]' '--jsxImportSource[Specify module specifier used to import the JSX factory functions]'
@ -197,7 +200,7 @@ local -a opts=(
if (( $+opt_args[--build] )); then if (( $+opt_args[--build] )); then
opts+=( opts+=(
'(-v --verbose)'{-v,--verbose}"[Enable verbose logging]" '(-v --verbose)'{-v,--verbose}"[Enable verbose logging]"
'(-d --dry)'{-d,--dry}'[Show what would be built]' '--dry[Show what would be built]'
'(-f --force)'{-f,--force}'[Build all projects, including those that appear to be up to date]' '(-f --force)'{-f,--force}'[Build all projects, including those that appear to be up to date]'
'--clean[Delete the outputs of all projects]' '--clean[Delete the outputs of all projects]'
'--stopBuildOnErrors[Skip building downstream projects on error in upstream project]' '--stopBuildOnErrors[Skip building downstream projects on error in upstream project]'
@ -208,7 +211,7 @@ else
) )
fi fi
_arguments $opts && return 0 _arguments -C $opts && return 0
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -42,7 +42,7 @@ _ufw_logging() {
local params additional second local params additional second
second=$words[2] second=$words[2]
if [ ! -z $second ]; then if [[ ! -z "$second" ]]; then
return return
fi fi
@ -58,7 +58,7 @@ _ufw_delete() {
second=$words[2] second=$words[2]
if [ ! -z $second ]; then if [[ ! -z "$second" ]]; then
return return
fi fi
@ -89,14 +89,6 @@ _ufw_app() {
return ret return ret
} }
(( $+functions[_flutter_pub_token_subcommand] )) ||
_flutter_pub_token_subcommand() {
local -a subcommands=(
)
_describe -t subcommands 'subcommand' subcommands "$@"
}
_ufw() { _ufw() {
local curcontext="$curcontext" ret=1 local curcontext="$curcontext" ret=1
local -a state line commands local -a state line commands

View File

@ -45,7 +45,7 @@ _arguments \
'(-q --quiet)'{-q,--quiet}'[suppress some failure messages]' \ '(-q --quiet)'{-q,--quiet}'[suppress some failure messages]' \
'(-r --random)'{-r,--random}'[connect to running uuid daemon and request to return a random-based UUID]' \ '(-r --random)'{-r,--random}'[connect to running uuid daemon and request to return a random-based UUID]' \
'(-S --socket-activation -s --socket)'{-S,--socket-activation}'[do not create a socket]' \ '(-S --socket-activation -s --socket)'{-S,--socket-activation}'[do not create a socket]' \
'(-S --socket-activation -s --socket)'{-s,--socket}'[make uuidd use this path name for the unix-domain socket]:sokect:_files' \ '(-S --socket-activation -s --socket)'{-s,--socket}'[make uuidd use this path name for the unix-domain socket]:socket:_files' \
'(-T --timeout)'{-T,--timeout}'[make uuidd exit after number seconds of inactivity]:seconds' \ '(-T --timeout)'{-T,--timeout}'[make uuidd exit after number seconds of inactivity]:seconds' \
'(-t --time)'{-t,--time}'[connect to running uuid daemon and request to return a time-based UUID]' \ '(-t --time)'{-t,--time}'[connect to running uuid daemon and request to return a time-based UUID]' \
'(- *)'{-h,--help}'[display help text and exit]' \ '(- *)'{-h,--help}'[display help text and exit]' \

View File

@ -66,11 +66,11 @@ case $OSTYPE in
'(-r --random)'{-r,--random}'[generate random-based uuid]' \ '(-r --random)'{-r,--random}'[generate random-based uuid]' \
'(-t --time)'{-t,--time}'[generate time-based uuid]' \ '(-t --time)'{-t,--time}'[generate time-based uuid]' \
'(-n --namespace)'{-n,--namespace}'[generate hash-based uuid in this namespace]:namespace:(@dns @url @oid @x500)' \ '(-n --namespace)'{-n,--namespace}'[generate hash-based uuid in this namespace]:namespace:(@dns @url @oid @x500)' \
'(-N --name)'{-n,--name}'[generate hash-based uuid from this name]:name' \ '(-N --name)'{-N,--name}'[generate hash-based uuid from this name]:name' \
'(-C --count -s --sha1 -m --md5)'{-m,--md5}'[generate md5 hash]' \ '(-C --count -s --sha1 -m --md5)'{-m,--md5}'[generate md5 hash]' \
'(-C --count -s --sha1 -m --md5)'{-C,--count}'[generate more uuids in loop]:count' \ '(-C --count -s --sha1 -m --md5)'{-C,--count}'[generate more uuids in loop]:count' \
'(-C --count -s --sha1 -m --md5)'{-s,--sha1}'[generate sha1 hash]' \ '(-C --count -s --sha1 -m --md5)'{-s,--sha1}'[generate sha1 hash]' \
'(-x --hex)'{-h,--hex}'[interpret name as hex string]' '(-x --hex)'{-x,--hex}'[interpret name as hex string]'
;; ;;
esac esac

View File

@ -40,7 +40,7 @@ _arguments \
'(-g --group -p --passwd)'{-p,--passwd}'[edit passwd database]' \ '(-g --group -p --passwd)'{-p,--passwd}'[edit passwd database]' \
'(-q --quiet)'{-q,--quiet}'[quiet mode]' \ '(-q --quiet)'{-q,--quiet}'[quiet mode]' \
'(-R --root)'{-R,--root}'[apply changes in the given directory]:dir:_files -/' \ '(-R --root)'{-R,--root}'[apply changes in the given directory]:dir:_files -/' \
'(-s --shadow)'{-s,--shadow}'[eedit shadow or gshadow database]' '(-s --shadow)'{-s,--shadow}'[edit shadow or gshadow database]'
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -481,17 +481,17 @@ _vboxmanage_cloud_list() {
case $state in case $state in
(arg) (arg)
local -a state local -a instance_states
if [[ $words[1] == "instances" ]]; then if [[ $words[1] == "instances" ]]; then
state=(running paused terminated) instance_states=(running paused terminated)
else else
state=(available disabled deleted) instance_states=(available disabled deleted)
fi fi
_arguments \ _arguments \
'--provider=[Short cloud provider name]:provider' \ '--provider=[Short cloud provider name]:provider' \
'--profile=[Cloud profile name]:profile' \ '--profile=[Cloud profile name]:profile' \
'--state=[The state of cloud instance]: :'"($state)" \ '--state=[The state of cloud instance]: :'"($instance_states)" \
'--compartment-id[A compartment is the logical container used]' '--compartment-id[A compartment is the logical container used]'
;; ;;
esac esac
@ -1058,7 +1058,7 @@ _vboxmanage_guestcontrol() {
'--recursive[Recursively removes directories from the specified from the guest VM]' \ '--recursive[Recursively removes directories from the specified from the guest VM]' \
&& ret=0 && ret=0
;; ;;
(rmdir) (rm)
_arguments \ _arguments \
'--quiet[Specifies that the command produce quieter output]' \ '--quiet[Specifies that the command produce quieter output]' \
'--verbose[Specifies that the command produce more detailed output]' \ '--verbose[Specifies that the command produce more detailed output]' \
@ -1102,7 +1102,8 @@ _vboxmanage_guestcontrol() {
'--wait-ready[Waits for the current Guest Additions being ready to handle the Guest Additions update]' \ '--wait-ready[Waits for the current Guest Additions being ready to handle the Guest Additions update]' \
'--wait-start[Starts the VBoxManage update process on the guest VM and then waits for the Guest Additions update]' \ '--wait-start[Starts the VBoxManage update process on the guest VM and then waits for the Guest Additions update]' \
&& ret=0 && ret=0
(start|start) ;;
(run|start)
_arguments \ _arguments \
'--quiet[Specifies that the command produce quieter output]' \ '--quiet[Specifies that the command produce quieter output]' \
'--verbose[Specifies that the command produce more detailed output]' \ '--verbose[Specifies that the command produce more detailed output]' \
@ -1533,7 +1534,7 @@ _vboxmanage_modifynvram() {
'--owner-uuid=[The UUID identifying the owner of the variable to delete]:uuid' \ '--owner-uuid=[The UUID identifying the owner of the variable to delete]:uuid' \
&& ret=0 && ret=0
;; ;;
(queryvar) (changevar)
_arguments \ _arguments \
'--name=[UEFI variable name to change the data for]:name' \ '--name=[UEFI variable name to change the data for]:name' \
'--filename=[The file to read the data from]: :_files' \ '--filename=[The file to read the data from]: :_files' \

View File

@ -41,7 +41,7 @@
local curcontext="$curcontext" state state_descr line ret=1 local curcontext="$curcontext" state state_descr line ret=1
typeset -A opt_args typeset -A opt_args
local period="-d --days -h --hours -m --months -w --weeks" local period="-d --days -h --hours -m --months -w --weeks -y --years -5 --fiveminutes"
_arguments -C : \ _arguments -C : \
'--95th[show 95th percentile output for the ongoing month]' \ '--95th[show 95th percentile output for the ongoing month]' \

View File

@ -320,7 +320,7 @@ _yarn_subcommands() {
'search:open the search interface' 'search:open the search interface'
'upgrade-interactive:open the upgrade interface' 'upgrade-interactive:open the upgrade interface'
'plugin:plugin related commands' 'plugin:plugin related commands'
'version:version relarelated commands' 'version:version related commands'
'workspace:workspace related commands' 'workspace:workspace related commands'
'workspaces:command for workspaces' 'workspaces:command for workspaces'
) )
@ -731,6 +731,7 @@ _yarn_version() {
(( $+functions[_yarn_workspace] )) || (( $+functions[_yarn_workspace] )) ||
_yarn_workspace() { _yarn_workspace() {
local ret=1
local package_json=$(_yarn_package_json_path) local package_json=$(_yarn_package_json_path)
local package_dir=$(dirname $package_json) local package_dir=$(dirname $package_json)
@ -798,7 +799,7 @@ _yarn_workspaces() {
_arguments \ _arguments \
'(- *)'{-h,--help}'[show help message and exit]' \ '(- *)'{-h,--help}'[show help message and exit]' \
'--since[only include workspaces that have been changed since the specified ref]' \ '--since[only include workspaces that have been changed since the specified ref]' \
'(-R,--recursive)'{-R,--recursive}'[find packages via dependencies/devDependencies]' \ '(-R --recursive)'{-R,--recursive}'[find packages via dependencies/devDependencies]' \
'--no-private[exclude workspaces that have the private field set to true]' \ '--no-private[exclude workspaces that have the private field set to true]' \
'(-v --verbose)'{-v,--verbose}'[also return the cross-dependencies between workspaces]' \ '(-v --verbose)'{-v,--verbose}'[also return the cross-dependencies between workspaces]' \
'--json[format the output as an NDJSON stream]' \ '--json[format the output as an NDJSON stream]' \