Zsh Mailing List Archive
Messages sorted by:
Re: what is removing the space after completion and before "|"?
- X-seq: zsh-workers 16827
- From: Derek Peschel <dpeschel@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: what is removing the space after completion and before "|"?
- Date: Thu, 14 Mar 2002 02:59:32 -0800
- In-reply-to: <15500.32490.15487.735745@xxxxxxxxxxxxxxxxxx>; from wischnow@xxxxxxxxx on Mon, Mar 11, 2002 at 10:54:50AM +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20020309020350.A25556@xxxxxxxxxxxxxxxxx> <20020309103417.GA15311@xxxxxxx> <1020309182056.ZM24962@xxxxxxxxxxxxxxxxxxxxxxx> <20020309214538.A9452@xxxxxxxxxxxxxxxxx> <15500.32490.15487.735745@xxxxxxxxxxxxxxxxxx>
On Mon, Mar 11, 2002 at 10:54:50AM +0100, Sven Wischnowsky wrote:
> Derek Peschel wrote:
> > ...
> > I'm using the old completion system and I haven't tried compctl. I don't
> > think AUTO_REMOVE_SLASH has any effect in the particular case of spaces
> > before pipe characters (I tried it both ways). This is with a 4.1
> > development version.
> compctl is the old one, the completion system is the new one.
I mean I haven't run compinit or compctl, I'm just using the built-in
> > Is compresult.c the only file that deals with suffixes?
> Everthing needed for this, yes. But we have to rely on the zle module
> to really remove the suffix (since at that time, the completion system
> isn't running any more).
Now I suspect the makesuffix function. I think what's happening is this:
- I hit Tab to do the completion
- a space gets added as a suffix
- I type an ampersand or vertical bar
- the "remove the same character as a suffix" code runs
- by the special cases in makesuffix the space is treated
as if it were an ampersand or vertical bar
Why are those special cases in makesuffix anyway? Do "&" or "|" ever
get added as suffixes?
If we want to keep the special cases we'll probably have to arrange that
they all be equivalent to each other for makesuffix's purposes, but that
each one only be equivalent to itself for the purposes of the "remove the
same character" rule.
> But. We had some discussion about suffix handling some time ago
> (sorry, don't have the message IDs here). I've mostly been thinking
> (or dreaming) about moving mor of the code into shell code for more
> flexibilty and greater configurability. I didn't have time to hack,
> though, and it isn't easy without changing several parts of the C- and
> I don't object if you want to hack that part of the code (everyone who
> wants to work his way into the completion code is welcome), but I
> don't want new shell options to appear for this (or I'll remove them
> again when I find the time to tackle the suffix problem).
> Maybe you have other ideas about suffix handling and could tell us
> about them? So that we could come up with a list of desired features
> to help us implement that.
I haven't spent enough time with the shell to understand the code at a
broad level. I'm just playing with specific features to get the behavior
I want. Though I do realize that a small change in the code can affect
lots of other things.
If I start to really understand the power of the completion system, and
come up with other ideas, I'll let the list know.
Messages sorted by: