diff options
| author | kotfu <kotfu@kotfu.net> | 2023-01-30 17:55:16 -0700 |
|---|---|---|
| committer | kotfu <kotfu@kotfu.net> | 2023-01-30 17:55:16 -0700 |
| commit | f9ec31970e30d9bfe64ab0af170cde01ad4eab37 (patch) | |
| tree | 29d84e4140fec5c88b497805525e8839b5b70eb1 /docs/features | |
| parent | 8779cca4ab23a244aefe2631e3cdd31b08e164e8 (diff) | |
| download | cmd2-git-f9ec31970e30d9bfe64ab0af170cde01ad4eab37.tar.gz | |
Add documentation for allow_clipboard attribute
Diffstat (limited to 'docs/features')
| -rw-r--r-- | docs/features/clipboard.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/features/clipboard.rst b/docs/features/clipboard.rst index 73e206c2..a4b9cdf2 100644 --- a/docs/features/clipboard.rst +++ b/docs/features/clipboard.rst @@ -25,6 +25,14 @@ contents of the clipboard by ending the command with two greater than symbols: Developers ---------- +You can control whether the above user features of adding output to the +operating system clipboard are allowed for the user by setting the +:attr:`~cmd2.Cmd.allow_clipboard` attribute. The default value is ``True``. +Set it to ``False`` and the above functionality will generate an error +message instead of adding the output to the clipboard. +:attr:`~cmd2.Cmd.allow_clipboard` can be set upon initialization, and you can +change it at any time from within your code. + If you would like your ``cmd2`` based application to be able to use the clipboard in additional or alternative ways, you can use the following methods (which work uniformly on Windows, macOS, and Linux). |
