diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-28 09:45:32 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-28 09:45:32 +0000 |
commit | 8fb50dcf4ff1897d792e488f4d6dfeab2d9a5e19 (patch) | |
tree | 393bf442adec1b1c5d74032dffafb6bc3186295f /Completion/Builtins | |
parent | 3e87739e57bade63a8cbfa44f1279afa33c29185 (diff) | |
download | zsh-8fb50dcf4ff1897d792e488f4d6dfeab2d9a5e19.tar.gz zsh-8fb50dcf4ff1897d792e488f4d6dfeab2d9a5e19.tar.xz zsh-8fb50dcf4ff1897d792e488f4d6dfeab2d9a5e19.zip |
zsh-workers/9895
Diffstat (limited to 'Completion/Builtins')
-rw-r--r-- | Completion/Builtins/_zstyle | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/Completion/Builtins/_zstyle b/Completion/Builtins/_zstyle index 9d77612fc..328e2d7d2 100644 --- a/Completion/Builtins/_zstyle +++ b/Completion/Builtins/_zstyle @@ -30,7 +30,7 @@ styles=( hidden c:bool hosts c:_hosts hosts-ports c:host-port - hosts-ports-users c:host-port-user + users-hosts-ports c:user-host-port ignore-parents c:ignorepar ignored-patterns c: insert-unambiguous c:bool @@ -155,15 +155,24 @@ while [[ -n $state ]]; do _expand _list _menu _oldlist ;; - host-port*) + user-host-port) + if [[ $PREFIX != *[@:]* ]]; then + _users -S @ + elif [[ $PREFIX = *[@:]*[[@:]* ]]; then + compset -P 2 '*[:@]' + _ports + else + compset -P 1 '*[:@]' + _hosts -S : + fi + ;; + + host-port) if [[ $PREFIX != *:* ]]; then _hosts -S : - elif [[ $ostate != *user || $PREFIX != *:*:* ]]; then + else compset -P 1 '*:' _ports - else - compset -P 2 '*:' - _users fi ;; @@ -197,11 +206,11 @@ while [[ -n $state ]]; do ;; user-host) - if [[ $PREFIX = *:* ]]; then - compset -P '*:' + if [[ $PREFIX = *[@:]* ]]; then + compset -P '*[@:]' _hosts else - _users + _users -S @ fi ;; |