summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_fsh
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command/_fsh')
-rw-r--r--Completion/Unix/Command/_fsh36
1 files changed, 16 insertions, 20 deletions
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