zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: compadd end-of-options
@ 1999-02-19  9:23 Sven Wischnowsky
  0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 1999-02-19  9:23 UTC (permalink / raw)
  To: zsh-workers


The patch below makes `compadd' accept both `--' and `-' as a marker for 
the end-of-options, the way `print' and `echo' behave (I hadn't
noticed that they accept a single hyphen for that).

Bye
 Sven

--- os/Zle/compctl.c	Mon Feb 15 12:51:55 1999
+++ Src/Zle/compctl.c	Fri Feb 19 10:17:31 1999
@@ -1685,6 +1685,10 @@
 	return 1;
     }
     for (; *argv && **argv ==  '-'; argv++) {
+	if (!(*argv)[1]) {
+	    argv++;
+	    break;
+	}
 	for (p = *argv + 1; *p; p++) {
 	    sp = NULL;
 	    dm = 0;
--- od/Zsh/compwid.yo	Tue Feb 16 15:02:19 1999
+++ Doc/Zsh/compwid.yo	Fri Feb 19 10:22:32 1999
@@ -300,7 +300,7 @@
 option tt(AUTO_MENU) is set, the completion code will immediatly
 switch to menucompletion.
 )
-item(tt(--))(
+item(tt(-), tt(--))(
 This flag ends the list of flags and options. All arguments after it
 will be taken as the words to use as matches even if they begin with
 hyphens.

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

only message in thread, other threads:[~1999-02-19  9:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-19  9:23 PATCH: compadd end-of-options Sven Wischnowsky

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).