Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16753

multi-line command history does not work when new terminal opened

From Hyunho Cho <mug896@gmail.com>
Newsgroups gnu.bash.bug
Subject multi-line command history does not work when new terminal opened
Date 2020-08-16 15:39 +0900
Message-ID <mailman.2252.1597559994.2739.bug-bash@gnu.org> (permalink)
References <CAMMw470HN82r8UTcve49HeiYFYt7n1LZxCEU6o59S8Uh9xGTMg@mail.gmail.com>

Show all headers | View raw


Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2
-fdebug-prefix-map=/build/bash-a6qmCk/bash-5.0=.
-fstack-protector-strong -Wformat -Werror=format-security -Wall
-Wno-parentheses -Wno-format-security
uname output: Linux EliteBook 5.4.0-42-generic #46-Ubuntu SMP Fri Jul
10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 5.0
Patch Level: 17
Release Status: release

####################################################################


I have enabled the shell options for multi-line command history like this

shopt -s lithist
shopt -s cmdhist

and it works well in current terminal

bash$ history
 8651  echo history test 1
 8652  echo history test 2
 8653  echo history test 3
 8654  cat << EOF
111
222                              # multi-line command history works well
333
EOF

 8655  history

-----------------------------------------------------------------------------------

if i opened new terminal then the multi-line commands all changed to
single lines like this

bash$ history
 7819  echo history test 1
 7820  echo history test 2
 7821  echo history test 3
 7822  cat << EOF
 7823  111                                      # the multi-line
commands changed to single lines
 7824  222
 7825  333
 7826  EOF
 7827  history

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

multi-line command history does not work when new terminal opened Hyunho Cho <mug896@gmail.com> - 2020-08-16 15:39 +0900

csiph-web