Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Hiding Zsh bindkey -s echo of commands
- X-seq: zsh-users 29147
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Budi <budikusasi@xxxxxxxxx>
- Cc: zsh-users@xxxxxxx
- Subject: Re: Hiding Zsh bindkey -s echo of commands
- Date: Wed, 16 Aug 2023 17:14:16 +0200
- Archived-at: <https://zsh.org/users/29147>
- In-reply-to: <CAH0GyZDbOQxUNEuh=+OZ=U3F3JCNdyYVj9izEYUGp90e9c8mQA@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAH0GyZDbOQxUNEuh=+OZ=U3F3JCNdyYVj9izEYUGp90e9c8mQA@mail.gmail.com>
On Wed, Aug 16, 2023 at 4:00 PM Budi <budikusasi@xxxxxxxxx> wrote:
>
> How to hide Zsh bindkey -s group of commands echos when being invoked,
> so this'd behave or perform like Bash' bind -x ?
Something like this should do it:
function bind-x() {
local widget=bind-x-widget-$2
functions[$widget]='zle -I; '$2' <"$TTY"'
zle -N "$widget"
bindkey "$1" "$widget"
}
# Readline equivalent: bind -x '"\C-T": echo hello'
bind-x '^T' 'echo hello'
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author