1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 21:44:11 +01:00
zsh/Completion/User/_ports

13 lines
283 B
Plaintext
Raw Normal View History

1999-09-13 20:22:24 +02:00
#autoload
2000-05-31 11:38:25 +02:00
local expl ports
1999-09-13 20:22:24 +02:00
2000-05-31 11:38:25 +02:00
if ! zstyle -a ":completion:${curcontext}:" ports ports; then
(( $+_cache_ports )) ||
: ${(A)_cache_ports:=${${(M)${${(f)"$(</etc/services)"}:#\#*}#*/tcp}%%[ ]*}}
1999-09-13 20:22:24 +02:00
2000-05-31 11:38:25 +02:00
ports=( "$_cache_ports[@]" )
fi
_wanted ports expl port compadd "$@" -a ports