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

bugzilla at busybox.net bugzilla at busybox.net
Sun May 17 15:27:09 UTC 2009


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


Lucas Maneos <busybox at subs.maneos.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #193 is|0                           |1
           obsolete|                            |




--- Comment #18 from Lucas Maneos <busybox at subs.maneos.org>  2009-05-17 15:27:07 UTC ---
Created an attachment (id=335)
 --> (https://bugs.busybox.net/attachment.cgi?id=335)
patch against 1.14.0 ash to load/save history only at start/exit time

(In reply to comment #17)
> This is not fair. If sessions were long, user which exited last has his
> commands easy to retrieve, whereas previous user has to press up arrow key
> zillions of times. Why? Because he exited two seconds before first one?

Right, I see what you mean.  There's no correct answer since there's no
official specification on how concurrent shells' history writes are supposed to
behave :-| In bash at least, readline's reverse-search-history and friends make
life much easier when you want to retrieve an older session's commands quickly.

There is value in preserving each session's command history order though. 
After a bit more testing I confess I found the 1.14.0 interleaving behaviour
confusing (commands not being where expected in the history relative to other
commands), and as it is it wouldn't be possible to usefully implement features
like fc or operate-and-get-next later.

Anyway, here's a patch against 1.14.0.  It hasn't been tested exhaustively but
seems to work ok so far, comments welcome.


-- 
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