From ecd02cf5baaa918225a0493f45e7e4eee15e128b Mon Sep 17 00:00:00 2001 From: Markus Richter <8398165+mqus@users.noreply.github.com> Date: Mon, 5 Nov 2018 14:53:29 +0100 Subject: [PATCH] renamed file, documented some more functions --- src/{_nft => _nftables} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename src/{_nft => _nftables} (98%) diff --git a/src/_nft b/src/_nftables similarity index 98% rename from src/_nft rename to src/_nftables index 7ddf8e1..a350e00 100644 --- a/src/_nft +++ b/src/_nftables @@ -415,6 +415,7 @@ _nft_families(){ } _nft_table(){ + # complete the names of tables and the families of existing tables #$1 can be: all all-handle -handle local tables=() if [[ "$1" =~ "^all" ]]; then @@ -437,6 +438,7 @@ _nft_table(){ } _nft_table_handle(){ + # complete the handles of tables (with the table name in the description) local tables=( ${(f)"$(_call_program -p tables nft list ruleset -a 2>/dev/null \ | grep '^table' | sed 's/table // ;s/{ # handle // ;s/\(\S*\) \(\S*\) \(\S*\)/\3:\2(type \1)/' )"} ) _describe -t tables "table handle" tables "${expl[@]}" @@ -477,5 +479,5 @@ _nft_rule_handle(){ _describe -t rules "rule" rules -V "rules" "${expl[@]}" } - +#currently, only the `nft` command is covered by this script. _nft "$@"