I dunno, I hadn't really noticed this behaviour but now that you point
it out I kind of like it, apologist or not. It frequently annoys me with
bash that I lose $LONGCOMMAND I typed in one shell because I exited it,
it's nice to be able to search for and find it in existing shells as
well.

Maybe history should be merged, but in such a way that history from
other shells is always the last thing the current shell reaches for -
then you get the last thing in current shell if you navigate, but you
can still search for and find commands from other shells.

Still, I don't have time or inclination to work on it right now, and I
strongly suspect you're not going to try.

There has been a diff floating around to make the ksh history code
better for ages, I don't know if it changes the behaviour.


On Tue, Mar 13, 2012 at 09:53:00PM -0400, Hugo Villeneuve wrote:
> On Mon, Mar 12, 2012 at 01:03:54PM +0200, lilit-aibolit wrote:
> > 11.03.2012 21:43, Chris Bennett P?P8QP5Q:
> > >This started for me a while back.
> > >Login as root, I can repeat older commands with up down arrows.
> > >History command shows history.
> > >
> > >su -l otheruser
> > >
> > >Cannot use up down arrows to access history.
> > >History command shows correct history.
> > >
> > >Login remotely as otheruser.
> > >Same problem.
> > >
> > >Chris Bennett
> > >
> >
> > try to add this to your .profile:
> >
> > export HISTFILE=~/.sh_history
> >
> > and re-login.
> >
> > it is work for me and save all history after disconnect
> > and start new session.
>
> Has there been improvement in ksh's history file recently? Like
> since 5.0?
>
> Because last time I tried, it was unusable if you ran more than two
> session concurently, as both shell would use the same file directly
> which lead to odd behavior. Like you did up history in one shell,
> and you would see a command entered in the other one. Very wierd
> to grasp.
>
> (50+ OpenBSD's apologist will email me right back to tell me that
> it's a feature. It's not GNU's bash the standard. Things can be
> different.)

Reply via email to