[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp smashes my .bash_history file

From: Skip Montanaro
Subject: Re: tramp smashes my .bash_history file
Date: Tue, 21 Oct 2003 11:08:39 -0500

    Tim> And I can see why it only affects users of Solaris/OSF etc -
    Tim> bsaically, anything where sh is not a symlink to bash:

    Tim> Here's the login sequence:
    Tim> $ # Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1'
    Tim> $ HISTFILE=$HOME/.tramp_history; HISTSIZE=1
    Tim> So my /bin/sh doesn't do tilde expansion, so tramp tries again with
    Tim> bash.  But it forgets all the settings we made earlier, because
    Tim> they weren't exported. This holds for all the settings - and given
    Tim> that some things were unset, perhaps we should just repeat
    Tim> everything we just did after starting the new shell, rather than
    Tim> exporting things left right and centre?

Adding the necessary export command seems to have helped substantially.  Now
the only (very minor) pollution of .bash_history is this line (one per

    exec env 'ENV=' 'PS1=$ ' /bin/sh

It doesn't appear necessary to repeat the unset commands.  Using Kai's
(process-send-string) suggestion I executed

    (process-send-string nil "env\n")

and didn't see a MAIL environment variable, though there is one in my normal
login environment on the machine in question.

Thanks for the help.  After using bash for several years, I've become very
reliant on my history file and use it as a crude alias repository.  Having
all my "aliases" disappear after a moderate tramp session was a bit

Skip Montanaro
Got gigs?

Got spam?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]