From 1d06c9f7000a5197179391293debb84e2a151ecf Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sat, 15 Nov 2025 20:10:32 +0000
Subject: [PATCH] Help text improvements in the CLI.
FossilOrigin-Name: dcaabd97d5064dd70fb386a2eef55f4301bba4b54915ed6a91d736abe7a04ae8
---
manifest | 12 ++++----
manifest.uuid | 2 +-
src/shell.c.in | 74 ++++++++++++--------------------------------------
3 files changed, 24 insertions(+), 64 deletions(-)
diff --git a/manifest b/manifest
index 7bf5576fcc..062f6534e9 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Bug\sfix\sto\sthe\s--lineline\soption\sin\sthe\sCLI.\s\sOther\sminor\sCLI\stweaks.
-D 2025-11-15T15:30:55.717
+C Help\stext\simprovements\sin\sthe\sCLI.
+D 2025-11-15T20:10:32.458
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -735,7 +735,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c 5616fbcf3b833c7c705b24371828215ad0925d0c0073216c4f153348d5753f0a
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c ba9cd07ffa3277883c1986085f6ddc4320f4d35d5f212ab58df79a7ecc1a576a
-F src/shell.c.in ccb6f8060233e2dd8a678af0c9fa2625ba65ad5690b912080b5b8366f60ea4f6
+F src/shell.c.in 8773fda72760ffc26314d5642e63acdec081ad7489f1f5a05689bceec643dd30
F src/sqlite.h.in 795ce84cc136b4e74d882cf4fab56d2927c20b9af9fd2fcea27760a6fe50851b
F src/sqlite3.rc 015537e6ac1eec6c7050e17b616c2ffe6f70fca241835a84a4f0d5937383c479
F src/sqlite3ext.h 5d5330f5f8461f5ce74960436ddcfa53ecd09c2b8b23901e22ae38aec3243998
@@ -2176,8 +2176,8 @@ F tool/version-info.c 33d0390ef484b3b1cb685d59362be891ea162123cea181cb8e6d2cf6dd
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 60d26ebb4d91cc885b6b938ef2fc2864ebbf5a18d2e456521ee2f4aa3b22eddf
-R 343b0aedee84072a783fbbc3c8f28219
+P 40f81a9f9f6ea29144174fbd487f83d150a1be8f35e7496bfc1cfc6a556b6312
+R da30516d377b83eb66b565e43f75c74c
U drh
-Z 467ae276ba000788078f7d43583d6bbe
+Z 749fd53c7bbcc8453c481bf54ad47bb5
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index 924e7e6347..ee006e0390 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-40f81a9f9f6ea29144174fbd487f83d150a1be8f35e7496bfc1cfc6a556b6312
+dcaabd97d5064dd70fb386a2eef55f4301bba4b54915ed6a91d736abe7a04ae8
diff --git a/src/shell.c.in b/src/shell.c.in
index f411d28f5c..ff02ccd5b6 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -3653,7 +3653,7 @@ static const char *(azHelp[]) = {
" --schema SCHEMA Use SCHEMA instead of \"main\"",
" --help Show CMD details",
".fullschema ?--indent? Show schema and the content of sqlite_stat tables",
- ".headers on|off Turn display of headers on or off",
+ ",headers on|off Turn display of headers on or off",
".help ?-all? ?PATTERN? Show help text for PATTERN",
#ifndef SQLITE_SHELL_FIDDLE
".import FILE TABLE Import data from FILE into TABLE",
@@ -3694,42 +3694,12 @@ static const char *(azHelp[]) = {
".log on|off Turn logging on or off.",
#endif
".mode ?MODE? ?OPTIONS? Set output mode",
- " MODE is one of:",
- " ascii Columns/rows delimited by 0x1F and 0x1E",
- " box Tables using unicode box-drawing characters",
- " csv Comma-separated values",
- " column Output in columns. (See .width)",
- " html HTML
code",
- " insert SQL insert statements for TABLE",
- " json Results in a JSON array",
- " line One value per line",
- " list Values delimited by \"|\"",
- " markdown Markdown table format",
- " qbox Shorthand for \"box --wrap 60 --quote\"",
- " quote Escape answers as for SQL",
- " table ASCII-art table",
- " tabs Tab-separated values",
- " tcl TCL list elements",
- " OPTIONS: (for columnar modes or insert mode):",
- " --escape T ctrl-char escape; T is one of: symbol, ascii, off",
- " --wrap N Wrap output lines to no longer than N characters",
- " --wordwrap B Wrap or not at word boundaries per B (on/off)",
- " --ww Shorthand for \"--wordwrap 1\"",
- " --quote Quote output text as SQL literals",
- " --noquote Do not quote output text",
- " TABLE The name of SQL table used for \"insert\" mode",
#ifndef SQLITE_SHELL_FIDDLE
".nonce STRING Suspend safe mode for one command if nonce matches",
#endif
".nullvalue STRING Use STRING in place of NULL values",
#ifndef SQLITE_SHELL_FIDDLE
".once ?OPTIONS? ?FILE? Output for the next SQL command only to FILE",
- " If FILE begins with '|' then open as a pipe",
- " --bom Put a UTF8 byte-order mark at the beginning",
- " -e Send output to the system text editor",
- " --plain Use text/plain output instead of HTML for -w option",
- " -w Send output as HTML to a web browser (same as \".www\")",
- " -x Send output as CSV to a spreadsheet (same as \".excel\")",
/* Note that .open is (partially) available in WASM builds but is
** currently only intended to be used by the fiddle tool, not
** end users, so is "undocumented." */
@@ -3755,16 +3725,6 @@ static const char *(azHelp[]) = {
" --zip FILE is a ZIP archive",
#ifndef SQLITE_SHELL_FIDDLE
".output ?FILE? Send output to FILE or stdout if FILE is omitted",
- " If FILE begins with '|' then open it as a pipe.",
- " If FILE is 'off' then output is disabled.",
- " If FILE is 'memory' then capture all output in an internal buffer.",
- " If FILE is omitted, restore output to the console.",
- " Options:",
- " --bom Prefix output with a UTF8 byte-order mark",
- " -e Send output to the system text editor",
- " --plain Use text/plain for -w option",
- " -w Send output to a web browser",
- " -x Send output as CSV to a spreadsheet",
#endif
".parameter CMD ... Manage SQL parameter bindings",
" clear Erase all bindings",
@@ -3807,7 +3767,7 @@ static const char *(azHelp[]) = {
" Options:",
" --init Create a new SELFTEST table",
" -v Verbose output",
- ".separator COL ?ROW? Change the column and row separators",
+ ",separator COL ?ROW? Change the column and row separators",
#if defined(SQLITE_ENABLE_SESSION)
".session ?NAME? CMD ... Create or control sessions",
" Subcommands:",
@@ -3834,7 +3794,7 @@ static const char *(azHelp[]) = {
#if !defined(SQLITE_NOHAVE_SYSTEM) && !defined(SQLITE_SHELL_FIDDLE)
".shell CMD ARGS... Run CMD ARGS... in a system shell",
#endif
- ".show Show the current values for various settings",
+ ",show Show the current values for various settings",
".stats ?ARG? Show stats or turn stats on or off",
" off Turn off automatic stat display",
" on Turn on automatic stat display",
@@ -3875,7 +3835,7 @@ static const char *(azHelp[]) = {
".vfsinfo ?AUX? Information about the top-level VFS",
".vfslist List all available VFSes",
".vfsname ?AUX? Print the name of the VFS stack",
- ".width NUM1 NUM2 ... Set minimum column widths for columnar output",
+ ",width NUM1 NUM2 ... Set minimum column widths for columnar output",
" Negative values right-justify",
#ifndef SQLITE_SHELL_FIDDLE
".www Display output of the next command in web browser",
@@ -7312,7 +7272,7 @@ static int modeTitleDsply(ShellState *p, int bAll){
** and relevant options.
**
** Options:
-** --align STRING Set the alignment of text in columnar modes
+** --align STRING Set the alignment of text in columnar modes
** String consists of characters 'L', 'C', 'R'
** meaning "left", "centered", and "right", with
** one letter per column starting from the left.
@@ -7320,8 +7280,8 @@ static int modeTitleDsply(ShellState *p, int bAll){
** --charlimit N Set the maximum number of output characters to
** show for any single SQL value to N. Longer values
** truncated. Zero means "no limit".
-** --colsep STRING Use STRING as the column separator
-** --escape ESC Enable/disable escaping of control characters
+** --colsep STRING Use STRING as the column separator
+** --escape ESC Enable/disable escaping of control characters
** in output. ESC can be "off", "ascii", or
** "symbol".
** --linelimit N Set the maximum number of output lines to show for
@@ -7329,35 +7289,35 @@ static int modeTitleDsply(ShellState *p, int bAll){
** truncated. Zero means "no limit". Only works
** in "line" mode and in columnar modes.
** --list List available modes
-** --null STRING Render SQL NULL values as the given string
-** --once Setting changes to the left are reverted after
+** --null STRING Render SQL NULL values as the given string
+** --once Setting changes to the right are reverted after
** the next SQL command.
-** --quote ARG Enable/disable quoting of text. ARG can be
+** --quote ARG Enable/disable quoting of text. ARG can be
** "off", "on", "sql", "csv", "html", "tcl",
** or "json". "off" means show the text as-is.
** "on and "sql" are synonyms.
** --reset Changes all mode settings back to their default.
-** --rowsep STRING Use STRING as the row separator
+** --rowsep STRING Use STRING as the row separator
** --screenwidth N Declare the screen width of the output device
** to be N characters. An attempt may be made to
** wrap output text to fit within this limit. Zero
** means "no limit". Or N can be "auto" to set the
** width automatically.
-** --tablename NAME Set the name of the table for "insert" mode.
-** --tag NAME Save current mode as NAME.
-** --textjsonb BOOLEAN If enabled, JSONB text is displayed as text JSON.
+** --tablename NAME Set the name of the table for "insert" mode.
+** --tag NAME Save mode to the left as NAME.
+** --textjsonb BOOLEAN If enabled, JSONB text is displayed as text JSON.
** --title ARG Whether or not to show column headers, and if so
** how to encode them. ARG can be "off", "on",
** "sql", "csv", "html", "tcl", or "json".
** -v|--verbose Verbose output
-** --widths LIST Set the columns widths for columnar modes. The
+** --widths LIST Set the columns widths for columnar modes. The
** argument is a list of integers, one for each
** column. A "0" width means use a dynamic width
** based on the actual width of data. If there are
** fewer entries in LIST than columns, "0" is used
** for the unspecified widths.
-** --wordwrap BOOLEAN Enable/disable word wrapping
-** --wrap N Wrap columns wider than N characters
+** --wordwrap BOOLEAN Enable/disable word wrapping
+** --wrap N Wrap columns wider than N characters
** --ww Shorthand for "--wordwrap on"
*/
static int dotCmdMode(ShellState *p){
--
2.47.3