[Top][All Lists]

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

Re: tramp ( nil/nil); enable-bracketed-paste mode in inputrc b

From: Michael Albinus
Subject: Re: tramp ( nil/nil); enable-bracketed-paste mode in inputrc breaks tramp
Date: Sat, 27 Mar 2021 09:57:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Chris Chiappa <> writes:

Hi Chris,

> Something in my configuration recently changed and tramp broke.  The
> symptom was that the output getting retrieved from the remote system
> always seemed to have garbage control characters preceding it, ie:
> [?2004l"Linux 4.1.12-124.19.2.el7uek.x86_64"
> I eventually tracked it down to this in my .inputrc:
> set enable-bracketed-paste on
> It doesn't seem like there's an easy way from bash itself to turn off
> bracketed paste for "dumb" terminals, but I was able to do it from
> inputrc with:
> $if term=xterm
> set enable-bracketed-paste on
> $endif
> The emacswiki has some mention of zsh users having issues (ironically,
> one suggested workaround is to force tramp to use bash), but a mention
> of this might be useful.  Or maybe there is a way to get emacs to
> interpret the escape sequences so as not to confuse tramp?

Tramp tries to do its best. However, since it doesn't know which shell
runs remotely, there's not too much for general purpose.

If Tramp knows, which shell will run on the remote side, it will be more
specific. For bash, it will add "-noediting -norc -noprofile" to the
shell invocation, which should fix your problem. See variable

In order to let Tramp know which shell to use, set the connection
property "remote-shell", as described in the Tramp manual. For example,
you could say

--8<---------------cut here---------------start------------->8---
(add-to-list 'tramp-connection-properties
             (list "/ssh:slc16ilg:" "remote-shell" "/usr/bin/bash"))
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.

reply via email to

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