Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion for ipset
- X-seq: zsh-users 12986
- From: Tomasz Pala <gotar@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: completion for ipset
- Date: Mon, 23 Jun 2008 20:52:49 +0200
- In-reply-to: <20080623170935.GA7408@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20080529123042.GA24187@xxxxxxxxxxxxxxxx> <20080623170935.GA7408@xxxxxxxxxxxxxxxx>
And updated arp completion (handles more options).
--
Tomasz Pala <gotar@xxxxxxxxxxxxx>
#compdef arp
local state line expl curcontext="$curcontext"
local -a cmds
cmds=(-a --display -d --delete -s --set -f --file)
_arguments -C \
"($cmds 1 -D --use-device)"{-a,--display}'[show entries for all or specified hosts]:host:->hostintable' \
"($cmds 1 -n --numeric -D --use-device -H --hw-type)"{-d,--delete}'[delete entry from table]:host:->hostintable' \
"($cmds 1 -n --numeric)"{-s,--set}'[create an ARP entry]:host:_hosts:ethernet address::*:option:(temp trail pub)' \
"($cmds 1 -n --numeric)"{-f,--file}'[read multiple entries from file]:file:_files' \
'(-i --device)'{-i,--device}'[Select an interface]:::_net_interfaces:' \
'(-D --use-device -a --display -d --delete)'{-D,--use-device}"[Use the interface ifa's hardware address]" \
'(-H --hw-type -d --delete)'{-H,--hw-type}'[class of entries to check for]:class:(ether arcnet pronet ax25 netrom)' \
'(-n --numeric -d --delete -s --set -f --file)'{-n,--numeric}'[shows numerical addresses]' \
'(-v --verbose)'{-v,--verbose}'[be verbose]' \
'(-a)1:host:->hostintable'
[[ "$state" = hostintable ]] &&
_wanted hosts expl 'host' compadd ${${${(f)"$(${words[1]} -an)"}##[ ?(]#}%%[ )]*}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author