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 @@ -11,6 +11,7 @@ Features
Documentation
---------
* Spellcheck myclirc commentary.
* Better ordering for `/help` table.


2.2.0 (2026/07/11)
Expand Down
2 changes: 1 addition & 1 deletion mycli/packages/special/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def show_help(*_args) -> list[SQLResult]:
header = ["Command", "Shortcut", "Usage", "Description"]
result = []

for _, value in sorted(COMMANDS.items(), key=lambda x: str.casefold(x[0])):
for _, value in sorted(COMMANDS.items(), key=lambda x: str.casefold(x[0].removeprefix('\\').removeprefix('/'))):
if value.hidden:
continue
if value.aliases:
Expand Down
14 changes: 7 additions & 7 deletions test/features/fixture_data/help_commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,26 @@
+-----------------+----------+-----------------------------------+-------------------------------------------------------------+
| /bug | <null> | /bug | File a bug on GitHub. |
| /clip | <null> | /clip | <query>\clip | Copy query to the system clipboard. |
| /connect | /r | /connect [database] | Reconnect to the server, optionally switching databases. |
| /delimiter | <null> | /delimiter <string> | Change end-of-statement delimiter. |
| /dsn | <null> | /dsn <help|list|show|save|delete> | Manage saved DSNs. |
| /dt | <null> | /dt[+] [table] | List or describe tables. |
| /edit | /e | /edit <filename> | <query>\edit | Edit query with editor (uses $VISUAL or $EDITOR). |
| /exit | /q | /exit | Exit. |
| /f | <null> | /f [name [args..]] | List or execute favorite queries. |
| /fd | <null> | /fd <name> | Delete a favorite query. |
| /fs | <null> | /fs <name> <query> | Save a favorite query. |
| \g | <null> | <query>\g | Display query results (mnemonic: go). |
| \G | <null> | <query>\G | Display query results vertically. |
| /help | /? | /help [term] | Show this table, or search for help on a term. |
| /l | <null> | /l | List databases. |
| /llm | /ai | /llm [arguments] | Interrogate an LLM. See "/llm help". |
| /once | /o | /once [-o] <filename> | Append next result to an output file (overwrite using -o). |
| /pipe_once | /| | /pipe_once <command> | Send next result to a subprocess. |
| /timing | /t | /timing | Toggle timing of queries. |
| /connect | /r | /connect [database] | Reconnect to the server, optionally switching databases. |
| /delimiter | <null> | /delimiter <string> | Change end-of-statement delimiter. |
| /exit | /q | /exit | Exit. |
| /help | /? | /help [term] | Show this table, or search for help on a term. |
| /nopager | /n | /nopager | Disable pager; print to stdout. |
| /notee | <null> | /notee | Stop writing results to an output file. |
| /nowarnings | /w | /nowarnings | Disable automatic warnings display. |
| /once | /o | /once [-o] <filename> | Append next result to an output file (overwrite using -o). |
| /pager | /P | /pager [command] | Set pager to [command]. Print query results via pager. |
| /pipe_once | /| | /pipe_once <command> | Send next result to a subprocess. |
| /prompt | /R | /prompt <string> | Change prompt format. |
| /quit | /q | /quit | Quit. |
| /redirectformat | /Tr | /redirectformat <format> | Change the table format used to output redirected results. |
Expand All @@ -33,6 +32,7 @@
| /system | <null> | /system [-r] <command> | Execute a system shell command (raw mode with -r). |
| /tableformat | /T | /tableformat <format> | Change the table format used to output interactive results. |
| /tee | <null> | /tee [-o] <filename> | Append all results to an output file (overwrite using -o). |
| /timing | /t | /timing | Toggle timing of queries. |
| /use | /u | /use <database> | Change to a new database. |
| /warnings | /W | /warnings | Enable automatic warnings display. |
| /watch | <null> | /watch [seconds] [-c] <query> | Execute query every [seconds] seconds (5 by default). |
Expand Down
Loading