Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: PATCH: _list completer
- X-seq: zsh-workers 5922
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: RE: PATCH: _list completer
- Date: Wed, 24 Mar 1999 12:42:21 +0100 (MET)
- In-reply-to: "Andrej Borsenkow"'s message of Wed, 24 Mar 1999 14:01:46 +0300
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Andrej Borsenkow wrote:
> And while I'm at it: how about a parameter giving the
> > contents of the whole buffer, e.g. as an array containing the lines?
> > (Both of these readonly, I think, at least for now.) Obviously the
> > best name for this would be `buffer', if only `BUFFER' weren't taken
> > (and this is a misnomer, anyway, considering the names of the builtin
> > zle widgets -- and an ugly one, I think).
>
> But completion widget is a ZLE widget in the first place? And every
> user-defined ZLE widget has some special parameters automatically setup -
> and that includes BUFFER that does exactly what you need. See ZLE manuals.
> (And we could HISTNO to these, 'course).
Err... `BUFFER' only gives the current line, not the whole multi-line
buffer. And the builtin zle widgets that work only on the current line
have a `line' in their name, while those working on the whole
multi-line buffer have a `buffer' in their name. It is this that I
find wrong with the name `BUFFER'. I agree that in many cases the line
that you get by `$BUFFER' is the most interesting thing to have, but
not always (just think about the discussion we had about reporting the
quotation character to completion widgets).
> Do you call completion widgets in special way? Is it possible to unify
> both - "normal" ZLE user-defined widgets and completion ones?
They are already (almost) the same with respect to the zle
parameters. It's just that completion widgets get them readonly, and
that is something I will not change, because the later phases of the
completion code have to position the cursor, remove the old word, and
insert the new <whatever>. If at that time the user would have changed
the line or the cursor position things could go haywire.
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author