You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added flag to configure prompt-toolkit tab-completion style
This defaults to the columnar way. But a user can set it to CompleteStyle.READLINE_LIKE to get readline style tab completion.
Also:
- Renamed `include_bottom_toolbar` flag to just `bottom_toolbar`
- Renamed `_bottom_toolbar` method to `get_bottom_toolbar` which is a better name for it
- Updated `examples/hello_cmd2.py` to use readline style tab-completion
Copy file name to clipboardExpand all lines: docs/features/initialization.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ The `cmd2.Cmd` class provides a large number of public instance attributes which
25
25
Here are instance attributes of `cmd2.Cmd` which developers might wish to override:
26
26
27
27
-**always_show_hint**: if `True`, display tab completion hint even when completion suggestions print (Default: `False`)
28
+
-**bottom_toolbar**: if `True`, then a bottom toolbar will be displayed (Default: `False`)
29
+
-**complete_style**: style to display tab-completion hints in (from `CompleteStyle` options in `prompt-toolkit`)
28
30
-**broken_pipe_warning**: if non-empty, this string will be displayed if a broken pipe error occurs
29
31
-**continuation_prompt**: used for multiline commands on 2nd+ line of input
30
32
-**debug**: if `True`, show full stack trace on error (Default: `False`)
@@ -41,7 +43,6 @@ Here are instance attributes of `cmd2.Cmd` which developers might wish to overri
41
43
-**feedback_to_output**: if `True`, send nonessential output to stdout, if `False` send them to stderr (Default: `False`)
42
44
-**help_error**: the error that prints when no help information can be found
43
45
-**hidden_commands**: commands to exclude from the help menu and tab completion
44
-
-**include_bottom_toolbar**: if `True`, then a bottom toolbar will be displayed (Default: `False`)
45
46
-**last_result**: stores results from the last command run to enable usage of results in a Python script or interactive console. Built-in commands don't make use of this. It is purely there for user-defined commands and convenience.
46
47
-**macros**: dictionary of macro names and their values
47
48
-**max_completion_items**: max number of CompletionItems to display during tab completion (Default: 50)
0 commit comments