[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash2.05 doesn't read $HISTFILE on startup if .bashrc contains history -
From: |
Markus Schwarzenberg |
Subject: |
bash2.05 doesn't read $HISTFILE on startup if .bashrc contains history -s |
Date: |
Tue, 27 Aug 2002 09:17:24 +0200 (MET DST) |
Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.7
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc'
-DCONF_OSTYPE='solaris2.7' -DCONF_MACHTYPE='sparc-sun-solaris2.7'
-DCONF_VENDOR='sun' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib
-I/sw/opensrc/include -O3
uname output: SunOS sund32 5.7 Generic_106541-20 sun4u sparc SUNW,Ultra-5_10
Machine Type: sparc-sun-solaris2.7
Bash Version: 2.05b
Patch Level: 0
Release Status: release
Description:
This is a correction of the bug report I sent yesterday:
It looks like bash2.05 doesn't read the contens of the history file
($HISTFILE) on startup if .bashrc contains commands
history -s <SOME STRING>
Repeat-By:
generate a synthetical history file "bash-histfile"
------- bash-histfile ------
test1
test2
------- end of bash-histfile ------
and a simple rc-file "bash-rc"
------- bash-rc ------
HISTFILE=$HOME/bash-histfile
echo reading bash-rc
history -s "Mark 1"
------- end of bash-rc ------
If bash 2.05b is started using
bash --rcfile bash-rc -i
one finds only one entry "Mark 1" in the history of the started shell.
However, if one tries the same with "history -s" commented out
the contens of bash-histfile can be found in the history as expected.
Fix:
(I'd rather call it workaround) Putting an explicit
history -r
at the end of .bashrc helps.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bash2.05 doesn't read $HISTFILE on startup if .bashrc contains history -s,
Markus Schwarzenberg <=