Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: A weird smart-insert-last-word bug
- X-seq: zsh-workers 43803
- From: Wayne Davison <wayne@xxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: A weird smart-insert-last-word bug
- Date: Wed, 7 Nov 2018 17:58:52 -0800
- Cc: Zsh list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=opencoder.net; h= mime-version:references:in-reply-to:from:date:message-id:subject :to:cc:content-type; s=opencoder.net; bh=TVAzTD3Oj6TXcQa5qxBZC0g 5LpU=; b=H88/pwwWZRXX5uEDZluGR4wMjXMp5iDbUX18SwTaGS7AVE1XC07H3ip J1XOB/OaaWYYBr8xzv1LQn9yCP8f6kDUz9QBWikinOFpLoIX1+lkZC/xPLSKRSUx onIvSpCM4Capbw2LNQKRRb8Hi7SFt4heWGwtaQsJrQbFGU92sJfY=
- In-reply-to: <CAH+w=7aRaOb2b1m+gcicTq7BgP=5DzZgwWYG+XGz7m3Od9-YHg@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAHSx_SuJv+dsGYbS2YO0ZUdmO6YGtVXjWHgFNhbnStwKk8mHCQ@mail.gmail.com> <CAH+w=7aRaOb2b1m+gcicTq7BgP=5DzZgwWYG+XGz7m3Od9-YHg@mail.gmail.com>
On Fri, Nov 2, 2018 at 5:37 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
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..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author