zsh-workers
 help / color / mirror / code / Atom feed
* fixsuffix() again
@ 1998-11-06  7:51 Bart Schaefer
  0 siblings, 0 replies; 7+ messages in thread
From: Bart Schaefer @ 1998-11-06  7:51 UTC (permalink / raw)
  To: zsh-workers

Sven, one of your patch hunks in zsh-workers/4510 removes a call to
fixsuffix() from the top of docompletion().  Is this intentional or not?

(I ask because that same patch also backs out the fixsuffix() from 4412,
which you then had to put back, slightly relocated, in 4528.)

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


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

* Re: fixsuffix() again
  1998-11-06 13:36   ` Sven Wischnowsky
@ 1998-11-06 16:35     ` Bart Schaefer
  0 siblings, 0 replies; 7+ messages in thread
From: Bart Schaefer @ 1998-11-06 16:35 UTC (permalink / raw)
  To: zsh-workers

On Nov 6, 10:11am, Sven Wischnowsky wrote:
} Subject: Re: fixsuffix() again
}
} "Bart Schaefer" wrote:
} 
} > So you mean with that one call to fixsuffix() in docompletion() we can
} > get rid of all the other calls to fixsuffix() scattered about in other
} > places?  If so, then by golly I vote for putting that one back and
} > nuking the others.
} 
} The one in deletecharorlist() will still be need since it is in the
} branch where completion is noct called.   [...]   With
} fixsuffix() in docompletion() the slash is not removed, but with the
} old style it is.

It's not worth it, then.  I thought you meant you could get rid of at
least five of the other six calls that way.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


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

* Re: fixsuffix() again
@ 1998-11-06 13:36   ` Sven Wischnowsky
  1998-11-06 16:35     ` Bart Schaefer
  0 siblings, 1 reply; 7+ messages in thread
From: Sven Wischnowsky @ 1998-11-06 13:36 UTC (permalink / raw)
  To: zsh-workers


Peter Stephenson wrote:

> 
> Sven Wischnowsky wrote:
> > > So you mean with that one call to fixsuffix() in docompletion() we can
> > > get rid of all the other calls to fixsuffix() scattered about in other
> > > places?  If so, then by golly I vote for putting that one back and
> > > nuking the others.
> > 
> > The one in deletecharorlist() will still be need since it is in the
> > branch where completion is noct called. So it would make two instead
> > of three calls in zle_tricky.c. The patch below does this, but note
> > that there is one ugliness:
> 
> I've found a more serious problem with this.
> 
> % export ZMLIB=$PWD               # some people probably have this set anyway
> % setopt noautomenu menucomplete noautolist
> % echo $Z<TAB>            -> $ZMLIST/
>          <TAB>            -> $ZSH_NAME
>          <TAB>            -> $ZSH_VERSION
>          <RET>            -> $ZSH_VERSIO
> 
> It seems to lose memory of the fact that the slash has already gone.

Ok, then there is another reason not to move the fixsuffix()
there (the problem Peter reported can be fixed by the fixsuffix() in
do_single()).


Bye
 Sven


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


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

* Re: fixsuffix() again
  1998-11-06  9:11 Sven Wischnowsky
@ 1998-11-06 13:02 ` Peter Stephenson
  1998-11-06 13:36   ` Sven Wischnowsky
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 1998-11-06 13:02 UTC (permalink / raw)
  To: zsh-workers

Sven Wischnowsky wrote:
> > So you mean with that one call to fixsuffix() in docompletion() we can
> > get rid of all the other calls to fixsuffix() scattered about in other
> > places?  If so, then by golly I vote for putting that one back and
> > nuking the others.
> 
> The one in deletecharorlist() will still be need since it is in the
> branch where completion is noct called. So it would make two instead
> of three calls in zle_tricky.c. The patch below does this, but note
> that there is one ugliness:

I've found a more serious problem with this.

% export ZMLIB=$PWD               # some people probably have this set anyway
% setopt noautomenu menucomplete noautolist
% echo $Z<TAB>            -> $ZMLIST/
         <TAB>            -> $ZSH_NAME
         <TAB>            -> $ZSH_VERSION
         <RET>            -> $ZSH_VERSIO

It seems to lose memory of the fact that the slash has already gone.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarotti 2, 56100 Pisa, Italy


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

