Closed mikefaille closed 8 years ago
Hello,
Those are color escape code... can you explain exactly what you do to trigger this?
For example, if I select the unbutu:latest image and press R R bash RET
I enter a bash prompt, and then type ls -alh --color
it works fine...
That said, I agree that the current implementation is to simple. See #7 for what will probably happen in the future.
Ah, I use https://github.com/bbatsov/solarized-emacs as theme.
My ubuntu promt : http://pastebin.com/9DNGzUgR
I think I found the issue... Please try this:
(ansi-color-for-comint-mode-on)
Inside your .emacs file.
If that fixes it for you, I'll make a commit.
It dont work. I had (ansi-color-for-comint-mode-on) in my ~/.emacs.d/init.el Recompile this file. Restart emacs.
And, when I docker exec, it dont work :-/
I tried M-: command to exec (ansi-color-for-comint-mode-on) in same docker tty buffer too.
If you want a preview : http://postimg.org/image/wfqxnq10p/
Hum, if I tap
instead of : http://pastebin.com/gtkHBb2n
Weird. What is your emacs version?
Can't you try the following steps and report:
emacs -Q
from a terminalm
R R bash RET
Also, I see from your screenshot that sometimes it works sometimes not. Try typing "reset" and "clear" when that happens to see if it repairs it.
Crap, it work better.
]0;root@b4fea5b723d0: /root@b4fea5b723d0:/#
]0;root@b4fea5b723d0: /root@b4fea5b723d0:/# ls
ls
bin dev home lib64 mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
]0;root@b4fea5b723d0: /root@b4fea5b723d0:/#
]0;root@b4fea5b723d0: /root@b4fea5b723d0:/# ls
ls
bin dev home lib64 mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
]0;root@b4fea5b723d0: /root@b4fea5b723d0:/# ps aux
ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.2 0.0 18172 3328 ? Ss 18:46 0:00 bash
root 17 0.0 0.0 15572 2164 ? R+ 18:46 0:00 ps aux
]0;root@b4fea5b723d0: /root@b4fea5b723d0:/#
Hum, what is your PROMPT? is your shell bash?
Yes, this is the default bash from ubuntu:latest
Weird. What is your emacs version?
Can you answer this? :)
Heh^ Compiled from master : GNU Emacs 25.0.50.4 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2) of 2015-05-03
Haha! I was able to reproduce the weirdness!
Basically, only ubuntu:latest
misbehave... fedora:latest
or debian:jessie
behave fine
I'll investiguate, but it looks like a PS1
issue.
Allright ! Did you check centos:7 too ? That was my 1st test.
Yep, same problem.
Okay... the problem is pretty funny and I'm not sure how to solve it "the right way".
Basically, PS1
is set like if the terminal had full color support. This is logical because docker run
emulates a terminal... and then it is displayed inside emacs which doens't have full color support.
The simplest fix right now is to type the following inside the bash session:
export PS1="${debian_chroot:+($debian_chroot)}\u@\h:\w\$ "
Other workaround:
export TERM=dumb; bash
Or from withing docker-run:
R R sh -c "export TERM=dumb bash" RET
Ok, simply use the following when running images:
R =e TERM=dumb RET R
I'll test it. Thank you !
This is what I see when I try to have an interactive output.
http://pastebin.com/gtkHBb2n
(github markdown interpret these characters chains ...)