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 @@ -16,6 +16,7 @@ Internal
* Let CI ignore additional documentation files.
* Add a GitHub Issue template.
* Upgrade `cli_helpers` library to v2.10.0.
* Organize startup tips.


1.51.1 (2026/02/09)
Expand Down
92 changes: 58 additions & 34 deletions mycli/TIPS
Original file line number Diff line number Diff line change
@@ -1,43 +1,21 @@
set "less_chatty = True" in ~/.myclirc to turn off these tips!
###
### CLI arguments
###

set a fancy table format like "table_format = psql_unicode" in ~/.myclirc!
check your ~/.myclirc settings using the --checkup flag!

change the string for NULLs with "null_string = <null>" in ~/.myclirc!
###
### commands
###

interact with an LLM using the \llm command!

display query result vertically using \G at the end of a query!

copy a query to the clipboard using \clip at the end of the query!

\dt lists tables; \dt <table> describes <table>!

edit a query in an external editor using \e!

edit a query in an external editor using keystrokes control-x + control-e!

toggle smart completion using keystroke F2!

toggle multi-line mode using keystroke F3!

toggle vi mode using keystroke F4!

complete at cursor using the tab key!

prettify a query using keystrokes control-x + p!

un-prettify a query using keystrokes control-x + u!

insert the current date using keystrokes control-o + d!

insert the quoted current date using keystrokes control-o + control-d!

insert the current datetime using keystrokes control-o + t!

insert the quoted current date using keystrokes control-o + control-t!

search query history using keystroke control-r!

\f lists favorite queries; \f <name> executes a favorite!

\fs <name> <query> saves a favorite query!
Expand Down Expand Up @@ -88,18 +66,64 @@ use "system <command>" to execute a shell command!

the "watch" command executes a query every N seconds!

redirect query output to a shell command with "$| <command>"!
###
### general
###

redirect query output to a file with "$> <filename>"!
display query output vertically using \G at the end of a query!

append query output to a file with "$>> <filename>"!
###
### keystrokes
###

edit a query in an external editor using keystrokes control-x + control-e!

toggle smart completion using keystroke F2!

toggle multi-line mode using keystroke F3!

toggle vi mode using keystroke F4!

complete at cursor using the tab key!

prettify a query using keystrokes control-x + p!

un-prettify a query using keystrokes control-x + u!

insert the current date using keystrokes control-o + d!

insert the quoted current date using keystrokes control-o + control-d!

insert the current datetime using keystrokes control-o + t!

insert the quoted current date using keystrokes control-o + control-t!

search query history using keystroke control-r!

use keystroke control-g to cancel completion popups!

###
### myclirc options
###

set "less_chatty = True" in ~/.myclirc to turn off these tips!

set a fancy table format like "table_format = psql_unicode" in ~/.myclirc!

change the string for NULLs with "null_string = <null>" in ~/.myclirc!

choose a color theme with "syntax_style" in ~/.myclirc!

design a prompt with the "prompt" option in ~/.myclirc!

save passwords in the system keyring with "use_keyring" in ~/.myclirc!

check your ~/.myclirc settings using the --checkup flag!
###
### redirection
###

use keystroke control-g to cancel completion popups!
redirect query output to a shell command with "$| <command>"!

redirect query output to a file with "$> <filename>"!

append query output to a file with "$>> <filename>"!
2 changes: 2 additions & 0 deletions mycli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2240,6 +2240,8 @@ def tips_picker() -> str:
try:
with resources.files(mycli).joinpath('TIPS').open('r') as f:
for line in f:
if line.startswith("#"):
continue
if tip := line.strip():
tips.append(tip)
except FileNotFoundError:
Expand Down