Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@gtritchie
Copy link
Member

New user preference to control Console's handling of ANSI escape characters. I'm not happy with the wording of these in the UI, so suggestions welcome as always:

  1. Show ANSI Colors -- this is new default (at least at the moment) and converts ANSI style codes for colors, bold, etc. on Console output
  2. Remove ANSI codes -- this still parses the ANSI codes, if present, but discards them rather than applying any styles
  3. Ignore ANSI codes -- this is how RStudio 1.0 behaves; if ANSI codes are output to the console, they will be displayed as codes and not interpreted at all

Switching between these doesn't change anything already displayed, you need to refresh the IDE to have that happen, but will impact new output without refreshing.

Also added stub for server-side ANSI code processing; expect to implement this to have Notebooks deal with ANSI codes in published output (support them or at least strip them).

image

@jmcphers
Copy link
Member

Should we unset $TERM when this preference is not set to "Show ANSI colors"?

@jmcphers
Copy link
Member

It's probably good enough to just not set $TERM on startup if the option is set. To do this you'll need an accessor for the setting on the server (see https://github.com/rstudio/rstudio/blob/master/src/cpp/session/include/session/SessionUserSettings.hpp)

@gtritchie
Copy link
Member Author

Ah yes, I even had doing that (unset TERM) written down on a piece of paper in front of me, then forgot about it. Already added the accessor on the server side!

@gtritchie gtritchie merged commit be58a08 into master Apr 25, 2017
@gtritchie gtritchie deleted the feature/console-color-pref branch October 18, 2017 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants