zsh-workers
 help / color / mirror / code / Atom feed
* Re: space quoting again
@ 1999-06-24 12:46 Sven Wischnowsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-06-24 12:46 UTC (permalink / raw)
  To: zsh-workers


Andrej Borsenkow wrote:

> bor@itsrm2:~%> cd /a/s/S/4<TAB>
> bor@itsrm2:~%> cd /archive/sni/SAP R3/4.0B/

Forgot to quote the path prefix/suffix.

And then I found a place where I forgot to re-calculate the length of
the match added.

Bye
 Sven

diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c	Thu Jun 24 11:47:19 1999
+++ Src/Zle/zle_tricky.c	Thu Jun 24 14:43:42 1999
@@ -3816,6 +3816,10 @@
 		    lpre = quotename(lpre, NULL);
 		    lsuf = quotename(lsuf, NULL);
 		}
+		if (dat->ppre)
+		    dat->ppre = quotename(dat->ppre, NULL);
+		if (dat->psuf)
+		    dat->psuf = quotename(dat->psuf, NULL);
 	    }
 	    /* Walk through the matches given. */
 	    for (; (s = *argv); argv++) {
@@ -3841,8 +3845,10 @@
 		    }
 		}
 		if (!(dat->aflags & CAF_MATCH)) {
-		    ms = ((dat->aflags & CAF_QUOTE) ? dupstring(s) :
-			  quotename(s, NULL));
+		    if (dat->aflags & CAF_QUOTE)
+			ms = dupstring(s);
+		    else
+			sl = strlen(ms = quotename(s, NULL));
 		    lc = bld_parts(ms, sl, -1, NULL);
 		    isexact = 0;
 		} else if (!(ms = comp_match(lpre, lsuf, s, cp, &lc,

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


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

* space quoting again
@ 1999-06-24  8:24 Andrej Borsenkow
  0 siblings, 0 replies; 2+ messages in thread
From: Andrej Borsenkow @ 1999-06-24  8:24 UTC (permalink / raw)
  To: ZSH workers mailing list

bor@itsrm2:~%> cd /a/s/S/4<TAB>
bor@itsrm2:~%> cd /archive/sni/SAP R3/4.0B/
                                  ^^

bor@itsrm2:~%> compconf
correct_accept            2n
match_original            yes
completer                 _complete:_match
dumpfile                  /home/bor/.zcompdump
path_cursor               yes
match_insert              unambig
correct_prompt            correct to:

/andrej
 


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

end of thread, other threads:[~1999-06-24 12:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-24 12:46 space quoting again Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
1999-06-24  8:24 Andrej Borsenkow

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