[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash command 'reset' in bind -x always fails
From: |
Greg Wooledge |
Subject: |
Re: Bash command 'reset' in bind -x always fails |
Date: |
Sun, 14 May 2023 20:29:16 -0400 |
On Mon, May 15, 2023 at 07:21:36AM +0700, Budi wrote:
> Why Bash command 'reset' inside bind -x or readline does error, how to
> do code that'd work to reset as normally ?
You need to give more details. What exactly did you do?
I did this:
unicorn:~$ bash
unicorn:~$ bind -x '"xxx":reset'
Then at the next shell prompt, I typed xxx and the screen was cleared
as expected, and a new shell prompt was produced.
One funny side effect was that after the screen was cleared and the new
shell prompt was displayed, I tried to recall the previous commands (in
order to write this email), and when I pressed ESC k, instead of acting
normally, it displayed ^[k at the shell prompt.
As it turns out, running *any* command (or even just pressing Enter with
an empty command) cleares this up, and ESC k and other command editing
works normally.
So... what problems did *you* experience when you tried whatever it is
that you tried?
And... why isn't Ctrl-L good enough? What were you trying to achieve
that Ctrl-L doesn't do?