diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2018-04-07 15:12:57 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2018-04-07 15:12:57 +0200 |
commit | 6e1ab9aa550695ee7e3d467b4173c0b83ba7f759 (patch) | |
tree | 8fb7faa4364a7cbf1cba48296a5f537e13f2a8d9 /Completion/Unix/Command/_mosh | |
parent | 5ad56a41f1ee2e61abca079f5ea8909f895ac2dd (diff) | |
parent | f027f1d6e876708bc75d4217e1ca26898658d8d3 (diff) | |
download | zsh-6e1ab9aa550695ee7e3d467b4173c0b83ba7f759.tar.gz zsh-6e1ab9aa550695ee7e3d467b4173c0b83ba7f759.zip |
Merge tag 'zsh-5.4.2-test-2' / 'upstream' branch into 'debian' branch
Test version 2 prior to zsh 5.5.
Diffstat (limited to 'Completion/Unix/Command/_mosh')
-rw-r--r-- | Completion/Unix/Command/_mosh | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/Completion/Unix/Command/_mosh b/Completion/Unix/Command/_mosh index 431fdbf9e..7d1250320 100644 --- a/Completion/Unix/Command/_mosh +++ b/Completion/Unix/Command/_mosh @@ -1,6 +1,6 @@ #compdef mosh -local curcontext="$curcontext" state line +local curcontext="$curcontext" state line expl ret=1 local -a _comp_priv_prefix _arguments -C \ @@ -12,15 +12,30 @@ _arguments -C \ '(-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]' \ + '(--family -6)-4[use IPv4 only]' \ + '(--family -4)-6[use IPv6 only]' \ + '(-4 -6)--family=[specify address family]:family [prefer-inet]:(inet inet6 auto all prefer-inet prefer-inet6)' \ + '--bind-server=[ask the server to reply from an IP address]:{ssh|any|IP}' \ '--server[specify command to run server helper]:remote file:_files' \ '--client[specify command to run client helper]:_command_names -e' \ + "--no-ssh-pty[don't allocate a pseudo tty on ssh connection]" \ + '--local[run mosh-server locally without using ssh]' \ + '--experimental-remote-ip=[select method for discovering remote IP address to use for mosh]:method:(local remote proxy)' \ '1:remote host name:->userhost' \ - '*:::args:_normal' && return + '*:::args:_normal' && ret=0 case $state in userhost) - _hosts || _user_at_host && return + if compset -P '*@'; then + _wanted hosts expl 'remote host name' _ssh_hosts && ret=0 + elif compset -S '@*'; then + _wanted users expl 'login name' _combination -s '[:@]' my-accounts users-hosts users -S '' && ret=0 + else + _alternative \ + 'hosts:remote host name:_ssh_hosts' \ + 'users:login name:_combination -s "[:@]" my-accounts users-hosts users -qS@' && ret=0 + fi ;; esac -return 1 +return ret |