diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-01-29 11:37:09 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-01-29 11:37:09 -0500 |
commit | 246ce9de04e16b39c123a05426b90859af2a4251 (patch) | |
tree | 7f42c3c3e81d769d7680b9f1ba8740e9f807b079 | |
parent | 0e70f0621273dd5f98aa5fffc42a5cb56f97c760 (diff) | |
download | cmd2-git-misc.tar.gz |
Updated documentationmisc
-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``. |