Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16380 > unrolled thread
| Started by | "James D. Lin" <jamesdlin@gmail.com> |
|---|---|
| First post | 2020-06-13 15:17 -0700 |
| Last post | 2020-06-13 15:17 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Changes to HISTIGNORE are not honored when changed via a reference? "James D. Lin" <jamesdlin@gmail.com> - 2020-06-13 15:17 -0700
| From | "James D. Lin" <jamesdlin@gmail.com> |
|---|---|
| Date | 2020-06-13 15:17 -0700 |
| Subject | Changes to HISTIGNORE are not honored when changed via a reference? |
| Message-ID | <mailman.1854.1592093058.2541.bug-bash@gnu.org> |
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2
-fdebug-prefix-map=/build/bash-2bxm7h/bash-5.0=.
-fstack-protector-strong -Wformat -Werror=format-security -Wall
-Wno-parentheses -Wno-format-security
uname output: Linux debian 4.19.0-9-amd64 #1 SMP Debian
4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 5.0
Patch Level: 3
Release Status: release
Description:
If I modify the `HISTIGNORE` variable indirectly through a reference (e.g.
via `declare -n` or `local -n`), `HISTIGNORE` reflects the change, but the
change isn't honored.
Repeat-By:
$ HISTIGNORE=ls
$ history -c
$ ls
$ history
1 history
`ls` is not listed, and `history` is, as expected.
$ declare -n historyref=HISTIGNORE
$ historyref=ls:history
$ echo $HISTIGNORE
ls:history
$ history -c
$ history
1 history
`history` is still listed, despite being included by `HISTIGNORE`.
$ HISTIGNORE=$HISTIGNORE
$ history -c
$ history
Now nothing is printed, as expected.
- James
Back to top | Article view | gnu.bash.bug
csiph-web