bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiline commands do not survive history -w/-r


From: Eduardo Bustamante
Subject: Re: Multiline commands do not survive history -w/-r
Date: Sun, 11 Jun 2017 23:11:52 -0500
User-agent: NeoMutt/20170113 (1.7.2)

On Sun, Jun 11, 2017 at 07:00:11PM -0600, gazelle@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

[Prev in Thread] Current Thread [Next in Thread]