Compare commits

..

1 Commits

Author SHA1 Message Date
F.B. 044b8788e4
Merge 5359bbf0e7 into 28c5bdcaf8 2026-03-10 01:16:06 +08:00
24 changed files with 1016 additions and 1062 deletions

View File

@ -69,10 +69,3 @@ 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

View File

@ -87,11 +87,3 @@ 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

View File

@ -84,7 +84,7 @@ local -a cmake_build_options=(
'-L-[List cache variables]::_values "options" "[non-advanced cache variables]" "A[advanced cache variables]" "H[non-advanced cached variables with help]" "AH[advanced cache variables with help]"'
'--fresh[Configure a fresh build tree, removing any existing cache file]'
'--build[Build a CMake-generated project binary tree]::project directory:_path_files -/'
'--build[Build a CMake-generated project binary tree]:project directory:_path_files -/'
'--install[Install a CMake-generated project binary tree]:project directory:_path_files -/'
'--open[Open generated project in the associated application]:project directory:_path_files -/'

View File

@ -40,7 +40,9 @@
#
# ------------------------------------------------------------------------------
_git-flow () {
_git-flow ()
{
local curcontext="$curcontext" state line
typeset -A opt_args
@ -50,6 +52,7 @@ _git-flow () {
case $state in
(command)
local -a subcommands
subcommands=(
'init:Initialize a new git repo with support for the branching model.'
@ -64,22 +67,28 @@ _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
;;
@ -89,7 +98,8 @@ _git-flow () {
esac
}
__git-flow-release () {
__git-flow-release ()
{
local curcontext="$curcontext" state line
typeset -A opt_args
@ -99,6 +109,7 @@ __git-flow-release () {
case $state in
(command)
local -a subcommands
subcommands=(
'start:Start a new release branch.'
@ -114,11 +125,13 @@ __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]' \
@ -130,14 +143,19 @@ __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]'
@ -147,7 +165,8 @@ __git-flow-release () {
esac
}
__git-flow-hotfix () {
__git-flow-hotfix ()
{
local curcontext="$curcontext" state line
typeset -A opt_args
@ -157,6 +176,7 @@ __git-flow-hotfix () {
case $state in
(command)
local -a subcommands
subcommands=(
'start:Start a new hotfix branch.'
@ -171,6 +191,7 @@ __git-flow-hotfix () {
(options)
case $line[1] in
(start)
_arguments \
-F'[Fetch from origin before performing finish]'\
@ -202,7 +223,8 @@ __git-flow-hotfix () {
esac
}
__git-flow-feature () {
__git-flow-feature ()
{
local curcontext="$curcontext" state line
typeset -A opt_args
@ -212,6 +234,7 @@ __git-flow-feature () {
case $state in
(command)
local -a subcommands
subcommands=(
'start:Start a new feature branch.'
@ -231,6 +254,7 @@ __git-flow-feature () {
(options)
case $line[1] in
(start)
_arguments \
-F'[Fetch from origin before performing finish]'\
@ -288,7 +312,8 @@ __git-flow-feature () {
esac
}
__git-flow-support () {
__git-flow-support ()
{
local curcontext="$curcontext" state line
typeset -A opt_args
@ -328,7 +353,8 @@ __git-flow-support () {
esac
}
__git_flow_version_list () {
__git_flow_version_list ()
{
local expl
declare -a versions
@ -338,7 +364,8 @@ __git_flow_version_list () {
_wanted versions expl 'version' compadd $versions
}
__git_flow_feature_list () {
__git_flow_feature_list ()
{
local expl
declare -a features
@ -365,7 +392,8 @@ __git_remotes () {
fi
}
__git_flow_hotfix_list () {
__git_flow_hotfix_list ()
{
local expl
declare -a hotfixes
@ -375,7 +403,8 @@ __git_flow_hotfix_list () {
_wanted hotfixes expl 'hotfix' compadd $hotfixes
}
__git_flow_support_list () {
__git_flow_support_list ()
{
local expl
declare -a support
@ -385,6 +414,7 @@ __git_flow_support_list () {
_wanted hotfixes expl 'support' compadd $support
}
__git_branch_names () {
local expl
declare -a branch_names

View File

@ -13,16 +13,7 @@
#
# ------------------------------------------------------------------------------
_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

View File

@ -284,11 +284,3 @@ 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

View File

@ -84,11 +84,3 @@ _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

View File

@ -154,11 +154,3 @@ 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

View File

@ -126,7 +126,8 @@ _1st_arguments=(
'--version:Prints the Elixir version information'
)
__task_list () {
__task_list ()
{
local expl
declare -a tasks
@ -210,6 +211,7 @@ __task_list () {
}
local expl
local curcontext="$curcontext" state line
typeset -A opt_args
@ -220,23 +222,19 @@ _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

View File

@ -106,11 +106,3 @@ _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

View File

@ -144,11 +144,3 @@ 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

View File

@ -12,23 +12,22 @@
# * 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'
)
@ -285,7 +284,6 @@ _nft_subcommands(){
)
_describe -t commands 'nft subcommand' commands "$@"
}
_nft_mon_filter(){
local monitor_filters=(
'new:show only events of created objects'

View File

@ -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:
# vim: ft=zsh sw=2 ts=2 et
# ex: sw=2 ts=2 et filetype=sh

View File

@ -23,11 +23,3 @@ 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