zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Saving the zle display stuff
Date: Thu, 9 Mar 2000 15:45:53 +0100 (MET)	[thread overview]
Message-ID: <200003091445.PAA30461@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Oliver Kiddle's message of Thu, 09 Mar 2000 12:52:46 +0000


Oliver Kiddle wrote:

> Is it possible to have a zle widget which saves any text (completion
> list etc) which is below the prompt (as if ALWAYS_LAST_PROMPT was set
> when the list was generated). The nearest I can get to this is:
> save_list() {
>   unsetopt alwayslastprompt
>   zle list-choices
>   setopt alwasylastprompt
> }
> 
> This would be particularly useful with _complete_help where I often want
> to cut-and-paste to a zstyle command or refer back to the information
> later.
> 
> I'd guess that zle prints lists and doesn't remember where it finished
> so this isn't easy to do. If this is correct, the solution may relate to
> the stuff with calling zle from traps and establishing if there is a
> completion list from there.

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'?


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


Bye
 Sven


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


             reply	other threads:[~2000-03-09 14:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-09 14:45 Sven Wischnowsky [this message]
2000-03-10 16:47 ` Oliver Kiddle
  -- strict thread matches above, loose matches on Subject: below --
2000-03-14  9:38 Sven Wischnowsky
2000-03-13  9:22 Sven Wischnowsky
2000-03-14 13:21 ` Oliver Kiddle
2000-03-09 12:52 Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200003091445.PAA30461@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).