Skip to content

Commit

Permalink
Add the parameter 'page_help' at the root of the configuration allowi…
Browse files Browse the repository at this point in the history
…ng to page help.

This is done by replacing the value of the default 'help' action by the object
use by the 'page_help' action ('HelpPager').
  • Loading branch information
fmenabe committed May 6, 2016
1 parent 85f5f49 commit 9454f7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clg.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,10 @@ def __init__(self, config, keyword='command', deepcopy=True):
self._parsers = OrderedDict()
self.parser = None

# Allows to page to all helps by replacing the default 'help' action.
if self.config.pop('page_help', False):
ACTIONS.update(help=HelpPager)

# Manage the case when we want a help command that prints a description
# of all commands.
self.help_cmd = self.config.pop('add_help_cmd', False)
Expand Down

0 comments on commit 9454f7a

Please sign in to comment.