-
Notifications
You must be signed in to change notification settings - Fork 132
Refactored bottom toolbar and rprompt functionality. #1700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
fada72f
a9d52e1
5dbf068
1486c09
b7172ca
4706ed0
8db70c4
08cd919
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,6 @@ The `cmd2.Cmd` class provides a large number of public instance attributes which | |
|
|
||
| Here are instance attributes of `cmd2.Cmd` which developers might wish to override: | ||
|
|
||
| - **bottom_toolbar**: if `True`, then a bottom toolbar will be displayed (Default: `False`) | ||
| - **broken_pipe_warning**: if non-empty, this string will be displayed if a broken pipe error occurs | ||
| - **complete_in_thread**: if `True`, then completion will run in a separate thread (Default: `True`) | ||
| - **continuation_prompt**: used for multiline commands on 2nd+ line of input | ||
|
|
@@ -42,6 +41,8 @@ Here are instance attributes of `cmd2.Cmd` which developers might wish to overri | |
| - **disabled_commands**: commands that have been disabled from use. This is to support commands that are only available during specific states of the application. This dictionary's keys are the command names and its values are DisabledCommand objects. | ||
| - **echo**: if `True`, each command the user issues will be repeated to the screen before it is executed. This is particularly useful when running scripts. This behavior does not occur when running a command at the prompt. (Default: `False`) | ||
| - **editor**: text editor program to use with _edit_ command (e.g. `vim`) | ||
| - **enable_bottom_toolbar**: if `True`, enables a bottom toolbar while at the main prompt. (Default: `False`) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The newly added I think we should create a new section documenting This also applies to Alternatively, we could restore them to instance attributes stored in |
||
| - **enable_rprompt**: if `True`, enables a right prompt while at the main prompt. (Default: `False`) | ||
| - **exclude_from_history**: commands to exclude from the _history_ command | ||
| - **exit_code**: this determines the value returned by `cmdloop()` when exiting the application | ||
| - **help_error**: the error that prints when no help information can be found | ||
|
|
@@ -55,6 +56,7 @@ Here are instance attributes of `cmd2.Cmd` which developers might wish to overri | |
| - **py_bridge_name**: name by which embedded Python environments and scripts refer to the `cmd2` application by in order to call commands (Default: `app`) | ||
| - **py_locals**: dictionary that defines specific variables/functions available in Python shells and scripts (provides more fine-grained control than making everything available with **self_in_py**) | ||
| - **quiet**: if `True`, then completely suppress nonessential output (Default: `False`) | ||
| - **refresh_interval**: how often, in seconds, to automatically refresh the UI. (Default: 0.0) | ||
| - **scripts_add_to_history**: if `True`, scripts and pyscripts add commands to history (Default: `True`) | ||
| - **self_in_py**: if `True`, allow access to your application in _py_ command via `self` (Default: `False`) | ||
| - **settable**: dictionary that controls which of these instance attributes are settable at runtime using the _set_ command | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since
complete_in_thread,refresh_interval, andbottom_toolbarwere previously public instance attributes onCmd(and documented as such), removing them from the object instance will break downstream code that attempts to access or modify them. This should be explicitly noted in the breaking changes section ofCHANGELOG.md, e.g.:Alternatively, we could restore them to being instance attributes.