summaryrefslogtreecommitdiff
path: root/Completion/Linux/Command/_ipset
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Linux/Command/_ipset')
-rw-r--r--Completion/Linux/Command/_ipset23
1 files changed, 8 insertions, 15 deletions
diff --git a/Completion/Linux/Command/_ipset b/Completion/Linux/Command/_ipset
index d05f13caf..a40480904 100644
--- a/Completion/Linux/Command/_ipset
+++ b/Completion/Linux/Command/_ipset
@@ -4,7 +4,7 @@ local offset=0
local -a args from_to hash cmds listopts addopts
_set_types () {
- _values -S \ "Set type" \
+ _values -S \ "set type" \
'bitmap\:ip[uses a memory range to store IPv4 host (default) or IPv4 subnet addresses up to 65536 elements]'\
'bitmap\:ip,mac[uses a memory range to store an IPv4 host/subnet and mac address pair up to 65536 elements]'\
'bitmap\:port[uses a memory range to store port numbers independent of L4 protocol at up to 65536 elements]'\
@@ -25,7 +25,7 @@ _set_types () {
_ipsets () {
local -a vals
vals=( ${${(M)${(f)"$(_call_program ipsets ipset -L)"}%Name: *}#Name: } )
- _describe -t ipsets "IP sets" vals
+ _describe -t ipsets "IP set" vals
}
_sets () {
_ipsets
@@ -37,18 +37,11 @@ from_to=('(--network)--from[from IP or network (with --netmask)]:IP'
'(--from --to)--network[network]:IP/mask'
)
-_addressfamily () {
- vals=( inet
- inet6
- )
- _describe -t addressfamily "Address Family" vals
-}
-
-hash=( '--hashsize[the initial hash size aligned to a power of 2(default 1024)]:hashsize'
- '--maxelem[the maximum number of elements in the set (default 65536)]:maxelements'
- '--family[the protocol family of addresses to be stored in the set (default inet)]:addressfamily:_addressfamily'
+hash=( '--hashsize[the initial hash size aligned to a power of 2]:hashsize [1024]'
+ '--maxelem[the maximum number of elements in the set]:max elements [65536]'
+ '--family[the protocol family of addresses to be stored in the set]:address family [inet]:(inet inet6)'
'--timeout[adds timeout support to the set with your specified value as default, (0 = forever)]:entrytimeout'
- '--probes[max number of tries to resolve clashing, altering this is discouraged (default 8)]:probes'
+ '--probes[max number of tries to resolve clashing, altering this is discouraged]:tries [8]'
'--resize[ratio of increasing hash size after unsuccessful <probes> of double-hashing, altering discouraged]:percent'
)
@@ -100,7 +93,7 @@ case $words[offset+2]; in
args=( $hash )
;;
list\:set)
- args=( '--size[size of the new setlist (default 8)]:size' )
+ args=( '--size[size of the new setlist]:size [8]' )
;;
esac
;;
@@ -118,7 +111,7 @@ _ips () {
if (( $ips )); then vals1+=$i; else bindings+=${i/ ->/:}; fi
done
_describe -t ips "IPs from $words[offset+3] set" vals1
- _describe -t special_values "special values" vals2
+ _describe -t special_values "special value" vals2
fi
}