[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash 5.0.2(1) multiline command in history bug
From: |
Jason Vas Dias |
Subject: |
bash 5.0.2(1) multiline command in history bug |
Date: |
Mon, 4 Feb 2019 08:22:38 +0000 |
Good day -
Under bash 4.4.23, with emacs history editing enabled, I can do:
$ echo '1
> 2
> 3
> '
1
2
3
$
and I can then press the <UP-ARROW> (move-up / history-previous) key,
and the same command, including embedded new lines in the arguments,
is echoed back to me, and I can press <RETURN> to repeat exactly that
command (scroll up in history and repeat last command).
Now, with bash-5.0.2, this capability is removed: scrolling up in
the history,
if the previous command had a multi-line argument, shows the multiline
argument folded, like:
$ echo '1 2 3 '
and, even worse, it has actually edited the command to remove the
new lines, so it runs a different command (without new lines)
when repeating a historical command - very bad! History is now
unreliable and broken in bash!
I use multi-line sed commands frequently, which bash 5.0.2 now
stores incorrectly in the history file and is incapable of repeating.
So bash-5.0.2 has been made essentially unusable for entering commands
that have arguments which contain new lines, and now edits
historical commands
unconditionally & automatically without user initiation of command editing.
Can either of these new behaviors be disabled in bash 5.0.2 ?
Thanks & Best Regards,
Jason Vas Dias
- bash 5.0.2(1) multiline command in history bug,
Jason Vas Dias <=