What are these characters?

I tried the coffee script repl inside Emacs (under ArchLinux) and I see these escape characters surrounding the tooltip:

[1Gcoffee> [0K[9G 

It should not be color, as I already included ansi-color-for-comint-mode . So will anyone recognize them?

PS: It's funny that I do not have this problem in my setup of Emacs + Cygwin!

+7
source share
2 answers

I don’t know where they come from (to do something with the shell tip, obviously, but it's hard to say more).

I read them as:

  • ESC [1G - Move to column 1 (Absolute cursor character)
  • ESC [0K - Erase Right
  • ESC [9G - go to column 9

It looks like a shell attempt to make sure the invitation is in the far left corner of the empty line. Not sure which shell you have, but zsh does something similar when the PROMPT_SP option is PROMPT_SP . I do not think it uses the above sequences.

Here you can find many, many, control sequences. Please note that the sequence “ ESC [ ” is interpreted as “Control Sequence Introducer” (CSI) and is displayed as such on this page.

+9
source

I had the same problem and I was able to solve it by adding

 export NODE_NO_READLINE=1 

to my .bashrc file.

So the characters seem to be taken from using CoffeeScript REPL in Readline. Perhaps the reason you didn't have a problem with Cygwin was because Readline was not available there.

+8
source

All Articles