grep --color not working well with notebook #2385

Closed
tkf opened this Issue Sep 5, 2012 · 3 comments

Comments

Projects
None yet
3 participants
Contributor

tkf commented Sep 5, 2012

When you execute this in notebook

!echo spam egg | grep --color=auto spam

You will see

�[Kspam�[K egg

The part �[Kspam is in dark red. It's strange because other commands which uses ANSI color such as pygmentize work fine.

Contributor

tkf commented Sep 5, 2012

Thanks. So I guess this means you need extra handling in the JS client.

Contributor

bfroehle commented Sep 13, 2012

For anybody who wants to try this, the relevant bit of code is in IPython/frontend/html/notebook/static/js/utils.js.

@jfeser jfeser added a commit to jfeser/ipython that referenced this issue Apr 5, 2013

@jfeser jfeser Strip non color related ANSI escape sequences from notebook output.
This fixes issue #2385.
8b94edd

minrk closed this in d3b4926 Apr 6, 2013

@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

@jfeser jfeser Strip non color related ANSI escape sequences from notebook output.
This fixes issue #2385.
d1b82f1

@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

@minrk minrk Merge pull request #3136 from jfeser/8b94eddb4d15ce6f0c98675116d4609b…
…daaf99d9

Strip useless ANSI escape codes in notebook

ANSI color escape codes get handled specially by the notebook, but other kinds of codes just get printed out. Strip these codes out of the notebook output.

closes #2385
44201b8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment