From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24464 invoked from network); 9 Mar 2000 14:46:27 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Mar 2000 14:46:27 -0000 Received: (qmail 6025 invoked by alias); 9 Mar 2000 14:46:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10026 Received: (qmail 6012 invoked from network); 9 Mar 2000 14:46:17 -0000 Date: Thu, 9 Mar 2000 15:45:53 +0100 (MET) Message-Id: <200003091445.PAA30461@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Oliver Kiddle's message of Thu, 09 Mar 2000 12:52:46 +0000 Subject: Re: Saving the zle display stuff 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