summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_mosh
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2014-08-14 19:02:48 +0200
committerOliver Kiddle <opk@zsh.org>2014-08-14 19:02:48 +0200
commit2be0d8bdef401b6bca0c80a7bd78d658e862e38e (patch)
treee3ce3b6308647cb5fe6eb5122aad0a0daa917f28 /Completion/Unix/Command/_mosh
parent469ee6daef50d0736a38f646bd9eb659b7aad6d1 (diff)
downloadzsh-2be0d8bdef401b6bca0c80a7bd78d658e862e38e.tar.gz
zsh-2be0d8bdef401b6bca0c80a7bd78d658e862e38e.zip
32998: completion function updates
Diffstat (limited to 'Completion/Unix/Command/_mosh')
-rw-r--r--Completion/Unix/Command/_mosh32
1 files changed, 23 insertions, 9 deletions
diff --git a/Completion/Unix/Command/_mosh b/Completion/Unix/Command/_mosh
index c940f9015..dacbd1018 100644
--- a/Completion/Unix/Command/_mosh
+++ b/Completion/Unix/Command/_mosh
@@ -1,12 +1,26 @@
#compdef mosh
+local curcontext="$curcontext" state line
+local -a suf
+
_arguments \
- '--client=:client helper:_command_names -e' \
- '--server=:server helper:_files' \
- '--ssh=:ssh command to run:_files' \
- '(-a -n)--predict=:when:(adaptive always never)' \
- '(--predict -n)-a[predict always]' \
- '(--predict -a)-n[predict never]' \
- {-p,--port=}':port:_ports' \
- ':remote:_hosts' \
- ':remote command:_command_names -e'
+ '(-)--help[display help information]' \
+ '(-)--version[display version information]' \
+ "--no-init[don't set terminal init string]" \
+ '--ssh=[specify ssh command to setup session]:ssh command:_normal' \
+ '--port=[specify server-side port range]:port:_sequence -n 2 -s \: _ports' \
+ '(-a -n)--predict=[control speculative local echo]:mode:(adaptive always never)' \
+ '(--predict -n)-a[synonym for --predict=always]' \
+ '(--predict -a)-n[synonym for --predict=never]' \
+ '--server[specify command to run server helper]:remote file:_files' \
+ '--client[specify command to run client helper]:_command_names -e' \
+ '1:remote host name:->userhost' \
+ '*:::args:_normal' && return
+
+case $state in
+ userhost)
+ _hosts || _user_at_host && return
+ ;;
+esac
+
+return 1