zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: feature-request of double-tab-list
Date: Fri, 29 Jan 1999 09:31:40 +0100 (MET)	[thread overview]
Message-ID: <199901290831.JAA12458@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Sven Wischnowsky's message of Thu, 28 Jan 1999 17:49:08 +0100 (MET)


I wrote:

> Bart Schaefer wrote:
> 
> > Way way back on Sep 19,  5:36pm, Rasmus Tengblad wrote:
> > } Subject: feature-request of double-tab-list
> > }
> > } First i'd like to tell you that I really like zsh. Best shell there is!
> > } However, there is one small thing I like better about bash, and that's the
> > } double-tab-press or what ever you'd want to call it. It's sort of like zsh
> > } with AUTO_LIST set, but with the exception that you have to press tab
> > } twice before the list is displayed.
> > 
> > OK, Sven, can we implement this using the new completion stuff?  What, if
> > any, hooks are there for keeping track of the first vs. the second press
> > of the completion key within the same completion?
> 
> We could give free the zle-parameters (LBUFFER,...) in completion
> widgets and then do something like:
> 
>   local lastl lastr
> 
>   if [[ "$LBUFFER" != "$lastl" || "$RBUFFER" != "$lastr" ]] then
>     lastl="$LBUFFER"
>     lastr="$RBUFFER"
>     return
>   fi
> 
> We should make them readonly in completion widgets, though (since the
> match-inserting code could get terribly confused otherwise).
> 
> Would that be enough?

No, for a correct solution this wouldn't be enough. For that we would
need information about the last zle widget executed (the one *before*
the one that is currently executing). This should be possible by
adding another zle parameter (sister of BUFFER, CURSOR,...).
Then, when we make those parameters readable in completion widgets, we 
can test if the last widget was the same as the current one.

Bye
 Sven


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


             reply	other threads:[~1999-01-29  8:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-29  8:31 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-01-28 16:49 Sven Wischnowsky
1998-09-19 15:36 Rasmus Tengblad
1999-01-28 16:33 ` Bart Schaefer

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=199901290831.JAA12458@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).