Skip to contentSkip to conversation

Shell history w/ ASH spans multiple ash instances

Buildroot Eric Malkowski 2 participants 4 messages Feb 19, 2009

lore
Share & tools
lore
#0 lore raw

Hi all-

In the past, if multiple shells were started on console and ssh for instance, the command history was always unique per shell instance.

It seems the "ash" shell now likes to save history in /root/.ash_history
periodically? and at odd points, command history from one shell starts
showing up in another.
This gets very annoying when I'm trying to recall the last command I CTRL-C'd out of for instance, but I get the "top" of the history from some "other" shell instance.

I tried making /etc/profile and /root/.bashrc NOT set the env vars HISTSIZE and HISTFILESIZE, but ash still keeps writing stuff to /root/.ash_history and "polluting" history for my various shell instances.

I'm tempted to turn off CONFIG_FEATURE_EDITING_HISTORY and CONFIG_FEATURE_EDITING_SAVEHISTORY in the busybox config, but I still want to be able to use up-arrow in shells to get history -- I just don't want it being saved to .ash_history and loaded into the history of other shells -- just saving history to .ash_history when a shell exits is fine, it's this "live updating" of it I'd like to get rid of.

Any advice greatly appreciated.

BTW: I'm using busybox 1.13.2 per stock buildroot config.

-Eric Malkowski

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" == Eric Malkowski <[email protected]> writes:

Hi,

Eric> In the past, if multiple shells were started on console and ssh for Eric> instance, the command history was always unique per shell instance.

Eric> Any advice greatly appreciated.

Eric> BTW: I'm using busybox 1.13.2 per stock buildroot config.

Please direct busybox questions to the busybox list - busybox at busybox.net

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

I thought I'd try this list first since:

1. Busybox is an integral part of buildroot
2. buildroot's default config for busybox is in effect and if it's just a config thing, then it's good to know what's up.

To follow up briefly: In looking at the source in libbb it appears disabling CONFIG_FEATURE_EDITING_SAVEHISTORY will stop libbb from writing to ~/.ash_history
Older versions I've used had SAVEHISTORY enabled but didn't dynamically load it from various instances of interactive shells causing thr cross-shell history sharing -- perhaps this is a new "feature". I don't need the history saved and loaded constantly or on shell exit so I'll try turning that off.

Sorry for using the wrong list -- but at least you can see my reasoning for starting w/ the buildroot list.

If anything further is needed w/ this topic, I'll move over to the busybox list.

Thanks,

-Eric Malkowski

Quoted 15 lines · Peter Korsgaard
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Eric" == Eric Malkowski <[email protected]> writes:

Hi,

Eric> In the past, if multiple shells were started on console and ssh for Eric> instance, the command history was always unique per shell instance.

Eric> Any advice greatly appreciated.

Eric> BTW: I'm using busybox 1.13.2 per stock buildroot config.

Please direct busybox questions to the busybox list - busybox at busybox.net

#3 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" == Eric Malkowski <[email protected]> writes:

Hi,

Eric> To follow up briefly: In looking at the source in libbb it appears Eric> disabling CONFIG_FEATURE_EDITING_SAVEHISTORY will stop libbb from Eric> writing to ~/.ash_history
Eric> Older versions I've used had SAVEHISTORY enabled but didn't Eric> dynamically load it from various instances of interactive shells Eric> causing thr cross-shell history sharing -- perhaps this is a new Eric> "feature". I don't need the history saved and loaded constantly or on Eric> shell exit so I'll try turning that off.

Ok.

Eric> Sorry for using the wrong list -- but at least you can see my Eric> reasoning for starting w/ the buildroot list.

No problem, it's just that (even though there's a certain overlap between buildroot and busybox people) the busybox people normally know the finer details of their program better than we do.

Eric> If anything further is needed w/ this topic, I'll move over to the Eric> busybox list.

Thanks.

Signature · 1 line
Bye, Peter Korsgaard