zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh-Users List <zsh-users@zsh.org>
Subject: Re: Fish-like autosuggestions
Date: Thu, 07 Nov 2013 09:44:47 +0000	[thread overview]
Message-ID: <20131107094447.0302656e@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <CAH+w=7bvb=tQbwhD=Kiu8XXKLox=pgXUa5N+qc5i18cTy-1eEw@mail.gmail.com>

On Wed, 06 Nov 2013 16:04:23 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> You've already implemented your idea so perhaps this is moot, but to
> explain my thought: The same widget could get invoked for all
> descriptors as long as it has a way to tell which descriptor caused
> the call.  Hence my suggestion of putting the descriptor number in
> $NUMERIC etc.; the single widget could just do "case $NUMERIC in ..."
> or something (such as passing the FD as an argument, which appears to
> be what you did).

I can see that --- and it's probably entirely moot at this point --- but
I think of it this way: you've set up a file descriptor for a particular
purpose.  Rather than edit an existing widget handling file descriptors
for completely different purposes, which is a maintainance problem, you
probably want to run a completely different chunk of code.  In other
words, what's needed is a bit more like binding a keystroke to a
widget than running a fixed widget in a specific circumstance.  The
semantics of zle -F have that binding effect.

Anyway, I think it's down to seeing if the change does the trick.  By
the way, note that using "zle -F" with an existing file descriptor
silently overwrites the previous handler (another parallel with key
binding), even if the mechanism has changed, which partially contradicts
what I said before.

I'll probalby commit this before 5.0.3 (not 4.0.3) since it shouldn't
break anything existing and I should be able to confirm that as I use
the old interface all the time.

pws


  reply	other threads:[~2013-11-07  9:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 17:52 Thiago Padilha
2013-10-30 16:25 ` Bart Schaefer
2013-11-04 19:30   ` Thiago Padilha
2013-11-05 15:57     ` Bart Schaefer
2013-11-05 16:18       ` Peter Stephenson
2013-11-05 19:46         ` Bart Schaefer
2013-11-05 20:40           ` Bart Schaefer
2013-11-06 20:07             ` Peter Stephenson
2013-11-07  0:04               ` Bart Schaefer
2013-11-07  9:44                 ` Peter Stephenson [this message]
2013-11-07 18:07                   ` Thiago Padilha
2013-11-07 18:12                     ` Peter Stephenson

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=20131107094447.0302656e@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-users@zsh.org \
    /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).