about summary refs log tree commit diff
path: root/Completion/User/_ports
blob: 9012dfd5e7cd1b7487b51f7c6f91ad8b15991535 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#autoload

local expl

_tags any ports || return 1

: ${(A)ports:=${${(M)${${(f)"$(</etc/services)"}:#\#*}#*/tcp}%%[ 	]*}}

_description expl port
compadd "$@" "$expl[@]" - "$ports[@]"