command line not saved after "event not found" error

2022-02-20 Thread Andrea Monaco
Hello, on my bash 5.0.3, when I input $ foo!\ I get "bash: !\: event not found", which I think is appropriate, but the line doesn't get saved in history. The same doesn't happen for other errors, for example "command not found". Is this behavior intended? Let me know, Andrea Monaco

Re: command line not saved after "event not found" error

2022-02-20 Thread Greg Wooledge
On Sun, Feb 20, 2022 at 05:38:06PM +0100, Andrea Monaco wrote: > on my bash 5.0.3, when I input > > $ foo!\ > > I get "bash: !\: event not found", which I think is appropriate, but the > line doesn't get saved in history. The same doesn't happen for other > errors, for example "command not fou

Feature Request: Allow compgen to store results on a variable

2022-02-20 Thread konsolebox
Commonly `readarray -t`, a pipe, and a subshell is used to get the results of compgen but this has two problems: - It uses a pipe and a subshell - Values having newlines will be split Those can be prevented if another option is added. E.g.: compgen -O array_var ... -- konsolebox

Feature Request: Add option to make completed values always become properly escaped

2022-02-20 Thread konsolebox
It's difficult to make values like 'release[remote]' to become properly quoted or escaped because if the current word starts with a quote (which can be a ', a ", or a $'), a manually quoted COMPREPLY value like release\[remote\] will make the completed value include the backslashes (e.g. 'release\[

Re: command line not saved after "event not found" error

2022-02-20 Thread Chet Ramey
On 2/20/22 11:38 AM, Andrea Monaco wrote: on my bash 5.0.3, when I input $ foo!\ I get "bash: !\: event not found", which I think is appropriate, but the line doesn't get saved in history. The same doesn't happen for other errors, for example "command not found". Is this behavior intended

Re: command line not saved after "event not found" error

2022-02-20 Thread Andreas Kusalananda Kähäri
On Sun, Feb 20, 2022 at 05:38:06PM +0100, Andrea Monaco wrote: > > Hello, > > > on my bash 5.0.3, when I input > > $ foo!\ > > I get "bash: !\: event not found", which I think is appropriate, but the > line doesn't get saved in history. The same doesn't happen for other > errors, for exampl