Mercurial > public > mercurial-scm > hg-stable
diff tests/test-help.t @ 29070:29a7d591ff42
ui: add new config option for help text width
Before this patch, when printing help text using `hg help`, or `hg log -h`,
the output will wrap at 78 chars even if the user has a bigger terminal width
and there is no config option to change it, making the experience different
from the commonly used `man` tool.
This patch introduces a new config option `ui.textwidth`, which replaces the
hardcoded number. It's set to 78 by default to maintain compatibility. When
set to 0, `hg help` will behave more like `man`.
author | Jun Wu <quark@fb.com> |
---|---|
date | Wed, 04 May 2016 18:18:24 +0100 |
parents | eb017d52899d |
children | 5a3197cbe415 |
line wrap: on
line diff
--- a/tests/test-help.t Tue May 03 15:26:51 2016 +0000 +++ b/tests/test-help.t Wed May 04 18:18:24 2016 +0100 @@ -429,6 +429,22 @@ -h --help display help and exit --hidden consider hidden changesets +Test the textwidth config option + + $ hg root -h --config ui.textwidth=50 + hg root + + print the root (top) of the current working + directory + + Print the root directory of the current + repository. + + Returns 0 on success. + + (some details hidden, use --verbose to show + complete help) + Test help option with version option $ hg add -h --version