commit
ce3bdfed22
|
|
@ -69,3 +69,10 @@ esac
|
|||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -87,3 +87,11 @@ function _cask() {
|
|||
}
|
||||
|
||||
_cask "$@"
|
||||
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -40,9 +40,7 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_git-flow ()
|
||||
{
|
||||
_git-flow () {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
|
|
@ -52,7 +50,6 @@ _git-flow ()
|
|||
|
||||
case $state in
|
||||
(command)
|
||||
|
||||
local -a subcommands
|
||||
subcommands=(
|
||||
'init:Initialize a new git repo with support for the branching model.'
|
||||
|
|
@ -67,28 +64,22 @@ _git-flow ()
|
|||
|
||||
(options)
|
||||
case $line[1] in
|
||||
|
||||
(init)
|
||||
_arguments \
|
||||
-f'[Force setting of gitflow branches, even if already configured]' \
|
||||
-d'[Use default branch naming conventions and prefixes]'
|
||||
;;
|
||||
|
||||
(version)
|
||||
;;
|
||||
|
||||
(hotfix)
|
||||
__git-flow-hotfix
|
||||
;;
|
||||
|
||||
(release)
|
||||
__git-flow-release
|
||||
;;
|
||||
|
||||
(feature)
|
||||
__git-flow-feature
|
||||
;;
|
||||
|
||||
(support)
|
||||
__git-flow-support
|
||||
;;
|
||||
|
|
@ -98,8 +89,7 @@ _git-flow ()
|
|||
esac
|
||||
}
|
||||
|
||||
__git-flow-release ()
|
||||
{
|
||||
__git-flow-release () {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
|
|
@ -109,7 +99,6 @@ __git-flow-release ()
|
|||
|
||||
case $state in
|
||||
(command)
|
||||
|
||||
local -a subcommands
|
||||
subcommands=(
|
||||
'start:Start a new release branch.'
|
||||
|
|
@ -125,13 +114,11 @@ __git-flow-release ()
|
|||
|
||||
(options)
|
||||
case $line[1] in
|
||||
|
||||
(start)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]'\
|
||||
':version:__git_flow_version_list'
|
||||
;;
|
||||
|
||||
(finish)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]' \
|
||||
|
|
@ -143,19 +130,14 @@ __git-flow-release ()
|
|||
-k'[Keep branch after performing finish]'\
|
||||
':version:__git_flow_version_list'
|
||||
;;
|
||||
|
||||
(publish)
|
||||
_arguments \
|
||||
':version:__git_flow_version_list'
|
||||
;;
|
||||
|
||||
(track)
|
||||
_arguments \
|
||||
':version:__git_flow_version_list'
|
||||
;;
|
||||
|
||||
|
||||
|
||||
*)
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
|
|
@ -165,8 +147,7 @@ __git-flow-release ()
|
|||
esac
|
||||
}
|
||||
|
||||
__git-flow-hotfix ()
|
||||
{
|
||||
__git-flow-hotfix () {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
|
|
@ -176,7 +157,6 @@ __git-flow-hotfix ()
|
|||
|
||||
case $state in
|
||||
(command)
|
||||
|
||||
local -a subcommands
|
||||
subcommands=(
|
||||
'start:Start a new hotfix branch.'
|
||||
|
|
@ -191,7 +171,6 @@ __git-flow-hotfix ()
|
|||
|
||||
(options)
|
||||
case $line[1] in
|
||||
|
||||
(start)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]'\
|
||||
|
|
@ -223,8 +202,7 @@ __git-flow-hotfix ()
|
|||
esac
|
||||
}
|
||||
|
||||
__git-flow-feature ()
|
||||
{
|
||||
__git-flow-feature () {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
|
|
@ -234,7 +212,6 @@ __git-flow-feature ()
|
|||
|
||||
case $state in
|
||||
(command)
|
||||
|
||||
local -a subcommands
|
||||
subcommands=(
|
||||
'start:Start a new feature branch.'
|
||||
|
|
@ -254,7 +231,6 @@ __git-flow-feature ()
|
|||
|
||||
(options)
|
||||
case $line[1] in
|
||||
|
||||
(start)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]'\
|
||||
|
|
@ -312,8 +288,7 @@ __git-flow-feature ()
|
|||
esac
|
||||
}
|
||||
|
||||
__git-flow-support ()
|
||||
{
|
||||
__git-flow-support () {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
|
|
@ -353,8 +328,7 @@ __git-flow-support ()
|
|||
esac
|
||||
}
|
||||
|
||||
__git_flow_version_list ()
|
||||
{
|
||||
__git_flow_version_list () {
|
||||
local expl
|
||||
declare -a versions
|
||||
|
||||
|
|
@ -364,8 +338,7 @@ __git_flow_version_list ()
|
|||
_wanted versions expl 'version' compadd $versions
|
||||
}
|
||||
|
||||
__git_flow_feature_list ()
|
||||
{
|
||||
__git_flow_feature_list () {
|
||||
local expl
|
||||
declare -a features
|
||||
|
||||
|
|
@ -392,8 +365,7 @@ __git_remotes () {
|
|||
fi
|
||||
}
|
||||
|
||||
__git_flow_hotfix_list ()
|
||||
{
|
||||
__git_flow_hotfix_list () {
|
||||
local expl
|
||||
declare -a hotfixes
|
||||
|
||||
|
|
@ -403,8 +375,7 @@ __git_flow_hotfix_list ()
|
|||
_wanted hotfixes expl 'hotfix' compadd $hotfixes
|
||||
}
|
||||
|
||||
__git_flow_support_list ()
|
||||
{
|
||||
__git_flow_support_list () {
|
||||
local expl
|
||||
declare -a support
|
||||
|
||||
|
|
@ -414,7 +385,6 @@ __git_flow_support_list ()
|
|||
_wanted hotfixes expl 'support' compadd $support
|
||||
}
|
||||
|
||||
|
||||
__git_branch_names () {
|
||||
local expl
|
||||
declare -a branch_names
|
||||
|
|
|
|||
11
src/_hello
11
src/_hello
|
|
@ -13,7 +13,16 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments -s '(- *)'{-h,--help}'[display this help and exit]' \
|
||||
_arguments -s \
|
||||
'(- *)'{-h,--help}'[display this help and exit]' \
|
||||
'(- *)'{-v,--version}'[display version information and exit]' \
|
||||
{-t,--traditional}'[use traditional greeting]' \
|
||||
{-g,--greeting=}'[use TEXT as the greeting message]:TEXT'
|
||||
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -284,3 +284,11 @@ while (( $#state )); do
|
|||
done
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -84,3 +84,11 @@ _kitchen_instances() {
|
|||
}
|
||||
|
||||
_kitchen "$@"
|
||||
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -154,3 +154,11 @@ case $state in
|
|||
esac
|
||||
|
||||
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
|
||||
|
|
|
|||
16
src/_mix
16
src/_mix
|
|
@ -126,8 +126,7 @@ _1st_arguments=(
|
|||
'--version:Prints the Elixir version information'
|
||||
)
|
||||
|
||||
__task_list ()
|
||||
{
|
||||
__task_list () {
|
||||
local expl
|
||||
declare -a tasks
|
||||
|
||||
|
|
@ -211,7 +210,6 @@ __task_list ()
|
|||
}
|
||||
|
||||
local expl
|
||||
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
|
|
@ -222,19 +220,23 @@ _arguments -C \
|
|||
case $state in
|
||||
(command)
|
||||
_describe -t commands "mix subcommand" _1st_arguments
|
||||
return
|
||||
;;
|
||||
|
||||
(options)
|
||||
case $line[1] in
|
||||
(help)
|
||||
_arguments ':feature:__task_list'
|
||||
return
|
||||
;;
|
||||
(test|format|run)
|
||||
_arguments ':PATH:_files'
|
||||
return
|
||||
;;
|
||||
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
|
||||
|
|
|
|||
|
|
@ -106,3 +106,11 @@ _describe 'command' instances
|
|||
# Reference:
|
||||
# https://zsh.sourceforge.net/Doc/Release/Completion-System.html
|
||||
# https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org
|
||||
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -144,3 +144,11 @@ local options=(
|
|||
)
|
||||
|
||||
_arguments $options "*::func_name:($func_names)"
|
||||
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -12,22 +12,23 @@
|
|||
# * Markus Richter ( https://github.com/mqus , <mqus@disroot.org>)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_nft(){
|
||||
local -a rules states prev args families options descriptors
|
||||
local state="start" line nextstate cmd_obj cmd_subcmd cmd_fam cmd_tab cmd_chain #curcontext="$curcontext"
|
||||
|
||||
options=(
|
||||
'(-)'{-h,--help}'[show help]' \
|
||||
'(-)'{-v,--version}'[print version information]' \
|
||||
"(-i --interactive)"{-i,--interactive}'[read input from interactive CLI]: :->end' \
|
||||
"(-f --file)"{-f,--file}'[read input from <filename>]:nftables rule file:_files' \
|
||||
'(-c --check -n --numeric -N)'{-c,--check}"[check command's validity without actually applying the changes]" \
|
||||
'(-j --json)'{-j,--json}'[format output in json]' \
|
||||
'(-c --check -N)*'{-n,--numeric}'[can be specified up to 3 times, Shows 1:network addresses(default behaviour), 2:internet services (port numbers) and 3:protocols, user IDs, and group IDs numerically]' \
|
||||
'(-s --stateless)'{-s,--stateless}'[omit stateful information of ruleset]' \
|
||||
'(-N -n --numeric -c --check)'-N'[translate IP addresses to names]' \
|
||||
'(-a --handle)'{-a,--handle}'[output rule handle]' \
|
||||
'(-e --echo)'{-e,--echo}'[echo what has been added, inserted or replaced]' \
|
||||
'(-)'{-h,--help}'[show help]'
|
||||
'(-)'{-v,--version}'[print version information]'
|
||||
"(-i --interactive)"{-i,--interactive}'[read input from interactive CLI]: :->end'
|
||||
"(-f --file)"{-f,--file}'[read input from <filename>]:nftables rule file:_files'
|
||||
'(-c --check -n --numeric -N)'{-c,--check}"[check command's validity without actually applying the changes]"
|
||||
'(-j --json)'{-j,--json}'[format output in json]'
|
||||
'(-c --check -N)*'{-n,--numeric}'[can be specified up to 3 times, Shows 1:network addresses(default behaviour), 2:internet services (port numbers) and 3:protocols, user IDs, and group IDs numerically]'
|
||||
'(-s --stateless)'{-s,--stateless}'[omit stateful information of ruleset]'
|
||||
'(-N -n --numeric -c --check)'-N'[translate IP addresses to names]'
|
||||
'(-a --handle)'{-a,--handle}'[output rule handle]'
|
||||
'(-e --echo)'{-e,--echo}'[echo what has been added, inserted or replaced]'
|
||||
{-I,--includepath}'[add specified directory to the paths searched for include files]:include directory [/usr/share]:include directory:_directories'
|
||||
)
|
||||
|
||||
|
|
@ -284,6 +285,7 @@ _nft_subcommands(){
|
|||
)
|
||||
_describe -t commands 'nft subcommand' commands "$@"
|
||||
}
|
||||
|
||||
_nft_mon_filter(){
|
||||
local monitor_filters=(
|
||||
'new:show only events of created objects'
|
||||
|
|
|
|||
|
|
@ -121,10 +121,10 @@ _setcap_capabilities() {
|
|||
|
||||
_setcap "$@"
|
||||
|
||||
# Local variables:
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# ex: sw=2 ts=2 et filetype=sh
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
|
|||
|
|
@ -23,3 +23,11 @@ local modes=('up\:"bring a wireguard interface up"'\
|
|||
# 2: Complete interface with all .conf files in /etc/wireguard without the filename extension.
|
||||
_arguments "1:mode:((${modes}))"\
|
||||
'2:interface:_path_files -W /etc/wireguard -g "*.conf(^/:r)"'
|
||||
|
||||
# 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
|
||||
|
|
|
|||
Loading…
Reference in New Issue