From 6621b9fa2fd847e98ec424e308d15dcab917c47e Mon Sep 17 00:00:00 2001 From: Mumumu <30195921+Mumumu4@users.noreply.github.com> Date: Tue, 25 Jun 2024 20:13:44 +0800 Subject: [PATCH] Update nftables completion add completion for set/map name in `nft add/delete element [family] table ` --- src/_nftables | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/_nftables b/src/_nftables index c891ead..56f5a45 100644 --- a/src/_nftables +++ b/src/_nftables @@ -242,8 +242,12 @@ while true;do descriptors=(": : _nft_object $cmd_fam $cmd_tab $cmd_obj false") nextstate="start" ;; + (add-element | delete-element) + cmd_tab=$line[1] + descriptors=(": : _nft_object $cmd_fam $cmd_tab '\(map\|set\)' false") + nextstate="start" + ;; #TODO: - #(add-element | delete-element) #(add-set | add-map) #(add-flowtable) #("add-ct\ helper")