From 8f59479cab5efe6364c43d1b17d2e0fdb862f862 Mon Sep 17 00:00:00 2001 From: Roland Walker Date: Tue, 10 Feb 2026 06:21:48 -0500 Subject: [PATCH] organize startup tips into sections to better keep track of what needs to be added --- changelog.md | 1 + mycli/TIPS | 92 ++++++++++++++++++++++++++++++++------------------- mycli/main.py | 2 ++ 3 files changed, 61 insertions(+), 34 deletions(-) diff --git a/changelog.md b/changelog.md index ee28ae81..5dd18919 100644 --- a/changelog.md +++ b/changelog.md @@ -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) diff --git a/mycli/TIPS b/mycli/TIPS index 17d765f4..aa7f9d29 100644 --- a/mycli/TIPS +++ b/mycli/TIPS @@ -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 = " 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 describes
! 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 executes a favorite! \fs saves a favorite query! @@ -88,11 +66,51 @@ use "system " to execute a shell command! the "watch" command executes a query every N seconds! -redirect query output to a shell command with "$| "! +### +### general +### -redirect query output to a file with "$> "! +display query output vertically using \G at the end of a query! -append query output to a file with "$>> "! +### +### 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 = " in ~/.myclirc! choose a color theme with "syntax_style" in ~/.myclirc! @@ -100,6 +118,12 @@ 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 "$| "! + +redirect query output to a file with "$> "! + +append query output to a file with "$>> "! diff --git a/mycli/main.py b/mycli/main.py index 5c5e55bd..77c7b3ea 100755 --- a/mycli/main.py +++ b/mycli/main.py @@ -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: