Re: Switching from tcsh to bash as an interactive shell
From: P.T. Breuer (ptb_at_oboe.it.uc3m.es)
Date: Sun, 19 Sep 2004 23:03:50 GMT
Chris F.A. Johnson <email@example.com> wrote:
> On 2004-09-19, P.T. Breuer wrote:
> > P.T. Breuer <firstname.lastname@example.org> wrote:
> >> And I keep forgetting to mention, uh, what I keep forgetting.
> > Oh yes. I keep forgetting to mention that all these people who witter
> > on about their marvellous history in bash, LOSE their history as soon
> > as they log out of a bash shell that doesn't share the same history.
> > I.e. don't open two bash shells at once, folks.
I beg your pardon? Is your name Barney Scrotus?
> I usually have 3 or 4 open on my desktop machine; I don't lose
The last you close will determine which "latest" history you record.
Let's expand ..
Are you perhaps suggesting that the shell append to it throughout
instead of only at shell termination? Tough - the previous or parallel
shells also had the file open for writing, and your commands will be all
mixed up inside if they are all writing at the end all the time. So the
order will be wrong.
> > (or two tcsh shells, since the same thing will happen in tcsh ...)
> It's probably as easy to avoid losing it in tcsh as it is in
> bash. (Or maybe it isn't, and that's another reason for not using
It's impossible, due to natural laws, causality, etc. etc. You are
trying to write a linear sequence of commands. However, the real trace
of your commands is a forking tree. As soon as you launch another
shell, the trace forks. Then you have the problem of choosing HOW th
etree should be linearized.
OK - so what do you choose? The longest trace? That loses the rest. How
about interleaving the traces in some way? Well, that will wreck
command order. How about interleaving segmentwise (maintain order
imbetween branch points)? Tough, but the segments get interleaved.
And then which commands fall off the start of the history file first? Why
not set your history length to "5" and make a quick test. You'll find
the last shell to close has the commands retained, nothing else does.