2

When using eshell, if I run a command that outputs colored text, sometimes eshell will get 'stuck' in that color. For example if I use ack and press Ctrl+C before the output finishes this will happen. Is there something I can put in eshell-before-prompt-hook or elsewhere so that it will always close any left over coloring before drawing the prompt?

Edit: I've discovered that if I run "clear" (which which says is /usr/bin/clear, not an eshell builtin) the prompt goes bck to normal. Now if I could just automate this ;) I tried running (eshell-command "clear") in eshell-before-prompt-hook but it didn't help.

  • Unlike using shell in terminal, the Interrupt shortcut key is C-c C-c, and according to my test, if you type C-c twice quickly, the on-going process can be interrupted totally and the prompt won't be changed. – xuchunyang Dec 8 '15 at 17:00
  • @xuchunyang I am using C-c C-c, and in my tests the prompt is changed. I mentioned I'm using 'ack' specifically because I'm guessing it doesn't close colors when interrupted but other applications may be smart enough to. What app are you testing with? – Joseph Garvin Dec 14 '15 at 19:00
  • I don't remember, maybe 'ack', but I've just tried 'ack' and notice it happens, usually when there are too many matches, for example, 'ack emacs' in emacs git repo. – xuchunyang Dec 14 '15 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.