diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | docs/features/startup_commands.rst | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bb30141..582a4d7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Enhancements * Added `silent_startup_script` option to `cmd2.Cmd.__init__()`. If `True`, then the startup script's output will be suppressed. Anything written to stderr will still display. + * cmd2 now uses pyreadline3 when running Python 3.8 or greater on Windows ## 1.4.0 (November 11, 2020) * Bug Fixes diff --git a/docs/features/startup_commands.rst b/docs/features/startup_commands.rst index aaaf7722..f105054b 100644 --- a/docs/features/startup_commands.rst +++ b/docs/features/startup_commands.rst @@ -64,3 +64,12 @@ like so:: This text file should contain a :ref:`Command Script <features/scripting:Command Scripts>`. See the AliasStartup_ example for a demonstration. + +You can silence a startup script's output by setting ``silent_startup_script`` +to True:: + + cmd2.Cmd.__init__(self, startup_script='.cmd2rc', silent_startup_script=True) + +Anything written to stderr will still print. Additionally, a startup script +cannot be silenced if ``allow_redirection`` is False since silencing works +by redirecting a script's output to ``os.devnull``. |