mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-20 14:04:03 +01:00
13 lines
283 B
Plaintext
13 lines
283 B
Plaintext
#autoload
|
|
|
|
local expl ports
|
|
|
|
if ! zstyle -a ":completion:${curcontext}:" ports ports; then
|
|
(( $+_cache_ports )) ||
|
|
: ${(A)_cache_ports:=${${(M)${${(f)"$(</etc/services)"}:#\#*}#*/tcp}%%[ ]*}}
|
|
|
|
ports=( "$_cache_ports[@]" )
|
|
fi
|
|
|
|
_wanted ports expl port compadd "$@" -a ports
|