From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: Implement zle -P
Date: Mon, 31 Aug 2015 09:56:27 +0200 [thread overview]
Message-ID: <CAHYJk3RU3C=A3N41gQ1xTVyryH28rChXaDLQ9dbfJjDYoEQU8A@mail.gmail.com> (raw)
In-Reply-To: <1441007642-12365-1-git-send-email-mikachu@gmail.com>
On Mon, Aug 31, 2015 at 9:54 AM, Mikael Magnusson <mikachu@gmail.com> wrote:
> This lets you say
> % zle -P mywidget prototypewidget myfunction
> and it will work like zle -N mywidget myfunction except it will behave
> like prototypewidget in Various Ways™.
>
> ---
>
> I haven't tested this much (for completion functions, not at all) yet,
> but it works for the case in the current thread, see example at the
> bottom. Does it look overall sane? I'm not very sure on which/how/where
> all these flags are checked and set. The final argument should probably
> be optional and default to the first, like for zle -N, but zle -C doesn't
> seem to do that, and that's the code I mostly copied.
>
> I don't see any reason to change zle -N to call into zle -P internally though.
Here's the original thread, by the way.
http://www.zsh.org/mla/workers/2010/msg01000.html
--
Mikael Magnusson
next prev parent reply other threads:[~2015-08-31 7:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-30 21:59 Overriding a yank* widget in zle Wayne Davison
2010-12-31 6:39 ` Wayne Davison
2010-12-31 8:28 ` Bart Schaefer
2010-12-31 23:23 ` Wayne Davison
2015-08-31 7:54 ` PATCH: Implement zle -P Mikael Magnusson
2015-08-31 7:56 ` Mikael Magnusson [this message]
2015-08-31 9:55 ` PATCH: Set completion function flags correctly for " Mikael Magnusson
2015-08-31 10:17 ` Mikael Magnusson
2015-08-31 17:11 ` PATCH: Implement " Peter Stephenson
2015-09-01 6:23 ` Bart Schaefer
2015-09-01 6:50 ` Mikael Magnusson
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='CAHYJk3RU3C=A3N41gQ1xTVyryH28rChXaDLQ9dbfJjDYoEQU8A@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=zsh-workers@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).