about summary refs log tree commit diff
path: root/Completion/Unix/Command/_fsh
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-08-22 16:30:28 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-08-22 16:30:28 +0000
commit2270746356368eb20676bbfb26c82c2a06e694ec (patch)
tree90c91d1100d1145c9d7e6b16cd786b94f1f92f3f /Completion/Unix/Command/_fsh
parent2fe227ff13556508ed844e8996c8c3bc8401a4a3 (diff)
downloadzsh-2270746356368eb20676bbfb26c82c2a06e694ec.tar.gz
zsh-2270746356368eb20676bbfb26c82c2a06e694ec.tar.xz
zsh-2270746356368eb20676bbfb26c82c2a06e694ec.zip
tidy up of many completions (updates, fixes, improvements and plain aesthetics)
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