diff --git a/changelog.md b/changelog.md index b509892c..0df3c1f5 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ Upcoming (TBD) Features --------- * Dynamic terminal titles based on prompt format strings. +* Ability to turn off the toolbar. Internal diff --git a/mycli/main.py b/mycli/main.py index a501ae85..3c57f31f 100755 --- a/mycli/main.py +++ b/mycli/main.py @@ -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: diff --git a/mycli/myclirc b/mycli/myclirc index 2daf1e78..b06c77a6 100644 --- a/mycli/myclirc +++ b/mycli/myclirc @@ -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. diff --git a/test/myclirc b/test/myclirc index 8c9f8105..d10b90ee 100644 --- a/test/myclirc +++ b/test/myclirc @@ -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.