about summary refs log tree commit diff
path: root/Completion/User/_nedit
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-05 13:38:45 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-05 13:38:45 +0000
commit9f9b6e165516c4ee59b1f5b609a6890ccc3d598f (patch)
tree86460ad1a9886e6030fc1b1d1aee57668f28aa01 /Completion/User/_nedit
parent04118530d4157d3494349e2628246b78465e08f8 (diff)
downloadzsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.tar.gz
zsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.tar.xz
zsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.zip
completion function cleanup for `_arguments' with the `-C' option and using it's return value (11195)
Diffstat (limited to 'Completion/User/_nedit')
-rw-r--r--Completion/User/_nedit11
1 files changed, 7 insertions, 4 deletions
diff --git a/Completion/User/_nedit b/Completion/User/_nedit
index 5261a54a9..c230fbe0c 100644
--- a/Completion/User/_nedit
+++ b/Completion/User/_nedit
@@ -1,6 +1,7 @@
 #compdef nedit nc
 
-local state line expl nedit_common
+local state line expl nedit_common curcontext="$curcontext"
+typeset -A opt_args ret=1
 
 nedit_common=( \
   '-read[open file read only]' \
@@ -18,7 +19,7 @@ if [[ $words[1] = *nc ]]; then
     '(-noask)-ask[prompt if no server found]' \
     '(-ask)-noask[start a new server without asking if none found]' \
     '-svrcmd[command to run server]:server command:_command_names -e' \
-    "$nedit_common[@]"
+    "$nedit_common[@]" && ret=0
 else
   _x_arguments -C \
     '-server[designate this session as an nedit server]' \
@@ -41,10 +42,12 @@ else
     '(-fg)-foreground:foreground color:_x_color' \
     '(-foreground)-fg[specify foreground color]:foreground color:_x_color' \
     '*-import[load additional preferences file]:nedit preferences file:_files' \
-    "$nedit_common[@]"
+    "$nedit_common[@]" && ret=0
 fi
 
 [[ $state = lang && -f ~/.nedit ]] &&
     _wanted neditlanguages expl 'language mode' \
         compadd -  ${(f)"$(sed -n \
-            '/^nedit.languageMode/,/^nedit/ s/.*	\([^:]*\).*/\1/p' < ~/.nedit)"}
+            '/^nedit.languageMode/,/^nedit/ s/.*	\([^:]*\).*/\1/p' < ~/.nedit)"} && ret=0
+
+return ret