* Re: fixsuffix() again
@ 1998-11-06  9:11 Sven Wischnowsky
  1998-11-06 13:02 ` Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: Sven Wischnowsky @ 1998-11-06  9:11 UTC (permalink / raw)
  To: zsh-workers



"Bart Schaefer" wrote:

> On Nov 6,  9:16am, Sven Wischnowsky wrote:
> } Subject: Re:  fixsuffix() again
> }
> } Bart Schaefer wrote:
> } > Sven, one of your patch hunks in zsh-workers/4510 removes a call to
> } > fixsuffix() from the top of docompletion().  Is this intentional or not?
> } 
> } I have no idea where this fixsuffix() in docompletion() comes from
> 
> Looks like Zefram added it when he did the 3.1.5 release.  It's not in
> any version I have in CVS until after I import the 3.1.5 code and merge.
> 
> } As I wrote in another message this may be a issue of personal
> } taste. If we put a fixsuffix() there any suffix on the line that is
> } autoremovable will become fixed when completion is tried in any way
> } (listing matches, completion with no matches, ...).
> 
> So you mean with that one call to fixsuffix() in docompletion() we can
> get rid of all the other calls to fixsuffix() scattered about in other
> places?  If so, then by golly I vote for putting that one back and
> nuking the others.

The one in deletecharorlist() will still be need since it is in the
branch where completion is noct called. So it would make two instead
of three calls in zle_tricky.c. The patch below does this, but note
that there is one ugliness:

In the main zsh directory do:

  ls Sr<TAB>

giving you

  ls Src/

now type C-d, you get the matches in Src, then type a space. With
fixsuffix() in docompletion() the slash is not removed, but with the
old style it is.

Bye
 Sven

*** os/Zle/zle_tricky.c	Fri Nov  6 10:09:42 1998
--- Src/Zle/zle_tricky.c	Fri Nov  6 10:10:19 1998
***************
*** 2927,2932 ****
--- 2927,2934 ----
  static void
  docompletion(char *s, int lst, int incmd)
  {
+     fixsuffix();
+ 
      HEAPALLOC {
  	pushheap();
  
***************
*** 4807,4814 ****
  	if (!ainfo)
  	    return;
  
- 	fixsuffix();
- 
  	/* Delete the old stuff from the command line. */
  	cs = wb;
  	foredel(we - wb);
--- 4809,4814 ----
***************
*** 4938,4945 ****
      if (!prpre) prpre = "";
      if (!ppre) ppre = "";
      if (!psuf) psuf = "";
- 
-     fixsuffix();
  
      if (!menucur) {
  	/* We are currently not in a menu-completion, *
--- 4938,4943 ----


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


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

* Re: fixsuffix() again
  1998-11-06  8:16 Sven Wischnowsky
@ 1998-11-06  8:57 ` Bart Schaefer
  0 siblings, 0 replies; 7+ messages in thread
From: Bart Schaefer @ 1998-11-06  8:57 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-workers

On Nov 6,  9:16am, Sven Wischnowsky wrote:
} Subject: Re:  fixsuffix() again
}
} Bart Schaefer wrote:
} > Sven, one of your patch hunks in zsh-workers/4510 removes a call to
} > fixsuffix() from the top of docompletion().  Is this intentional or not?
} 
} I have no idea where this fixsuffix() in docompletion() comes from

Looks like Zefram added it when he did the 3.1.5 release.  It's not in
any version I have in CVS until after I import the 3.1.5 code and merge.

} As I wrote in another message this may be a issue of personal
} taste. If we put a fixsuffix() there any suffix on the line that is
} autoremovable will become fixed when completion is tried in any way
} (listing matches, completion with no matches, ...).

So you mean with that one call to fixsuffix() in docompletion() we can
get rid of all the other calls to fixsuffix() scattered about in other
places?  If so, then by golly I vote for putting that one back and
nuking the others.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


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

* Re:  fixsuffix() again
@ 1998-11-06  8:16 Sven Wischnowsky
  1998-11-06  8:57 ` Bart Schaefer
  0 siblings, 1 reply; 7+ messages in thread
From: Sven Wischnowsky @ 1998-11-06  8:16 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> 
> Sven, one of your patch hunks in zsh-workers/4510 removes a call to
> fixsuffix() from the top of docompletion().  Is this intentional or not?
> 
> (I ask because that same patch also backs out the fixsuffix() from 4412,
> which you then had to put back, slightly relocated, in 4528.)

I have no idea where this fixsuffix() in docompletion() comes from
(looking at the various versions of 3.1.4 I have and the last few
hundred mail messages).
As I wrote in another message this may be a issue of personal
taste. If we put a fixsuffix() there any suffix on the line that is
autoremovable will become fixed when completion is tried in any way
(listing matches, completion with no matches, ...).

Bye
 Sven


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


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

end of thread, other threads:[~1998-11-06 16:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-06  7:51 fixsuffix() again Bart Schaefer
1998-11-06  8:16 Sven Wischnowsky
1998-11-06  8:57 ` Bart Schaefer
1998-11-06  9:11 Sven Wischnowsky
1998-11-06 13:02 ` Peter Stephenson
1998-11-06 13:36   ` Sven Wischnowsky
1998-11-06 16:35     ` Bart Schaefer

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