summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2021-04-27 15:41:06 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2021-04-27 15:41:06 -0400
commit223f8c55df0e3b520f53adcf07d51498d4263f7c (patch)
tree77866be585e3fda8f646dd90be6b701b4f2461c1 /cmd2/cmd2.py
parentbdd831681d4b9d4202b15157c801a988ccec33df (diff)
downloadcmd2-git-silence_startup_script.tar.gz
Renamed silent_startup_script to silence_startup_script for claritysilence_startup_script
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 6702d1a7..e5dcca83 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -219,7 +219,7 @@ class Cmd(cmd.Cmd):
persistent_history_file: str = '',
persistent_history_length: int = 1000,
startup_script: str = '',
- silent_startup_script: bool = False,
+ silence_startup_script: bool = False,
include_py: bool = False,
include_ipy: bool = False,
allow_cli_args: bool = True,
@@ -241,8 +241,8 @@ class Cmd(cmd.Cmd):
:param persistent_history_length: max number of history items to write
to the persistent history file
:param startup_script: file path to a script to execute at startup
- :param silent_startup_script: if ``True``, then the startup script's output will be
- suppressed. Anything written to stderr will still display.
+ :param silence_startup_script: if ``True``, then the startup script's output will be
+ suppressed. Anything written to stderr will still display.
:param include_py: should the "py" command be included for an embedded Python shell
:param include_ipy: should the "ipy" command be included for an embedded IPython shell
:param allow_cli_args: if ``True``, then :meth:`cmd2.Cmd.__init__` will process command
@@ -398,7 +398,7 @@ class Cmd(cmd.Cmd):
startup_script = os.path.abspath(os.path.expanduser(startup_script))
if os.path.exists(startup_script):
script_cmd = f"run_script {utils.quote_string(startup_script)}"
- if silent_startup_script:
+ if silence_startup_script:
script_cmd += f" {constants.REDIRECTION_OUTPUT} {os.devnull}"
self._startup_commands.append(script_cmd)