From b84399b9cbb93f199d695d7cb264c44178a8d5e0 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Thu, 31 Jul 2003 15:26:13 +0000 Subject: tidy up of many completions (updates, fixes, improvements and plain aesthetics) --- Completion/Unix/Command/_fsh | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'Completion/Unix/Command/_fsh') diff --git a/Completion/Unix/Command/_fsh b/Completion/Unix/Command/_fsh index a3ca0321a..d9ced5feb 100644 --- a/Completion/Unix/Command/_fsh +++ b/Completion/Unix/Command/_fsh @@ -1,25 +1,21 @@ #compdef fsh -local curcontext="$curcontext" state line +local curcontext="$curcontext" state line ret=1 _arguments -C \ - '(--help)-h[help]' \ - '(-h)--help' \ - '(--version)-V[version]' \ - '(-V)--version' \ - '-r[method]:method:(rsh ssh)' \ - '-l[login]:login:_users' \ - '(--timeout)-T:idle timeout:' \ - '(-T)--timeout:idle timeout:' \ - ':remote host name:_hosts' \ - '(-):command: _command_names -e' \ - '*::args:->command' && return 0 + '(- : *)'{-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 -case "$state" in - command) - shift 1 words - (( CURRENT-- )) - _normal - return - ;; -esac +if [[ -n "$state" ]]; then + shift 1 words + (( CURRENT-- )) + _normal && ret=0 +fi + +return ret -- cgit 1.4.1