tramp-devel
[Top][All Lists]
Advanced

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

Bug when connecting to busybox sh


From: Matthías Páll Gissurarson
Subject: Bug when connecting to busybox sh
Date: Fri, 20 May 2016 17:19:34 +0000

So I'm using docker-tramp.el to connect to a docker container running alpine linux. Which uses busybox's sh as the implementation for sh. It seems that busybox has a bug, causing it to output a control character (specifically ^[[6n) after the prompt. This renders me unable to connect to the shell, since tramp is constantly waiting on the output. I've implemented a fix for this by changing the `tramp-wait-for-output` function, specifically line #5000 in `tramp-sh.el` (as can be seen on the github emacs mirror at https://github.com/emacs-mirror/emacs/blob/master/lisp/net/tramp-sh.el#L5000) to read

```
  (regexp (format "[^#$\n]*%s\r?\\( \\[[0-9;]*[a-zA-Z]*\\)*$ (regexp-quote tramp-end-of-output)))
```

instead of 

```
  (regexp (format "[^#$\n]*%s\r?$" (regexp-quote tramp-end-of-output)))
```

i.e. to change the regex so that it allows control sequences at the end of the line (as well as the beginning).

I know this should rightfully be fixed in busybox itself, but I fail see why this fix couldn't be added to tramp itself, seeing as this might be a common error.


--
---
Matthías Páll Gissurarson

reply via email to

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