tramp-devel
[Top][All Lists]
Advanced

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

Re: Preventing TRAMP from writing duplicate entries to ~/.bash_history


From: Michael Albinus
Subject: Re: Preventing TRAMP from writing duplicate entries to ~/.bash_history
Date: Mon, 25 Nov 2013 13:58:59 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

SDS <address@hidden> writes:

> I've set up my ~/.bashrc initialization file to remove duplicates in the
> bash history list with
>
>> export HISTCONTROL="erasedups"
>
> but when TRAMP sends an ssh command, it writes to ~/.bash_history with
> the line
>
>> exec ssh -e none <hostname>
>
> without removing duplicates. Is there a way to prevent this? Ideally I'd
> like to prevent TRAMP commands from writing to bash history at all, but
> if that's not feasible then removing duplicates would be fine.
>
> Sorry if this is an elementary question, I'm inexperienced in these matters.

See the documentation of `tramp-remote-process-environment'. I guess the
following form in your .emacs would fit your needs:

(add-to-list 'tramp-remote-process-environment "HISTCONTROL=erasedups")

> Cheers,
>
> SDS

Best regards, Michael.



reply via email to

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