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 @@ -9,6 +9,7 @@ Features
* Optionally defer auto-completions until a minimum number of characters is typed.
* Make the completion interface more responsive using a background thread.
* Option to suppress control-d exit behavior.
* Better support Truecolor terminals.


Bug Fixes
Expand Down
2 changes: 2 additions & 0 deletions mycli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from prompt_toolkit.key_binding.key_processor import KeyPressEvent
from prompt_toolkit.layout.processors import ConditionalProcessor, HighlightMatchingBracketProcessor
from prompt_toolkit.lexers import PygmentsLexer
from prompt_toolkit.output import ColorDepth
from prompt_toolkit.shortcuts import CompleteStyle, PromptSession
import pymysql
from pymysql.constants.ER import HANDSHAKE_ERROR
Expand Down Expand Up @@ -1168,6 +1169,7 @@ def one_iteration(text: str | None = None) -> None:
editing_mode = EditingMode.EMACS

self.prompt_app = PromptSession(
color_depth=ColorDepth.DEPTH_24_BIT if 'truecolor' in os.getenv('COLORTERM', '').lower() else None,
lexer=PygmentsLexer(MyCliLexer),
reserve_space_for_menu=self.get_reserved_space(),
message=get_message,
Expand Down