diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-12 15:28:24 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-12 15:28:24 +0000 |
commit | e6282df1155e8d9b08b2e518a452c1997973f1ce (patch) | |
tree | b0c8ed7e8512cc4397ae7df6d138ea66147565b3 /Completion/User/_socket | |
parent | 167b0ae3b98938f75287dcf2e112d41a03532c5f (diff) | |
download | zsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.tar.gz zsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.tar.xz zsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.zip |
manual/8630
Diffstat (limited to 'Completion/User/_socket')
-rw-r--r-- | Completion/User/_socket | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Completion/User/_socket b/Completion/User/_socket index e43c14c24..ad9232af9 100644 --- a/Completion/User/_socket +++ b/Completion/User/_socket @@ -5,13 +5,14 @@ # socket_hosts_ports # The array that contains paris `host:port'. -local state line expl +local context state line expl typeset -A opt_args -if [[ $CURRENT -eq 2 && ( - -z "$compconfig[option_prefix]" || - "$compconfig[option_prefix]" = *\!${words[1]}* || - "$PREFIX" = -* ) ]]; then +if _tags any options && + [[ $CURRENT -eq 2 && ( + -z "$compconfig[option_prefix]" || + "$compconfig[option_prefix]" = *\!${words[1]}* || + "$PREFIX" = -* ) ]]; then _description expl option compadd -M 'r:|[_-]=* r:|=*' "$expl[@]" - -version fi @@ -42,9 +43,13 @@ command) arg1) if (( $+opt_args[-s] )); then + _tags "$context" ports || return 1 + _description expl 'port to listen' _ports "$expl[@]" else + _tags "$context" hosts || return 1 + _description expl 'host' _combination socket_hosts_ports hosts "$expl[@]" fi @@ -52,6 +57,8 @@ arg1) arg2) if (( ! $+opt_args[-s] )); then + _tags "$context" ports || return 1 + _description expl 'port to connect' _combination socket_hosts_ports hosts="${line[2]:q}" ports "$expl[@]" fi |