Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Saving the zle display stuff



Sven Wischnowsky wrote:
> 
> It would be relatively easy to make it remember how long the list
> below the prompt is (it should already know about the presence of a
> list -- at least in most cases).
> So, are you suggesting a zle-option to make it put the prompt `below
> the list if there is one'?

Yes: a zle-widget that puts the prompt below the list if there is one.
That allows me to keep the current list for later reference if I decide
that I want to.

> If you are only concerned about completion: there is the last-prompt
> style. But unfortunately, this doesn't work with _complete_help
> because that doesn't set up it's own $curcontext, and, I think, it
> shouldn't because we call it to get information about normal
> completion in the same context. Hm. We could make _complete_help test
> the last-prompt style directly with a context like
> `:completion:complete-help::::' and if it is true, set
> `compstate[last_prompt]=yes'.

That would be useful, though the widget would be better.
I couldn't actually get this to work. Even just putting
compstate[last_prompt]='yes' before the compadd in _complete_word didn't
work.

Out of interest, why does _setup use zstyle -s followed by [[ "$val" =
(yes|true|1|on) ]] for various things including last-prompt instead of
just using zstyle -b (or -t or -T)?

And in a separate message, Sven wrote:
> Oliver Kiddle wrote:
> > Is there a better way for me to have done the equivalent of :*:nothing:_nothing for the -r option?
>
> Can't think of a better way... never thought about that. Hm. Is it
> worth to make _arguments support this directly, i.e. add a syntax
> saying: `no more arguments after this option'?

There's probably quite a lot of commands like zpty where they can be
used in a few separate ways (each with their own set of arguments) and
for these commands it is useful to avoid the final arguments for some
forms so if it is fairly simple to do and there is a clear way of
representing it in the _arguments parameters then it is probably worth
doing.

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author