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 @@ -13,6 +13,7 @@ Bug Fixes
* Better respect case when `keyword_casing` is `auto`.
* Let favorite queries contain special commands.
* Render binary values more consistently as hex literals.
* Offer format completions on special command `\Tr`/`redirectformat`.


1.47.0 (2026/01/24)
Expand Down
4 changes: 2 additions & 2 deletions mycli/packages/completion_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def suggest_special(text: str) -> list[dict[str, Any]]:
if cmd in ("\\u", "\\r"):
return [{"type": "database"}]

if cmd in ("\\T"):
if cmd in (r'\T', r'\Tr'):
return [{"type": "table_format"}]

if cmd in ["\\f", "\\fs", "\\fd"]:
Expand Down Expand Up @@ -354,7 +354,7 @@ def suggest_based_on_last_token(
# "\c <db", "use <db>", "DROP DATABASE <db>",
# "CREATE DATABASE <newdb> WITH TEMPLATE <db>"
return [{"type": "database"}]
elif token_v == "tableformat":
elif token_v in ("tableformat", "redirectformat"):
return [{"type": "table_format"}]
elif token_v.endswith(",") or is_operand(token_v) or token_v in ["=", "and", "or"]:
original_text = text_before_cursor
Expand Down