Skip to content

Commit 052caa6

Browse files
authored
Merge branch 'master' into changelog_clarification
2 parents 26c140e + 6296d41 commit 052caa6

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## 0.9.26 (TBD, 2020)
2+
* Enhancements
3+
* Changed the default help text to make `help -v` more discoverable
24
* Breaking changes
35
* Renamed `locals_in_py` attribute of `cmd2.Cmd` to `self_in_py`
46
* The following public attributes of `cmd2.Cmd` are no longer settable at runtime by default:

cmd2/cmd2.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ def __init__(self, completekey: str = 'tab', stdin=None, stdout=None, *,
279279
# The multiline command currently being typed which is used to tab complete multiline commands.
280280
self._multiline_in_progress = ''
281281

282+
# Set the header used for the help function's listing of documented functions
283+
self.doc_header = "Documented commands (use 'help -v' for verbose/'help <topic>' for details):"
284+
282285
# The error that prints when no help information can be found
283286
self.help_error = "No help on {}"
284287

docs/features/help.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ Categorizing Commands
1212

1313
By default, the ``help`` command displays::
1414

15-
Documented commands (type help <topic>):
16-
========================================
15+
Documented commands (use 'help -v' for verbose/'help <topic>' for details):
16+
===========================================================================
1717
alias help ipy py run_pyscript set shortcuts
1818
edit history macro quit run_script shell
1919

2020
If you have a large number of commands, you can optionally group your commands
2121
into categories. Here's the output from the example ``help_categories.py``::
2222

23-
Documented commands (type help <topic>):
23+
Documented commands (use 'help -v' for verbose/'help <topic>' for details):
2424

2525
Application Management
2626
======================
@@ -90,7 +90,7 @@ Using the ``categorize()`` function:
9090
The ``help`` command also has a verbose option (``help -v`` or ``help
9191
--verbose``) that combines the help categories with per-command Help Messages::
9292

93-
Documented commands (type help <topic>):
93+
Documented commands (use 'help -v' for verbose/'help <topic>' for details):
9494

9595
Application Management
9696
================================================================================

docs/features/initialization.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ override:
108108
support commands that are only available during specific states of the
109109
application. This dictionary's keys are the command names and its values are
110110
DisabledCommand objects.
111+
- **doc_header**: Set the header used for the help function's listing of
112+
documented functions
111113
- **echo**: if ``True``, each command the user issues will be repeated to the
112114
screen before it is executed. This is particularly useful when running
113115
scripts. This behavior does not occur when running a command at the prompt.

docs/features/os.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ loop::
4949

5050
$ python examples/example.py help
5151

52-
Documented commands (type help <topic>):
53-
========================================
52+
Documented commands (use 'help -v' for verbose/'help <topic>' for details):
53+
===========================================================================
5454
alias help macro orate quit run_script set shortcuts
5555
edit history mumble py run_pyscript say shell speak
5656

0 commit comments

Comments
 (0)