From: zsugabubus <zsugabubus@national.shitposting.agency>
To: zsh-workers@zsh.org
Subject: zle edit-command-line and send-break
Date: Wed, 5 Aug 2020 11:04:40 +0200 [thread overview]
Message-ID: <20200805090440.7mcsjqc2wa7frzo5@localhost> (raw)
Hello,
I would like to apply some transformation to $BUFFER before and after
editing it with `zle edit-command-line`.
Modifying $BUFFER before editing is trivial, however the after part is a
bit tricky since edit-command-line calls send-break. Currently I use the
following workaround to being able to execute custom code:
function send-break() {
zle -D send-break
unfunction send-break
read -z BUFFER
# ...do something with BUFFER...
zle redisplay
}
zle -N send-break
zle edit-command-line
It works fine, so I’m wondering why `zle send-break` is used inside
edit-command-line and whether `zle redisplay` could be used instead.
--
zsugabubus
reply other threads:[~2020-08-05 9:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200805090440.7mcsjqc2wa7frzo5@localhost \
--to=zsugabubus@national.shitposting.agency \
--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).