Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Space or multiple spaces before command causes it to not get logged

0 views
Skip to first unread message

ro...@gouch.ihate.ms

unread,
May 24, 2012, 11:05:00 PM5/24/12
to bug-...@gnu.org, ba...@packages.debian.org
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall
uname output: Linux gouch.ihate.ms 3.2.0-24-virtual #38-Ubuntu SMP Tue May 1 16:38:34 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.2
Patch Level: 24
Release Status: release

Description:

Putting a space or multiple spaces before a command and executing it causes the command to not get logged to bash history file.


Repeat-By:

user@server:~$ pwd
/root
user@server:~$ history
1 pwd
2 history
user@server:~$ ls <------ Note the space before the command
user@server:~$ date
Fri May 25 02:59:43 UTC 2012
user@server:~$ history
1 pwd
2 history
3 date
4 history

Pierre Gaston

unread,
May 25, 2012, 2:32:25 AM5/25/12
to ro...@gouch.ihate.ms, bug-...@gnu.org, ba...@packages.debian.org
Probably a feature, check if the variable HISTCONTROL contains
"ignorespace" and the value of HISTIGNORE (printf %q\\n "$HISTIGNORE")

0 new messages