1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-11 10:41:12 +02:00
zsh/Completion/User/_ports
2000-05-31 09:38:25 +00:00

12 lines
283 B
Text

#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