]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Change the CLI so that the default "--title" is "always" instead of "on"
authordrh <>
Tue, 7 Jul 2026 14:53:53 +0000 (14:53 +0000)
committerdrh <>
Tue, 7 Jul 2026 14:53:53 +0000 (14:53 +0000)
for some display modes.  This check-in also include a fix to "--title always"
for the "markdown" display mode.

FossilOrigin-Name: c3b0fff1b76b8c354b34fef17ff639968698e97234d6ab7af15e0e1a835486e9

ext/qrf/qrf.c
manifest
manifest.tags
manifest.uuid
src/shell.c.in
test/import01.sql
test/modeA.sql
test/qrf01.test
test/shell2.test

index e667533a6707b16a7087916c282b21ea73500c88..6df8a8b47b45c916e91fb3c7e0e8c3dac1588bc4 100644 (file)
@@ -2324,6 +2324,11 @@ static void qrfColumnar(Qrf *p){
       case QRF_STYLE_Table:
         qrfRowSeparator(p->pOut, &data, '+');
         break;
+      case QRF_STYLE_Markdown:
+        if( p->nRow==0 ){
+          qrfRowSeparator(p->pOut, &data, '|');
+        }
+        break;
       case QRF_STYLE_Column:
         if( p->nRow==0 ){
           qrfColumnSeparator(p->pOut, &data, colSep, szColSep,
index 3be31c8ee056fe4459c41f20a02f4ca12301bde4..c3e2299e5ec6aecc17ce383b58ea697c48a8eb56 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sthe\s"--rowcount\son"\sand\s"--title\salways"\sfeatures\sto\sQRF,\sthe\sCLI,\sand\nthe\sTCL\sinterface.\s\sMake\sthem\son\sby\sdefault\sfor\s"--style\spsql".
-D 2026-07-07T13:53:57.540
+C Change\sthe\sCLI\sso\sthat\sthe\sdefault\s"--title"\sis\s"always"\sinstead\sof\s"on"\nfor\ssome\sdisplay\smodes.\s\sThis\scheck-in\salso\sinclude\sa\sfix\sto\s"--title\salways"\nfor\sthe\s"markdown"\sdisplay\smode.
+D 2026-07-07T14:53:53.364
 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -425,7 +425,7 @@ F ext/misc/zipfile.c 5cf901996c840b32a5c03d947c4ee86bda166f6e595a41871840df85204
 F ext/misc/zorder.c bddff2e1b9661a90c95c2a9a9c7ecd8908afab5763256294dd12d609d4664eee
 F ext/qrf/README.md 3dfd5de860cdc0c572d8926ba0c1b3cc8925487dfbda10e63af66a8811907687
 F ext/qrf/dev-notes.md e68a6d91ce4c7eb296ef2daadc2bb79c95c317ad15b9fafe40850c67b29c2430
-F ext/qrf/qrf.c 680e78e0c5bebe1868f1ce5802108cb693165764fda6c89ed3bb9464d786d9f5
+F ext/qrf/qrf.c 93b66548739454b837e0450ceba9b67484b3f9f4589a4ba73169ef9f1e2627d1
 F ext/qrf/qrf.h fcbc33578176b2fd9dda8310d8f6ba4eaf4f75052f466dfe682802e6664df8bd
 F ext/rbu/rbu.c 801450b24eaf14440d8fd20385aacc751d5c9d6123398df41b1b5aa804bf4ce8
 F ext/rbu/rbu1.test 25870dd7db7eb5597e2b4d6e29e7a7e095abf332660f67d89959552ce8f8f255
@@ -743,7 +743,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
 F src/resolve.c 54395ee97eb710e695202d4112cf2b1c1c7767a57afcea745df71abb1c917768
 F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
 F src/select.c f553420eaf5c72a49cef786621eea79dd8c4411671839fb05250bb49ca74a0a0
-F src/shell.c.in 057cabda53ac4bf9fbe5770f7e9f51407a84c47bbc7934dde6bf6c45d286c0f9
+F src/shell.c.in 8dd3e9145c5fb5e5ec1b343fa26cf007bdc9f995bd3574dab2518748cfe10724
 F src/sqlite.h.in d9ec41feb4cd804e68b174328b43beb3f1f71bba13e1c7a439efb826d301cccc
 F src/sqlite3.rc 015537e6ac1eec6c7050e17b616c2ffe6f70fca241835a84a4f0d5937383c479
 F src/sqlite3ext.h 0efd4723bad9124ea1f581d9f1ea0254ac1c6f3e5fb29e4f3dcf36c72485a456
@@ -1280,7 +1280,7 @@ F test/hook.test 2d89bf9480646feb8093be3a58ea502d6521906779ed960de31dd9c4502c054
 F test/hook2.test b9ff3b8c6519fb67f33192f1afe86e7782ee4ac8
 F test/icu.test 3903d97f414741036e48d74af6be904eb69170f5bca7a0031ff3b33925c85582
 F test/ieee754.test 0d3ab84ab2069c9994c833a7cd820ee6037f0cf888e206a4a7fc05f735d5790a
-F test/import01.sql d9561059f4ad3f14eff20c269e64b09afd697b1aad00b03a7d5010e167dcba83
+F test/import01.sql 83afbb4d408b07563f3bcd2088e96d2a9443551c79c69621a6e6000bb8b6ee19
 F test/imposter1.sql fc5ad0945bb19622688c7a1cd7dfd1cefa4b013bac9e2628c22b03c7309f021f
 F test/imposter1.test 5a20b2cdeb53e65fc57cdb10a33750bd4ef6259909eaf1972253b9e79f7a3fb2
 F test/in.test edf979bff3244b9e47849e2b43886631354c8213791f42da92216f08012141af
@@ -1461,7 +1461,7 @@ F test/mmap4.test 2e2b4e32555b58da15176e6fe750f17c9dcf7f93
 F test/mmapcorrupt.test 470fb44fe92e99c1d23701d156f8c17865f5b027063c9119dcfdb842791f4465
 F test/mmapfault.test d4c9eff9cd8c2dc14bc43e71e042f175b0a26fe3
 F test/mmapwarm.test 2272005969cd17a910077bd5082f70bc1fefad9a875afec7fc9af483898ecaf3
-F test/modeA.sql 07e757d4e28ab20217d4350544cb752845886807bfd5a4c2ccc3c471340fd797
+F test/modeA.sql 70bd5172122f992c2a2caa8e247d3dae68dbac2d854915ea20d4e01b98940d78
 F test/multiplex.test d74c034e52805f6de8cc5432cef8c9eb774bb64ec29b83a22effc8ca4dac1f08
 F test/multiplex2.test 580ca5817c7edbe4cc68fa150609c9473393003a
 F test/multiplex3.test fac575e0b1b852025575a6a8357701d80933e98b5d2fe6d35ddaa68f92f6a1f7
@@ -1533,7 +1533,7 @@ F test/printf2.test 3f55c1871a5a65507416076f6eb97e738d5210aeda7595a74ee895f2224c
 F test/progress.test ebab27f670bd0d4eb9d20d49cef96e68141d92fb
 F test/ptrchng.test ef1aa72d6cf35a2bbd0869a649b744e9d84977fc
 F test/pushdown.test 46a626ef1c0ca79b85296ff2e078b9da20a50e9b804b38f441590c3987580ddd
-F test/qrf01.test 6fcb3d252d2a855eba4fa5d64002286fdafe40b8fb608337c041b60865f9f636
+F test/qrf01.test a55372af3e0ac0a8f0cf4b4113c9f9d6621631ab0f5894e869a0d5759826b486
 F test/qrf02.test 39b4afdc000bedccdafc0aecf17638df67a67aaa2d2942865ae6abcc48ba0e92
 F test/qrf03.test e7efe46d204671726b4707585126cd78d107368de4a7d0c7b8d5157cdd8624ed
 F test/qrf04.test 0894692c998d2401dcc33449c02051b503ecce0c94217be54fb007c82d2d1379
@@ -1635,7 +1635,7 @@ F test/shared_err.test 32634e404a3317eeb94abc7a099c556a346fdb8fb3858dbe222a4cbb8
 F test/sharedlock.test 5ede3c37439067c43b0198f580fd374ebf15d304
 F test/shell-prompt.sql 8a320a78812d75349bd5e1a95178f7ff1f2194bb4cceee572865d127c51684b3
 F test/shell1.test df7a33a7056220ae12966228731658b36c98c22ba27e114bbf2785ff5b84fea2
-F test/shell2.test e0842ea6a28f86f1ef235e117b3a381d16b999e7bdd9655b1de663026dd8ea27
+F test/shell2.test 1d7b9133b612d53f3c355dcba55845f84fcf2fe0d09459f82adbfaccae3c60b1
 F test/shell3.test 91efdd545097a61a1f72cf79c9ad5b49da080f3f10282eaf4c3c272cd1012db2
 F test/shell4.test e25580a792b7b54560c3a76b6968bd8189261f38979fe28e6bc6312c5db280db
 F test/shell5.test a0c43d82a811a463a5d07d6418c5a045ab01a072544db8aa31ae394e93845d8d
@@ -2213,9 +2213,11 @@ F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee
 F tool/warnings.sh a554d13f6e5cf3760f041b87939e3d616ec6961859c3245e8ef701d1eafc2ca2
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
 F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c
-P 7f49a7a90eda01753c0dff65197bd7bc48a751e24a46919d30af6e2baf0788fc 0bca30616566d196d3cb4da1684feaf54bb38e304f4393ace322fc48c0a2f540
-R 8d6db5c23ea14c5abe436bb82a7f1dab
-T +closed 0bca30616566d196d3cb4da1684feaf54bb38e304f4393ace322fc48c0a2f540
+P 4edba31af4ef18350cb415079fb92cae0c53767fc0e74d63d404296974e75e5c
+R 91f96872ad01984a543b449ea7837a3b
+T *branch * title-always-default-on
+T *sym-title-always-default-on *
+T -sym-trunk *
 U drh
-Z d40940d43a4860427ab90b0bfb1f652c
+Z 8732b504c20e338d03135e902dabf4df
 # Remove this line to create a well-formed Fossil manifest.
index bec971799ff1b8ee641c166c7aeb22d12c785393..7fcfcd4c3b3d9f46c953cf790a168e98423b0efc 100644 (file)
@@ -1,2 +1,2 @@
-branch trunk
-tag trunk
+branch title-always-default-on
+tag title-always-default-on
index 0b52b74509d3e54fde79211f4faeef7a378ce616..679fac24d6530b49e55b5dd3e66f23b029520dc5 100644 (file)
@@ -1 +1 @@
-4edba31af4ef18350cb415079fb92cae0c53767fc0e74d63d404296974e75e5c
+c3b0fff1b76b8c354b34fef17ff639968698e97234d6ab7af15e0e1a835486e9
index 6c829236cc7bdb1db80fcc4ec39ce9585413e38c..d000d88ed342a20379eb774253254a5254d624e0 100644 (file)
@@ -580,28 +580,28 @@ static const char *aModeStr[] =
 static const ModeInfo aModeInfo[] = {
 /*   zName      eCSep  eRSep eNull eText eHdr eBlob bHdr eStyle eCx mFlg */
   { "ascii",    7,     6,    9,    1,    1,    0,   1,   12,    0,  0 },
-  { "box",      0,     0,    9,    1,    1,    0,   2,   1,     2,  0 },
+  { "box",      0,     0,    9,    1,    1,    0,   3,   1,     2,  0 },
   { "c",        4,     1,    10,   5,    5,    4,   1,   12,    0,  0 },
-  { "column",   0,     0,    9,    1,    1,    0,   2,   2,     2,  0 },
+  { "column",   0,     0,    9,    1,    1,    0,   3,   2,     2,  0 },
   { "count",    0,     0,    0,    0,    0,    0,   0,   3,     0,  0 },
   { "csv",      4,     5,    9,    3,    3,    0,   1,   12,    0,  0 },
-  { "html",     0,     0,    9,    4,    4,    0,   2,   7,     0,  0 },
+  { "html",     0,     0,    9,    4,    4,    0,   3,   7,     0,  0 },
   { "insert",   0,     0,    10,   2,    2,    0,   1,   8,     0,  0 },
   { "jatom",    4,     1,    11,   6,    6,    0,   1,   12,    0,  0 },
   { "jobject",  0,     1,    11,   6,    6,    0,   0,   10,    0,  0 },
   { "json",     0,     0,    11,   6,    6,    0,   0,   9,     0,  0 },
   { "line",     13,    1,    9,    1,    1,    0,   0,   11,    1,  0 },
   { "list",     2,     1,    9,    1,    1,    0,   1,   12,    0,  0 },
-  { "markdown", 0,     0,    9,    1,    1,    0,   2,   13,    2,  0 },
+  { "markdown", 0,     0,    9,    1,    1,    0,   3,   13,    2,  0 },
   { "off",      0,     0,    0,    0,    0,    0,   0,   14,    0,  0 },
   { "psql",     0,     0,    9,    1,    1,    0,   3,   19,    2,  5 },
-  { "qbox",     0,     0,    10,   2,    1,    0,   2,   1,     2,  0 },
+  { "qbox",     0,     0,    10,   2,    1,    0,   3,   1,     2,  0 },
   { "quote",    4,     1,    10,   2,    2,    0,   1,   12,    0,  0 },
   { "split",    0,     0,    9,    1,    1,    0,   1,   2,     2,  2 },
-  { "table",    0,     0,    9,    1,    1,    0,   2,   19,    2,  0 },
+  { "table",    0,     0,    9,    1,    1,    0,   3,   19,    2,  0 },
   { "tabs",     8,     1,    9,    3,    3,    0,   1,   12,    0,  0 },
   { "tcl",      3,     1,    12,   5,    5,    4,   1,   12,    0,  0 },
-  { "www",      0,     0,    9,    4,    4,    0,   2,   7,     0,  0 }
+  { "www",      0,     0,    9,    4,    4,    0,   3,   7,     0,  0 }
 };     /*       |     /     /      |     /    /     |    |     /     \____
        **       |    /     /       |    /    /      |    |    /           |
        ** Index into aModeStr[]    |   /    /       |    |  2: columnar   |
index 9c041528ce3d1f8ece8775bdf5ea95f57d12082e..78e4359dc89be275277aa33c47449d0afe44cc16 100644 (file)
@@ -195,6 +195,9 @@ m,n,o
 END
 SELECT * FROM t3;
 .check <<END
+╭───┬───┬───╮
+│ g │ h │ i │
+╘═══╧═══╧═══╛
 END
 
 .testcase 200 --error-prefix ERROR:
index d7c969c8c41ff28fd6a5709218ed257c27bd8457..62de2ecdb61d90633eaff2ab15750dcff6e2a48f 100644 (file)
@@ -103,7 +103,7 @@ END
 .testcase 140
 .mode -v
 .check <<END
-.mode qbox --align "" --border on --blob-quote auto --colsep "" --escape auto --limits on --multiinsert 3000 --null "NULL" --quote relaxed --rowcount off --rowsep "" --sw auto --tablename "" --textjsonb on --titles on --widths "" --wordwrap off --wrap 10
+.mode qbox --align "" --border on --blob-quote auto --colsep "" --escape auto --limits on --multiinsert 3000 --null "NULL" --quote relaxed --rowcount off --rowsep "" --sw auto --tablename "" --textjsonb on --titles always --widths "" --wordwrap off --wrap 10
 END
 .testcase 150 --error-prefix "Error:"
 .mode foo
@@ -162,7 +162,7 @@ END
 .mode --limits 0,0,0
 .mode -v
 .check <<END
-.mode box --align "" --border on --blob-quote auto --colsep "" --escape auto --limits off --multiinsert 0 --null "" --quote off --rowcount off --rowsep "" --sw 0 --tablename "" --textjsonb off --titles on --widths "" --wordwrap off
+.mode box --align "" --border on --blob-quote auto --colsep "" --escape auto --limits off --multiinsert 0 --null "" --quote off --rowcount off --rowsep "" --sw 0 --tablename "" --textjsonb off --titles always --widths "" --wordwrap off
 END
 
 .testcase 400
index f98f02490fcb30dd35177b467786b1a169d6e5fa..9f6ea8e10f152030042cafe8f98e7b9707d0f0f9 100644 (file)
@@ -601,6 +601,7 @@ do_test 1.123 {
   set result "\n[db format -style markdown -rowcount on -title always {SELECT * FROM t1 WHERE a=2}]"
 } {
 | a | b | c |
+|---|---|---|
 (0 rows)
 }
 
index 0811f03dddbbfb94727fe482c1a0e0cd82270c17..9ddcafc9495c74cf609b123e2e1e49673620c261 100644 (file)
@@ -313,6 +313,9 @@ do_test shell2-1.4.10b {
 ╰───────╯
 ╭───────╮
 │ value │
+╘═══════╛
+╭───────╮
+│ value │
 ╞═══════╡
 │     0 │
 │     1 │