1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-07-11 04:41:32 +02:00
zsh/Completion/Unix/Command/_fsh
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

22 lines
546 B
Text

#compdef fsh
local curcontext="$curcontext" state line ret=1
local -a _comp_priv_prefix
_arguments -C \
'(- : *)'{-h,--help}'[display help information]' \
'(- : *)'{-V,--version}'[display version information]' \
'-r[specify method]:method:(rsh ssh)' \
'-l[specify login id]:login:_users' \
'(-T --timeout)'{-T,--timeout}':idle timeout:' \
':remote host name:_hosts' \
'(-):command: _command_names -e' \
'*::args:->command' && ret=0
if [[ -n "$state" ]]; then
shift 1 words
(( CURRENT-- ))
_normal && ret=0
fi
return ret