GNU bug report logs -
#28139
25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode
Previous Next
Reported by: Daniel Pittman <slippycheeze <at> google.com>
Date: Fri, 18 Aug 2017 15:34:01 UTC
Severity: normal
Found in version 25.2
Fixed in version 26.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 28139 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Aug 21, 2017 at 11:45 AM, Michael Albinus <michael.albinus <at> gmx.de>
wrote:
>
> Well, we have `tramp-sh-extra-args' for ages. But this doesn't work
> usually, because I don't know a bullet-proof way to detect a bash shell
> prior invocation, unless "*bash" is called.
>
*nod* The best I can think of, since we already have the "outer" shell,
would be to invoke `/bin/sh --version -c exit`, which should work on any
basic posix shell, and will emit a bash version string for bash, then wait
for the prompt, and scan the output for the appropriate version data.
Let me contemplate about. With Emacs 26 / Tramp 2.3, we have
> connection-local variables. Maybe we could use it for your case.
>
FWIW, I already extend `tramp-actions-before-shell`, so something similarly
low level would be fine by me, to handle the custom stuff.
However, `ansi-color-filter-region` and friends from the shipped ANSI
SGR->face handling library can strip all control sequences out of a region,
or string, and might be useful here; that would allow TRAMP to become
insensitive to ANSI control codes injected anywhere into the output, which
will also fix the next time a shell decides to add some additional terminal
integration like bracketed paste mode.
If you want to apply this to streaming output, because that will rewrite
the buffer fragment with a smaller number of characters in the presence of
control codes, throw a marker at your endpoint, and retrieve the position
after the stripping, to avoid getting confused about the new offset.
[Message part 2 (text/html, inline)]
This bug report was last modified 7 years and 283 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.