zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: fix for completion with -W
@ 1998-09-21  8:41 Sven Wischnowsky
  0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 1998-09-21  8:41 UTC (permalink / raw)
  To: zsh-workers


Hello

The patch below fixes my patch that allowed multiple directories with -W.
The problem was that -W with only one directory and a path prefix on
the line was handled incorrectly (the prefix on the line being ignored).

Bye
 Sven

*** Src/Zle/zle_tricky.c	Thu Aug 27 13:24:19 1998
--- ../Src/Zle/zle_tricky.c	Mon Sep 21 10:33:30 1998
***************
*** 3848,3854 ****
  		}
  		if (!dirs) {
  		    dirs = ta;
! 		    ta[0] = (cc->withd ? cc->withd : ppre);
  		    ta[1] = NULL;
  		}
  		while (*dirs) {
--- 3849,3864 ----
  		}
  		if (!dirs) {
  		    dirs = ta;
! 		    if (cc->withd) {
! 			char *tp;
! 			int pl = strlen(cc->withd);
! 
! 			ta[0] = tp = (char *) halloc(strlen(ppre) + pl + 2);
! 			strcpy(tp, cc->withd);
! 			tp[pl] = '/';
! 			strcpy(tp + pl + 1, ppre);
! 		    } else
! 			ta[0] = ppre;
  		    ta[1] = NULL;
  		}
  		while (*dirs) {


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


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

only message in thread, other threads:[~1998-09-21  8:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-21  8:41 PATCH: fix for completion with -W 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).