How to disable command line terminal colour and other text formatting?


Is there a way to disable all terminal colours and other text formatting functionality (thereby disabling the use of ascii character codes) when using the root REPL? For example, if I start a new instance of the REPL, and type the characters ‘int’, this text is made bold and coloured blue. Is it possible to disable this functionality and simply leave the text as it is?

I’ve tried the following:

  • export TERM=dumb before starting the REPL.
  • setting the rawInput variable in the REPL.
  • running in batch mode.
  • disabling the execution of logon/logoff macros.

ROOT Version: 6.26/00
Platform: Debian Linux
Compiler: 10.2.1

I have found a solution.

For those looking to do the same, you can modify the rootrc file as mentioned in section 2.7 of:

Specifically, within the rootrc file, there are the variables:

#Rint.TypeColor:          bold blue
#Rint.BracketColor:       bold green
#Rint.BadBracketColor:    bold red underlined
#Rint.PromptColor:        default
#Rint.TabComColor:        magenta

By un-commenting these lines and setting their values to default, the REPL will keep the current terminal colour.

1 Like