1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00
zsh/Completion/Unix/Command/_mosh
Oliver Kiddle 8011fe8a58 39261 (tweaked cf. Daniel: 39275): don't unconditionally elevate privileges with sudo in completion functions
A new gain-privileges style enables it and a _comp_priv_prefix array
added for tracking how to match privileges for the current command
2016-09-11 13:49:22 +02:00

26 lines
875 B
Text

#compdef mosh
local curcontext="$curcontext" state line
local -a _comp_priv_prefix
_arguments -C \
'(-)--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