Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zle edit-command-line and send-break
- X-seq: zsh-workers 47295
- From: zsugabubus <zsugabubus@national.shitposting.agency>
- To: zsh-workers@xxxxxxx
- Subject: zle edit-command-line and send-break
- Date: Wed, 5 Aug 2020 11:04:40 +0200
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-08/20200805090440.7mcsjqc2wa7frzo5%40localhost>
- Authentication-results: zsh.org; iprev=pass (mail.cock.li) smtp.remote-ip=37.120.193.124; dkim=pass header.d=national.shitposting.agency header.s=mail header.a=rsa-sha256
- Delivery-date: Wed, 05 Aug 2020 09:09:35 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=national.shitposting.agency; s=mail; t=1596618288; bh=j391l6Q+v2DXp4dN+SrZLb25A3qAbm8p9u1989rda/o=; h=Date:From:To:Subject:From; b=dncN9WdC8SykT7CLnukquWVWx84/fIRwsXlf87zSQWRzlBCWh6tpnGgrKpxDI4xSL i6ZTcjZIYRIuAUktRW08ReD0A1Fb8ARF+ahnht6rHsTgeqRvFB4/P3noVeJp5UVHIL +v1FYGeI7Z2NRd7XbgpZ6esraR52LINCi83bMsHcfAyiICEebIlgSBRdSP+za2dxkv OnPoT03fx+huy4XvobfkzV02+SNxqGxkva1XJCzGxY1K+HvKantAu/4OlbR9biEOJP Gpt9intBft7e6NtktsxK0H5X6yzxd3Cwui9FpetD1dUM6QyvJymBuTrzmoCylUPYjG b6IFOZS0WyiFg==
- Envelope-to: archives@xxxxxxxxxxxx
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- Sender: Sympa Owner <sympa@xxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author