##// END OF EJS Templates
ui: add new config option for help text width...
Jun Wu -
r29070:29a7d591 default
parent child Browse files
Show More
@@ -4567,7 +4567,10 b' def help_(ui, name=None, **opts):'
4567 Returns 0 if successful.
4567 Returns 0 if successful.
4568 """
4568 """
4569
4569
4570 textwidth = min(ui.termwidth(), 80) - 2
4570 textwidth = ui.configint('ui', 'textwidth', 78)
4571 termwidth = ui.termwidth() - 2
4572 if textwidth <= 0 or termwidth < textwidth:
4573 textwidth = termwidth
4571
4574
4572 keep = opts.get('system') or []
4575 keep = opts.get('system') or []
4573 if len(keep) == 0:
4576 if len(keep) == 0:
@@ -1737,6 +1737,13 b' User interface controls.'
1737 large organisation with its own Mercurial deployment process and crash
1737 large organisation with its own Mercurial deployment process and crash
1738 reports should be addressed to your internal support.
1738 reports should be addressed to your internal support.
1739
1739
1740 ``textwidth``
1741 Maximum width of help text. A longer line generated by ``hg help`` or
1742 ``hg subcommand --help`` will be broken after white space to get this
1743 width or the terminal width, whichever comes first.
1744 A non-positive value will disable this and the terminal width will be
1745 used. (default: 78)
1746
1740 ``timeout``
1747 ``timeout``
1741 The timeout used when a lock is held (in seconds), a negative value
1748 The timeout used when a lock is held (in seconds), a negative value
1742 means no timeout. (default: 600)
1749 means no timeout. (default: 600)
@@ -429,6 +429,22 b' Verbose help for add'
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
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)
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
General Comments 0
You need to be logged in to leave comments. Login now