mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-01 06:20:55 +01:00
zsh-workers/8990
This commit is contained in:
parent
4f9b1b9804
commit
d5d015115c
2 changed files with 3 additions and 3 deletions
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
local expl ports
|
||||
|
||||
if ! _style ports ports ports; then
|
||||
if ! _style -a ports ports ports; then
|
||||
(( $+_cache_ports )) ||
|
||||
: ${(A)ports:=${${(M)${${(f)"$(</etc/services)"}:#\#*}#*/tcp}%%[ ]*}}
|
||||
: ${(A)_cache_ports:=${${(M)${${(f)"$(</etc/services)"}:#\#*}#*/tcp}%%[ ]*}}
|
||||
|
||||
ports=( "$_cache_ports[@]" )
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ arg1)
|
|||
arg2)
|
||||
if (( ! $+opt_args[-s] )); then
|
||||
_wanted ports expl 'port to connect' &&
|
||||
_combination '' hosts-ports hosts="${line[2]:q}" ports "$expl[@]"
|
||||
_combination '' hosts-ports hosts="${line[1]:q}" ports "$expl[@]"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue