From: Wayne Davison <wayne@opencoder.net>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh list <zsh-workers@zsh.org>
Subject: Re: A weird smart-insert-last-word bug
Date: Wed, 7 Nov 2018 17:58:52 -0800 [thread overview]
Message-ID: <CAHSx_SvtHKzp2vR5cBGzP9=X1vAGM+Z_mTCujG9nonPyOvFx4Q@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7aRaOb2b1m+gcicTq7BgP=5DzZgwWYG+XGz7m3Od9-YHg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 816 bytes --]
On Fri, Nov 2, 2018 at 5:37 PM Bart Schaefer <schaefer@brasslantern.com>
wrote:
> Sorry, what is "zlewidget" exactly?
>
Oops. I got it from Peter a long time ago:
https://www.zsh.org/mla/users/2014/msg00270.html
My version has been modified to allow an empty KEY value to be able to
avoid the bindkey at the end:
function zlewidget # KEY WIDGET [FUNCTION]
{
# bindkey KEY to new WIDGET, possibly implemented by optional FUNCTION.
# FUNCTION defaults to WIDGET and will be marked for autoload -Uz.
# If KEY is an empty string, the bindkey call is skipped.
local key=$1
local widget=$2
local func=${3:-$2}
autoload -Uz $func
zle -N $widget $func
[[ -z $key ]] || bindkey $key $widget
}
Does this help? [... patch elided ...]
>
Yup, that works well for me. Thanks!
..wayne..
prev parent reply other threads:[~2018-11-08 2:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-03 0:03 Wayne Davison
2018-11-03 0:37 ` Bart Schaefer
2018-11-08 1:58 ` Wayne Davison [this message]
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='CAHSx_SvtHKzp2vR5cBGzP9=X1vAGM+Z_mTCujG9nonPyOvFx4Q@mail.gmail.com' \
--to=wayne@opencoder.net \
--cc=schaefer@brasslantern.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).