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-07-31 15:26:13 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-07-31 15:26:13 +0000
commitb84399b9cbb93f199d695d7cb264c44178a8d5e0 (patch)
treeaf329c706dd4104718b02c78e2009f9488ad59e5 /Completion/Unix/Command/_fsh
parent27665b32d6e1f60d6e786baa2478aa396f7e9b98 (diff)
downloadzsh-b84399b9cbb93f199d695d7cb264c44178a8d5e0.tar.gz
zsh-b84399b9cbb93f199d695d7cb264c44178a8d5e0.tar.xz
zsh-b84399b9cbb93f199d695d7cb264c44178a8d5e0.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/_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