zsh-users
 help / color / mirror / code / Atom feed
* how does setopt -m work?
@ 1999-03-10 22:23 Sweth Chandramouli
  1999-03-11  1:48 ` Geoff Wing
  0 siblings, 1 reply; 5+ messages in thread
From: Sweth Chandramouli @ 1999-03-10 22:23 UTC (permalink / raw)
  To: ZSH Users

	the subject pretty much says it all; what am i missing
here:

(astaroth/1)~: setopt
interactive
monitor
norcs
shinstdin
zle
(astaroth/2)~: setopt -m "auto_r*"
(astaroth/3)~: setopt 
interactive
monitor
norcs
shinstdin
zle
(astaroth/4)~: setopt auto_resume
(astaroth/5)~: setopt
autoresume
interactive
monitor
norcs
shinstdin
zle

	-- sweth.

-- 
Sweth Chandramouli
IS Coordinator, The George Washington University
<sweth@gwu.edu> / (202) 994 - 8521 (V) / (202) 994 - 0458 (F)
<a href="http://astaroth.nit.gwu.edu/~sweth/disc.html">*</a>


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: how does setopt -m work?
@ 1999-03-11  8:32 Sven Wischnowsky
  1999-03-11 15:49 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Sven Wischnowsky @ 1999-03-11  8:32 UTC (permalink / raw)
  To: zsh-users


mason@primenet.com.au wrote:

> Sweth Chandramouli <sweth@astaroth.nit.gwu.edu> typed:
> :	the subject pretty much says it all; what am i missing
> :here:
> :(astaroth/2)~: setopt -m "auto_r*"
> :(astaroth/3)~: setopt 
> :interactive
> :monitor
> :norcs
> :shinstdin
> :zle
> 
> It's probably a bug that it doesn't rip out the underscores when
> doing its matching.  ``setopt -m "autor*"'' will work.  The other
> thing to check would be case sensitivity.

Maybe, yes.

Bye
 Sven

--- os/options.c	Mon Mar  8 09:06:26 1999
+++ Src/options.c	Thu Mar 11 09:29:20 1999
@@ -522,11 +522,20 @@
 	/* Globbing option (-m) set. */
 	while (*args) {
 	    Comp com;
+	    char *s, *t;
+
+	    t = p = dupstring(*args);
+	    while (*t)
+		if (*t == '_')
+		    chuck(t);
+		else {
+		    *t = tulower(*t);
+		    t++;
+		}
 
 	    /* Expand the current arg. */
-	    tokenize(*args);
-	    if (!(com = parsereg(*args))) {
-		untokenize(*args);
+	    tokenize(s);
+	    if (!(com = parsereg(s))) {
 		zwarnnam(nam, "bad pattern: %s", *args, 0);
 		continue;
 	    }

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


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: how does setopt -m work?
@ 1999-03-11 15:58 Sven Wischnowsky
  0 siblings, 0 replies; 5+ messages in thread
From: Sven Wischnowsky @ 1999-03-11 15:58 UTC (permalink / raw)
  To: zsh-users


Bart Schaefer wrote:

> Is this really the whole patch?  After applying this, I get
> 
> ../../zsh-3.1.5/Src/options.c: In function `bin_setopt':
> ../../zsh-3.1.5/Src/options.c:527: `p' undeclared (first use this function)
> ../../zsh-3.1.5/Src/options.c:527: (Each undeclared identifier is reported only once
> ../../zsh-3.1.5/Src/options.c:527: for each function it appears in.)
> ../../zsh-3.1.5/Src/options.c:525: warning: `s' might be used uninitialized in this function
> ../../zsh-3.1.5/Src/options.c:525: warning: `t' might be used uninitialized in this function

Seems I sent the patch I made while waiting for the compiler... and
not the one I made after I fixed the above.

Pardon.

Bye
 Sven

--- os/options.c	Thu Mar 11 16:56:36 1999
+++ Src/options.c	Thu Mar 11 16:56:26 1999
@@ -524,7 +524,7 @@
 	    Comp com;
 	    char *s, *t;
 
-	    t = p = dupstring(*args);
+	    t = s = dupstring(*args);
 	    while (*t)
 		if (*t == '_')
 		    chuck(t);

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-03-11 16:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-10 22:23 how does setopt -m work? Sweth Chandramouli
1999-03-11  1:48 ` Geoff Wing
1999-03-11  8:32 Sven Wischnowsky
1999-03-11 15:49 ` Bart Schaefer
1999-03-11 15:58 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).