Compare commits

..

No commits in common. "ce3bdfed22ef10a81eb9b3291a0050d4d92798f5" and "28c5bdcaf81bb89e56d0df8267d822c3b8aed9e0" have entirely different histories.

24 changed files with 1016 additions and 1062 deletions

View File

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

@ -87,11 +87,3 @@ function _cask() {
} }
_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]"' '-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]' '--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 -/' '--install[Install a CMake-generated project binary tree]:project directory:_path_files -/'
'--open[Open generated project in the associated application]: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 local curcontext="$curcontext" state line
typeset -A opt_args typeset -A opt_args
@ -50,6 +52,7 @@ _git-flow () {
case $state in case $state in
(command) (command)
local -a subcommands local -a subcommands
subcommands=( subcommands=(
'init:Initialize a new git repo with support for the branching model.' 'init:Initialize a new git repo with support for the branching model.'
@ -64,22 +67,28 @@ _git-flow () {
(options) (options)
case $line[1] in case $line[1] in
(init) (init)
_arguments \ _arguments \
-f'[Force setting of gitflow branches, even if already configured]' \ -f'[Force setting of gitflow branches, even if already configured]' \
-d'[Use default branch naming conventions and prefixes]' -d'[Use default branch naming conventions and prefixes]'
;; ;;
(version) (version)
;; ;;
(hotfix) (hotfix)
__git-flow-hotfix __git-flow-hotfix
;; ;;
(release) (release)
__git-flow-release __git-flow-release
;; ;;
(feature) (feature)
__git-flow-feature __git-flow-feature
;; ;;
(support) (support)
__git-flow-support __git-flow-support
;; ;;
@ -89,7 +98,8 @@ _git-flow () {
esac esac
} }
__git-flow-release () { __git-flow-release ()
{
local curcontext="$curcontext" state line local curcontext="$curcontext" state line
typeset -A opt_args typeset -A opt_args
@ -99,6 +109,7 @@ __git-flow-release () {
case $state in case $state in
(command) (command)
local -a subcommands local -a subcommands
subcommands=( subcommands=(
'start:Start a new release branch.' 'start:Start a new release branch.'
@ -114,11 +125,13 @@ __git-flow-release () {
(options) (options)
case $line[1] in case $line[1] in
(start) (start)
_arguments \ _arguments \
-F'[Fetch from origin before performing finish]'\ -F'[Fetch from origin before performing finish]'\
':version:__git_flow_version_list' ':version:__git_flow_version_list'
;; ;;
(finish) (finish)
_arguments \ _arguments \
-F'[Fetch from origin before performing finish]' \ -F'[Fetch from origin before performing finish]' \
@ -130,14 +143,19 @@ __git-flow-release () {
-k'[Keep branch after performing finish]'\ -k'[Keep branch after performing finish]'\
':version:__git_flow_version_list' ':version:__git_flow_version_list'
;; ;;
(publish) (publish)
_arguments \ _arguments \
':version:__git_flow_version_list' ':version:__git_flow_version_list'
;; ;;
(track) (track)
_arguments \ _arguments \
':version:__git_flow_version_list' ':version:__git_flow_version_list'
;; ;;
*) *)
_arguments \ _arguments \
-v'[Verbose (more) output]' -v'[Verbose (more) output]'
@ -147,7 +165,8 @@ __git-flow-release () {
esac esac
} }
__git-flow-hotfix () { __git-flow-hotfix ()
{
local curcontext="$curcontext" state line local curcontext="$curcontext" state line
typeset -A opt_args typeset -A opt_args
@ -157,6 +176,7 @@ __git-flow-hotfix () {
case $state in case $state in
(command) (command)
local -a subcommands local -a subcommands
subcommands=( subcommands=(
'start:Start a new hotfix branch.' 'start:Start a new hotfix branch.'
@ -171,6 +191,7 @@ __git-flow-hotfix () {
(options) (options)
case $line[1] in case $line[1] in
(start) (start)
_arguments \ _arguments \
-F'[Fetch from origin before performing finish]'\ -F'[Fetch from origin before performing finish]'\
@ -202,7 +223,8 @@ __git-flow-hotfix () {
esac esac
} }
__git-flow-feature () { __git-flow-feature ()
{
local curcontext="$curcontext" state line local curcontext="$curcontext" state line
typeset -A opt_args typeset -A opt_args
@ -212,6 +234,7 @@ __git-flow-feature () {
case $state in case $state in
(command) (command)
local -a subcommands local -a subcommands
subcommands=( subcommands=(
'start:Start a new feature branch.' 'start:Start a new feature branch.'
@ -231,6 +254,7 @@ __git-flow-feature () {
(options) (options)
case $line[1] in case $line[1] in
(start) (start)
_arguments \ _arguments \
-F'[Fetch from origin before performing finish]'\ -F'[Fetch from origin before performing finish]'\
@ -288,7 +312,8 @@ __git-flow-feature () {
esac esac
} }
__git-flow-support () { __git-flow-support ()
{
local curcontext="$curcontext" state line local curcontext="$curcontext" state line
typeset -A opt_args typeset -A opt_args
@ -328,7 +353,8 @@ __git-flow-support () {
esac esac
} }
__git_flow_version_list () { __git_flow_version_list ()
{
local expl local expl
declare -a versions declare -a versions
@ -338,7 +364,8 @@ __git_flow_version_list () {
_wanted versions expl 'version' compadd $versions _wanted versions expl 'version' compadd $versions
} }
__git_flow_feature_list () { __git_flow_feature_list ()
{
local expl local expl
declare -a features declare -a features
@ -365,7 +392,8 @@ __git_remotes () {
fi fi
} }
__git_flow_hotfix_list () { __git_flow_hotfix_list ()
{
local expl local expl
declare -a hotfixes declare -a hotfixes
@ -375,7 +403,8 @@ __git_flow_hotfix_list () {
_wanted hotfixes expl 'hotfix' compadd $hotfixes _wanted hotfixes expl 'hotfix' compadd $hotfixes
} }
__git_flow_support_list () { __git_flow_support_list ()
{
local expl local expl
declare -a support declare -a support
@ -385,6 +414,7 @@ __git_flow_support_list () {
_wanted hotfixes expl 'support' compadd $support _wanted hotfixes expl 'support' compadd $support
} }
__git_branch_names () { __git_branch_names () {
local expl local expl
declare -a branch_names declare -a branch_names

View File

@ -13,16 +13,7 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments -s \ _arguments -s '(- *)'{-h,--help}'[display this help and exit]' \
'(- *)'{-h,--help}'[display this help and exit]' \
'(- *)'{-v,--version}'[display version information and exit]' \ '(- *)'{-v,--version}'[display version information and exit]' \
{-t,--traditional}'[use traditional greeting]' \ {-t,--traditional}'[use traditional greeting]' \
{-g,--greeting=}'[use TEXT as the greeting message]:TEXT' {-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 done
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

@ -84,11 +84,3 @@ _kitchen_instances() {
} }
_kitchen "$@" _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 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

@ -126,7 +126,8 @@ _1st_arguments=(
'--version:Prints the Elixir version information' '--version:Prints the Elixir version information'
) )
__task_list () { __task_list ()
{
local expl local expl
declare -a tasks declare -a tasks
@ -210,6 +211,7 @@ __task_list () {
} }
local expl local expl
local curcontext="$curcontext" state line local curcontext="$curcontext" state line
typeset -A opt_args typeset -A opt_args
@ -220,23 +222,19 @@ _arguments -C \
case $state in case $state in
(command) (command)
_describe -t commands "mix subcommand" _1st_arguments _describe -t commands "mix subcommand" _1st_arguments
return
;; ;;
(options) (options)
case $line[1] in case $line[1] in
(help) (help)
_arguments ':feature:__task_list' _arguments ':feature:__task_list'
return
;; ;;
(test|format|run) (test|format|run)
_arguments ':PATH:_files' _arguments ':PATH:_files'
return
;; ;;
esac esac
;; ;;
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: # Reference:
# https://zsh.sourceforge.net/Doc/Release/Completion-System.html # https://zsh.sourceforge.net/Doc/Release/Completion-System.html
# https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org # 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)" _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>) # * Markus Richter ( https://github.com/mqus , <mqus@disroot.org>)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_nft(){ _nft(){
local -a rules states prev args families options descriptors 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" local state="start" line nextstate cmd_obj cmd_subcmd cmd_fam cmd_tab cmd_chain #curcontext="$curcontext"
options=( options=(
'(-)'{-h,--help}'[show help]' '(-)'{-h,--help}'[show help]' \
'(-)'{-v,--version}'[print version information]' '(-)'{-v,--version}'[print version information]' \
"(-i --interactive)"{-i,--interactive}'[read input from interactive CLI]: :->end' "(-i --interactive)"{-i,--interactive}'[read input from interactive CLI]: :->end' \
"(-f --file)"{-f,--file}'[read input from <filename>]:nftables rule file:_files' "(-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]" '(-c --check -n --numeric -N)'{-c,--check}"[check command's validity without actually applying the changes]" \
'(-j --json)'{-j,--json}'[format output in json]' '(-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]' '(-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]' '(-s --stateless)'{-s,--stateless}'[omit stateful information of ruleset]' \
'(-N -n --numeric -c --check)'-N'[translate IP addresses to names]' '(-N -n --numeric -c --check)'-N'[translate IP addresses to names]' \
'(-a --handle)'{-a,--handle}'[output rule handle]' '(-a --handle)'{-a,--handle}'[output rule handle]' \
'(-e --echo)'{-e,--echo}'[echo what has been added, inserted or replaced]' '(-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' {-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 "$@" _describe -t commands 'nft subcommand' commands "$@"
} }
_nft_mon_filter(){ _nft_mon_filter(){
local monitor_filters=( local monitor_filters=(
'new:show only events of created objects' 'new:show only events of created objects'

View File

@ -121,10 +121,10 @@ _setcap_capabilities() {
_setcap "$@" _setcap "$@"
# Local Variables: # Local variables:
# mode: Shell-Script # mode: Shell-Script
# sh-indentation: 2 # sh-indentation: 2
# indent-tabs-mode: nil # indent-tabs-mode: nil
# sh-basic-offset: 2 # sh-basic-offset: 2
# End: # 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. # 2: Complete interface with all .conf files in /etc/wireguard without the filename extension.
_arguments "1:mode:((${modes}))"\ _arguments "1:mode:((${modes}))"\
'2:interface:_path_files -W /etc/wireguard -g "*.conf(^/:r)"' '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