Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable color and paging for mercurial

Tags:

mercurial

New versions of mercurial will apply colors to the output of most commands and will pipe commands with long output to a pager. How do I restore the old behavior to not color output and never use a pager?

like image 354
ngoldbaum Avatar asked Jul 03 '17 21:07

ngoldbaum


2 Answers

Add the following to your .hgrc:

[ui]
color = never
paginate = never
like image 135
ngoldbaum Avatar answered Nov 20 '22 12:11

ngoldbaum


When working with commandline, you can also add parameters or options to your commands. This is however not permanent. The hg --help --verbose reveals:

--color TYPE        when to colorize (boolean, always, auto, never, or debug)
--pager TYPE        when to paginate (boolean, always, auto, or never)
                    (default: auto)

So the next command disables your pager and does not show any colors:

hg incoming --pager never --color never
like image 32
Kurt Van den Branden Avatar answered Nov 20 '22 12:11

Kurt Van den Branden