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 /docs | |
parent | 0e70f0621273dd5f98aa5fffc42a5cb56f97c760 (diff) | |
download | cmd2-git-246ce9de04e16b39c123a05426b90859af2a4251.tar.gz |
Updated documentationmisc
Diffstat (limited to 'docs')
-rw-r--r-- | docs/features/startup_commands.rst | 9 |
1 files changed, 9 insertions, 0 deletions
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``. |