On Sun, Jun 11, 2017 at 07:00:11PM -0600, gaze...@xmission.com wrote:
[...]
> Bash Version: 4.3
> Patch Level: 48
> Release Status: release
> 
> Description:
>       Multiline commands (i.e., a command with embedded newlines) do not 
> survive
>       intact when written out to the history file and then reloaded.

Have you tried bash 4.4?

See: http://lists.gnu.org/archive/html/bug-bash/2015-12/msg00202.html

  dualbus@debian:~$ history -c
  dualbus@debian:~$ declare -p HISTFILE HISTTIMEFORMAT
  declare -- HISTFILE="/tmp/zzz"
  declare -- HISTTIMEFORMAT="%s"
  dualbus@debian:~$ echo 'a
  > b
  > c'
  a
  b
  c
  dualbus@debian:~$ history -w
  dualbus@debian:~$ history -c; history -r; HISTTIMEFORMAT= history
      1  declare -p HISTFILE HISTTIMEFORMAT
      2  echo 'a
  b
  c'
      3  history -w

-- 
Eduardo Bustamante
https://dualbus.me/

Reply via email to