bug-bash
[Top][All Lists]
Advanced

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

'bash +o history' to disable history has no visible effect as of v4.4


From: Alex Kerzner
Subject: 'bash +o history' to disable history has no visible effect as of v4.4
Date: Sun, 25 Aug 2019 14:38:58 -0400

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security
uname output: Linux arch-desktop 5.2.7-zen1-1-zen #1 ZEN SMP PREEMPT
Wed Aug 7 01:55:52 UTC 2019 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

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

Description:

`bash +o history` no longer works as expected - that is, it doesn't
disable history - both in-memory history and saved-to-file history.
Occurs in bash 4.4 and later.
Rudimentary test results:
4.2.53(1)-release : pass
4.3.0(1)-release : pass
4.3.30(1)-release : pass
4.3.48(1)-release : pass
4.4.0(1)-release : fail
4.4.12(1)-release : fail
4.4.18(1)-release : fail
5.0.0(1)-release : fail
5.0.9(1)-release : fail

 - Alex Kerzner

Repeat-By:

~~~
# Long way, but potentially easier to implement a test case for
bash +o history # attempt to start a new shell with history disabled
set -o | grep history # See that history is still on
~~~

~~~
# Short way, a sweet and simple method
bash +o history -i -c 'set -o | grep history'
~~~

In both cases:
Expected: 'history    off' printed; command not sent to history file
(if shell is interactive, etc.)
Actual: 'history    on' printed; command sent to history file (if
shell is interactive, etc.)



reply via email to

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