Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Upcoming (TBD)
Features
---------
* Dynamic terminal titles based on prompt format strings.
* Ability to turn off the toolbar.


Internal
Expand Down
14 changes: 9 additions & 5 deletions mycli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1275,11 +1275,15 @@ def one_iteration(text: str | None = None) -> None:
query = Query(text, successful, mutating)
self.query_history.append(query)

get_toolbar_tokens = create_toolbar_tokens_func(
self,
show_initial_toolbar_help,
self.toolbar_format,
)
if self.toolbar_format.lower() == 'none':
get_toolbar_tokens = None
else:
get_toolbar_tokens = create_toolbar_tokens_func(
self,
show_initial_toolbar_help,
self.toolbar_format,
)

if self.wider_completion_menu:
complete_style = CompleteStyle.MULTI_COLUMN
else:
Expand Down
3 changes: 2 additions & 1 deletion mycli/myclirc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ prompt_continuation = '->'
#
# If \B is included, the additional content will begin on the next line. More
# lines can be added with \n. If \B is not included, the customized toolbar
# can be a single line.
# can be a single line. An empty value is the same as the default "\B". The
# special literal value "None" will suppress the toolbar from appearing.
toolbar = ''

# Use the same prompt format strings to construct a terminal tab title.
Expand Down
3 changes: 2 additions & 1 deletion test/myclirc
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ prompt_continuation = ->
#
# If \B is included, the additional content will begin on the next line. More
# lines can be added with \n. If \B is not included, the customized toolbar
# can be a single line.
# can be a single line. An empty value is the same as the default "\B". The
# special literal value "None" will suppress the toolbar from appearing.
toolbar = ''

# Use the same prompt format strings to construct a terminal tab title.
Expand Down