summary refs log tree commit diff
path: root/Completion/User/_ports
blob: 958917bd6821580992c01044a94a918baa984409 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#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