about summary refs log tree commit diff
path: root/Completion/Unix/Command/_fsh
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command/_fsh')
-rw-r--r--Completion/Unix/Command/_fsh38
1 files changed, 18 insertions, 20 deletions
diff --git a/Completion/Unix/Command/_fsh b/Completion/Unix/Command/_fsh
index a7cc22e6a..637bc401f 100644
--- a/Completion/Unix/Command/_fsh
+++ b/Completion/Unix/Command/_fsh
@@ -1,23 +1,21 @@
 #compdef fsh
 
-_arguments \
-	'(--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
+local curcontext="$curcontext" state line ret=1
 
-case "$state" in
-      command)
-        shift 1 words
-        (( CURRENT-- ))
-        _normal
-        return
-        ;;
-esac
+_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