bug-bash
[Top][All Lists]
Advanced

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

history -r in .bashrc ignores HISTTIMEFORMAT


From: Georges Kesseler
Subject: history -r in .bashrc ignores HISTTIMEFORMAT
Date: Sat, 10 Jan 2015 18:52:23 +0100

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 -Werror=format-security -Wall
uname output: Linux flunder 3.11.0-15-generic #25-Ubuntu SMP Thu Jan 30 17:22:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

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

Description:
    "history -r" called inside .bashrc does not respect HISTTIMEFORMAT. Reads timestamps in as
        history entries. Calling "history -r" on a command prompt works as expected.

Repeat-By:
    Put the following into .profile / .bashrc
       HISTTIMEFORMAT=""
           lastfile="$(ls -rt history*)"
           history -r "$lastfile"
           HISTFILE=~/history$(date +%Y%m%d-%H%M%S)

        then start new shell, type some commands, exit
        start second shell, view history



reply via email to

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