comparison 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
comparison
equal deleted inserted replaced
29069:e2a1648a6ce7 29070:29a7d591ff42
426 --time time how long the command takes 426 --time time how long the command takes
427 --profile print command execution profile 427 --profile print command execution profile
428 --version output version information and exit 428 --version output version information and exit
429 -h --help display help and exit 429 -h --help display help and exit
430 --hidden consider hidden changesets 430 --hidden consider hidden changesets
431
432 Test the textwidth config option
433
434 $ hg root -h --config ui.textwidth=50
435 hg root
436
437 print the root (top) of the current working
438 directory
439
440 Print the root directory of the current
441 repository.
442
443 Returns 0 on success.
444
445 (some details hidden, use --verbose to show
446 complete help)
431 447
432 Test help option with version option 448 Test help option with version option
433 449
434 $ hg add -h --version 450 $ hg add -h --version
435 Mercurial Distributed SCM (version *) (glob) 451 Mercurial Distributed SCM (version *) (glob)