Skip to content

Commit 246ce9d

Browse files
committed
Updated documentation
1 parent 0e70f06 commit 246ce9d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* Enhancements
88
* Added `silent_startup_script` option to `cmd2.Cmd.__init__()`. If `True`, then the startup script's
99
output will be suppressed. Anything written to stderr will still display.
10+
* cmd2 now uses pyreadline3 when running Python 3.8 or greater on Windows
1011

1112
## 1.4.0 (November 11, 2020)
1213
* Bug Fixes

docs/features/startup_commands.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,12 @@ like so::
6464
This text file should contain a :ref:`Command Script
6565
<features/scripting:Command Scripts>`. See the AliasStartup_ example for a
6666
demonstration.
67+
68+
You can silence a startup script's output by setting ``silent_startup_script``
69+
to True::
70+
71+
cmd2.Cmd.__init__(self, startup_script='.cmd2rc', silent_startup_script=True)
72+
73+
Anything written to stderr will still print. Additionally, a startup script
74+
cannot be silenced if ``allow_redirection`` is False since silencing works
75+
by redirecting a script's output to ``os.devnull``.

0 commit comments

Comments
 (0)