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
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Upcoming (TBD)
==============

Features
---------
* Makes short toolbar message show after initial prompt


1.62.0 (2026/03/07)
==============

Expand Down
2 changes: 1 addition & 1 deletion mycli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ def get_continuation(width: int, _two: int, _three: int) -> AnyFormattedText:
return [("class:continuation", continuation)]

def show_initial_toolbar_help() -> bool:
return iterations < 2
return iterations == 0

# Keep track of whether or not the query is mutating. In case
# of a multi-statement query, the overall query is considered
Expand Down
22 changes: 22 additions & 0 deletions test/test_clitoolbar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from prompt_toolkit.shortcuts import PromptSession

from mycli.clitoolbar import create_toolbar_tokens_func
from mycli.main import MyCli


def test_create_toolbar_tokens_func_initial():
m = MyCli()
m.prompt_app = PromptSession()
iteration = 0
f = create_toolbar_tokens_func(m, lambda: iteration == 0, m.toolbar_format)
result = f()
assert any("right-arrow accepts full-line suggestion" in token for token in result)


def test_create_toolbar_tokens_func_short():
m = MyCli()
m.prompt_app = PromptSession()
iteration = 1
f = create_toolbar_tokens_func(m, lambda: iteration == 0, m.toolbar_format)
result = f()
assert not any("right-arrow accepts full-line suggestion" in token for token in result)