zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Complete with _arguments -- for zsh
@ 2011-05-22 13:16 Mikael Magnusson
  0 siblings, 0 replies; only message in thread
From: Mikael Magnusson @ 2011-05-22 13:16 UTC (permalink / raw)
  To: zsh-workers

I sort of threw options at _arguments until it worked like I wanted,
Frank tested it too and it seems to work fine. The only thing it doesn't
do is complete the -o option itself more than one time, but it didn't
complete it at all before so I consider it an improvement still.

---
 Completion/Unix/Command/_sh |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Command/_sh b/Completion/Unix/Command/_sh
index 9e72a29..74aee53 100644
--- a/Completion/Unix/Command/_sh
+++ b/Completion/Unix/Command/_sh
@@ -5,7 +5,11 @@ if [[ $service == zsh ]]; then
   if [[ ${words[CURRENT-1]} == -o ]]; then
     _options
     # no other possibilities
-    return
+    return 0
+  fi
+  if _arguments -S -s -- \
+    '*:' ; then
+    return 0
   fi
 fi
 
-- 
1.7.4-rc1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-22 13:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-22 13:16 PATCH: Complete with _arguments -- for zsh Mikael Magnusson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).