[Bug 185] Add an option not to reload command line history with ash shell

bugzilla at busybox.net bugzilla at busybox.net
Sun May 10 12:56:49 UTC 2009


https://bugs.busybox.net/show_bug.cgi?id=185





--- Comment #16 from Lucas Maneos <busybox at subs.maneos.org>  2009-05-10 12:56:48 UTC ---
With bash 3.2.48:

- open a shell session and enter some commands:

$ PS1="1> "
1> cat .bash_history 
echo 1
echo 2
echo 3
exit
1> echo A
A
1> echo B
B
1> echo C
C

- leaving that running, open a second shell session and enter some more:

$ PS1="2> "
2> echo a
a
2> echo b
b
2> echo c
c

- Then, after exiting both sessions:

1> exit
2> exit

the contents of .bash_history are:

echo 1
echo 2
echo 3
exit
PS1="1> "
cat .bash_history 
echo A
echo B
echo C
exit
PS1="2> "
echo a
echo b
echo c
exit

So no one "wins", each shell only appends the new (ie entered by the user in
that session as opposed to loaded from previous history) commands to the
existing history as it is at the time the shell exits.  The only difference if
the other shell exits first is that lines 11-15 & 5-10 will be swapped.

Attachment 193 implements the same behaviour in ash.  Would you in principle
accept a similar patch against 1.14.0?

(BTW, I didn't mean to hijack Tuomas's report for this, if you prefer a
separate bug report for save_history that's fine with me).


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list