drh
74006fdcdb
Improvements to temp-file cleanup on close in the CLI.
...
FossilOrigin-Name: 048c969c34eaaf8c203b996e999a7dbc94c47b4959719af9e6625052520f7135
2026-04-26 18:35:26 +00:00
drh
4b9f9d6794
In the CLI, eliminate the 2-second delay before getting the prompt back
...
after running a ".www" or ".excel". Instead, remember the name of the
temporary file that is to be deleted and delete it later.
FossilOrigin-Name: 4e9ee211ca661fe8978b7f676f33ef962ff5c8177bc7c5ad42b19a2fa4482d90
2026-04-25 16:17:23 +00:00
drh
39b2fe7e5b
Simplify the modePush()/modePop() implementation in the CLI.
...
FossilOrigin-Name: 92cad2cd7284d3a969b713336865007da2b0b2a8eef367d4185802174cbd027a
2026-04-25 15:05:46 +00:00
drh
df7b22790e
Minor code simplification in the CLI.
...
FossilOrigin-Name: 59795c71e5745e8a27dc596b9f1fc8f137df58a6ec8d8d0dab2b31cf8562796d
2026-04-25 10:45:17 +00:00
drh
50811f74e0
Fix a problem in the CLI in which the ".www" command followed by
...
".dbstat" does not restore the mode to its original setting afterwards.
FossilOrigin-Name: 4a5cac1d00e1fa287ab8ce3437c0152a9f362d72bdb9976889c93f6368b3fd66
2026-04-25 00:29:40 +00:00
drh
d7bf8233ff
Fix test cases due to recent CLI default prompt changes. Make sure ANSI
...
escape codes are recognized on Windows terminals.
FossilOrigin-Name: 22b791e404f0895b0f343b2ce0e169a7ada8578e46a39a9f4bd3a31f81c9853c
2026-04-24 20:27:42 +00:00
drh
455486bbc4
Improvements to the default prompt for the CLI.
...
FossilOrigin-Name: 9ab0bb487f78ba5a51cd3b4efcee23b11096e90ebf3add4da18aea657e8de0b6
2026-04-24 09:21:25 +00:00
drh
ba9092e228
Improved default prompt in the CLI.
...
FossilOrigin-Name: 78193b60346dba304485241dd65f0eb6e971714397b76191b3bf7a5fdb44916b
2026-04-23 22:15:18 +00:00
drh
67d4e0226f
Fix harmless compiler warnings. Enhance the CLI prompt mechanism to make
...
it more easily reusable by other projects, and to add the /h, /H, and /u
escape sequences.
FossilOrigin-Name: 354ce4f5e2a86b621b2058a6372495a5919cf3dc88ce1ed3637642f720c48002
2026-04-23 20:13:14 +00:00
drh
323b3fc121
Fix a bug in [dbc1d6f0a3452607] that disrupts the display when running
...
on a Windows console (not redirecting to a file).
FossilOrigin-Name: 75b5df2b0046827e985712b5725488b59667e2cfd171cde9f1194f2917165205
2026-04-23 20:06:16 +00:00
drh
78279e2550
Improvements to the #define mechanism in the CLI that allows other programs
...
that incorporate the shell.c source file to customize some of the
prompt expansions.
FossilOrigin-Name: e5f8840d11c1863cfc5c0b4a3d16c9ec9ab6ca6ecb7ff1a3a9a237715eed5d30
2026-04-23 16:40:34 +00:00
drh
ed95a9d103
New CLI prompt escape sequences: /r, /A, /v, /V, and /D../D.
...
FossilOrigin-Name: e7c7acd1a4e5cb0f8e68f119352480c1aa9dd3c2b289c92f88e9e697a2e440e0
2026-04-23 15:05:46 +00:00
stephan
2545d9c201
CLI shell: handle the special case of .prompt "" to not incorrectly report that as an OOM. Reported [ https://fossil-scm.org/forum/forumpost/ca277be73a |in the Fossil SCM forum].
...
FossilOrigin-Name: 3fa0500b964869c45f7b49717680b791049f7cd8c47a06a337dd22351d2002f9
2026-04-23 14:05:36 +00:00
drh
429369f4aa
QRF and the CLI preserve zero bytes when outputing unformatted BLOB values.
...
FossilOrigin-Name: dbc1d6f0a3452607e4e92155df0fdb1c5ea4ea5ad1654664f86383faf6c105ef
2026-04-22 12:22:32 +00:00
drh
532ed30ab2
Do not unnecessarily delay opening the database file in the CLI.
...
FossilOrigin-Name: ab6ee76c1266b753d0749c63890f40db875536ceb4dd3252cc7a3386e386a0c1
2026-04-21 14:39:23 +00:00
drh
29997b4731
Help-text and comment fixes in the CLI. Add the output-redir-test.txt
...
testing script.
FossilOrigin-Name: ec58a133b4716d4f5a53c38853f8ecdb7a1275b931663ce07c8dc700d845e62e
2026-04-17 11:41:33 +00:00
drh
f0c8e27670
Less error-prone parsing of ".once" options. Fix for the problem reported
...
by [forum:/info/2026-04-17T01:26:56Z|forum post 2026-04-17T01:26:56Z].
FossilOrigin-Name: b235a8093734f457c2731af017c99027510d04e5cd1060f5559afbec5409a472
2026-04-17 01:50:40 +00:00
drh
b57d2a5a51
Add the analyze() SQL function implemented the ext/misc/analyze.c extension
...
(but not part of the amalgamation). Make that function available in the
CLI and add a new ".dbinfo" command to the CLI using that function.
FossilOrigin-Name: 4c4988e56df3c668b8891e2a55887a6618f5b84e9111e562b93059ddb9a662dc
2026-04-15 12:20:11 +00:00
drh
84c1079220
Add a missing open_db() call in the new ".dbstat" command of the CLI.
...
FossilOrigin-Name: a138e44a243466f8679e9652421f8c893a4a1bc0addc86736588d9aee51cf090
2026-04-15 11:58:54 +00:00
drh
c8d866294b
Add the .dbstat command to the CLI.
...
FossilOrigin-Name: fdba76df2b3a5b4d56ba79f80fd8b16d5faebca1fb07a266262be2ea635e6f94
2026-04-15 11:41:50 +00:00
stephan
afef1f2923
Minor doc typo fixes contributed by BrickViking.
...
FossilOrigin-Name: c4660ce205919ce0d9262e7fd7879375a72ef65d9e5ac97f19caf5dc36e355aa
2026-04-14 23:53:38 +00:00
drh
57ed7f322f
Check-in [495e4851d4296b49] breaks the build for Windows. Fixed here.
...
FossilOrigin-Name: 5b004348c3ec15a02dd657b3619502b6f8ba1c6f46918108b3de9534622076a0
2026-04-14 18:06:41 +00:00
drh
f02d100e08
".prompt" command improvements in the CLI: Guard against mistakenly saying
...
".prompt show" without the "--" before "show". Add the --hard-reset option
to .prompt to make it more easily testable.
FossilOrigin-Name: 495e4851d4296b49a37b963edd8410314de1510b2ae0b9dbe9dc0307c466c3b5
2026-04-13 12:22:16 +00:00
drh
4c8f0621fd
Improvements to the prompt_filename() function in the CLI so that it finds
...
the database filename even if the connection is not yet fully open.
FossilOrigin-Name: efb3e808a0281014512a812920d526a4909467e925ea000956606318bb6f2e65
2026-04-13 11:34:15 +00:00
drh
3d6fa49c54
Bug fix in the revised ".prompt" command of the CLI, with test cases.
...
FossilOrigin-Name: 7583385593354f90a9818d1820543841109f253dffcec5ca5ed7629336e29fac
2026-04-12 10:46:35 +00:00
stephan
4df365e5a7
Fix a typo which causes .headers to not show up in the shell's .help.
...
FossilOrigin-Name: d379b14a48d331933240fb99ab43c3cc978638d7ad0a8d5975bb211a72eaef2b
2026-04-12 05:41:28 +00:00
drh
9d8bf6f04a
Change the prompt escape design yet again, to use / as the escape character,
...
since % and just about every other punctuation character is special to
cmd.exe, batch files, and nmake, on Windows.
FossilOrigin-Name: 79a8d3edf8207d72f0c4650272ee239a1c7783a07f907fbf0cf5a7ad99b27a2a
2026-04-11 23:58:15 +00:00
drh
c0026ff7a6
CLI prompt design change: The escape character is changed from \ to
...
%#37;. This avoids lots of quoting problems when trying to specify prompt
strings in various programming languages and shells.
FossilOrigin-Name: e7e6ecc45dfe1a163d259be26877bd7e528ce154e73b3ca8ab7edc5aa94d2d02
2026-04-11 22:58:25 +00:00
drh
1e3f888acf
Two C-preprocessor macros SQLITE_PS1 and SQLITE_PS2 can be set to override
...
the default prompt strings in the CLI.
FossilOrigin-Name: 6fa0216a19c2f165110121227d3f9b9119369f8cd61f9c6d13eaa1ae42a60d60
2026-04-11 22:18:05 +00:00
drh
d08caad3a5
Fix harmless compiler warnings.
...
FossilOrigin-Name: 3b4cc8d3beab8c910dd954bf8093f7ab499e4690b9cf882f981c4415dd7a7540
2026-04-11 17:47:31 +00:00
drh
3b27ffa534
Add --reset, --show, and -- options to the ".prompt" command of the CLI.
...
FossilOrigin-Name: 8075576ba2324a458440bae398baecc7872b6528574b7fe6681a3a30b62d58ef
2026-04-11 15:45:45 +00:00
drh
fc2c730c87
Enhancements to shell_prompt_test() for better testing. Enhance the
...
".open" command so that it does ~/ expansion on filenames.
FossilOrigin-Name: ec6830fe60b73bc606d3c2a5d407a39db53f6dadee760829410abfa1df46389e
2026-04-11 14:11:56 +00:00
drh
cd28797117
Remove arbitrary limits on the length of CLI prompts. Use environment
...
variables SQLITE_PS1 and SQLITE_PS2 (if they exist) as the default
CLI prompts.
FossilOrigin-Name: a46ceaeab968d8f376c5a225c23c0be8619fed4511b7e567baf3a8d7736c19d1
2026-04-11 12:35:53 +00:00
drh
c8b130f255
Fix the \B escape for prompts so that it uses wcwidth() instead of
...
strlen() to compute spacing.
FossilOrigin-Name: c6ff4f701d9cf963cf2472ed72ad4e201227560dde2ba8d48602af2e49170e89
2026-04-11 11:24:09 +00:00
stephan
9d950aa13b
A protype of .prompt support in fiddle but its utility there is in doubt because .open does not work there, so there's very little dynamic info worth showing in a prompt. Also, ANSI colorization can't work there, nor can we colorize the prompts using HTML because of limitations in jquery.terminal.
...
FossilOrigin-Name: 3b17500dc6338df23d1ed0572cd71593da5a9b048731f73242e27b9a76553a27
2026-04-10 23:05:41 +00:00
drh
01e1be854b
Fix minor issues on Windows.
...
FossilOrigin-Name: 48e40d3f6a193d6c4d1b8deda36415a690602dbe33d49984a9d92c6d40d8da5c
2026-04-10 20:44:38 +00:00
drh
70868a5ae3
Fix prompt for in-memory databases. Fix the continuation mechanism so that
...
it looks at all accumulated lines, not just the most recent line.
FossilOrigin-Name: 166894725569cafa96c434aa14db0428db6791a8296fcc2990bec4ec819fd876
2026-04-10 20:29:35 +00:00
drh
bd574dbaee
Add the \B escape for CLI prompts. Change the default prompts to
...
use \f, \H, and \B.
FossilOrigin-Name: 354325b6f396bda38bbb82e7d38aa50d3d6441e1ebb9b578aed8e0bcf62f9911
2026-04-10 20:06:34 +00:00
drh
7632922625
The \H escape on a prompt string fills in with the characters needed
...
to make the input "complete". Add the shell_expand_prompt() SQL function
for testing purposes.
FossilOrigin-Name: 6aafb76c74b73aafef74250dae9c8cbe73226c0efb606e8f80ea761b3293cf9d
2026-04-10 19:33:15 +00:00
drh
49998a6d25
Merge trunk fixes and enhancements into the cli-prompt-redo branch
...
FossilOrigin-Name: f3354ebf51e684ef680986bef9b606f63786c254f1c8774bcaf7a7f3d0d37056
2026-04-10 18:53:13 +00:00
stephan
eb9a6a95ca
Correct shell result code propagation regression introduced in [ff084ae341eab5c4] and reported in [forum:6fa3247e9724844c|forum post 6fa3247e9724844c].
...
FossilOrigin-Name: a76682a3b1d6c5e8ca16caf8afbe545c9ae39849fe21ba68d4cddae683a409b5
2026-04-10 08:36:55 +00:00
drh
b37bf0b8b4
Improvements to the way \x works so that it can be used to change
...
the prompt color. This really messes with linenoise, though.
FossilOrigin-Name: bbee56f970ade40734c8a278f46d8a268b305fe349c3739c977fa9141d2c3b6a
2026-04-10 00:55:40 +00:00
drh
850104bbad
A prototype of code that shows how to expand backslash escapes in the
...
CLI prompt.
FossilOrigin-Name: 9cf28959671920b4909521bb1db6f0cbbc85448fbf3594c43b4000505b4e055b
2026-04-09 23:37:48 +00:00
drh
6a6ebb0d06
Store the prompts as part of the ShellState object, not as global variables.
...
FossilOrigin-Name: 39f6c5a8a7d91e03f89b13496e333b9500977a2cbcc0c27ba14dfb87dc81e678
2026-04-09 22:14:58 +00:00
drh
30b824e432
Strip out the legacy dynamic prompt generation. It will go back in as I
...
add the user-defined prompt escapes.
FossilOrigin-Name: ab08b7a8ef518f96a549a41fe8ff11776abe5e83153c5f8d5d58694ecc476389
2026-04-09 20:21:25 +00:00
drh
3944e70677
Clean-ups in prompt generation in the CLI.
...
FossilOrigin-Name: e2c9d4c6b731ea9afbb9cb22f86a3db3670ca67968f15891dc46ae1fc9ba34dc
2026-04-09 18:51:09 +00:00
drh
9a8732e44b
Merge the 3.53.0 release changes into the cli-prompt branch
...
FossilOrigin-Name: 8fd48b9fe47d47b3eca31d187f1d98174c257daea220ae7be18e4c82764d9d5c
2026-04-09 13:21:09 +00:00
drh
e9af8caac0
Fix incorrect datatype on the auto_ext_leak_tester() function in the CLI.
...
FossilOrigin-Name: 4a36454904e1c5e7d25406713ab0125f11df66eabe0d378edcb837ef8dedc981
2026-04-07 12:51:52 +00:00
stephan
fcef193a82
Add a dummy auto-extension to the shell in SQLITE_DEBUG builds to validate that [9d56df17b4ab49] does the right thing.
...
FossilOrigin-Name: 164af3703b8fb5d88612edcceeaae0ae5a230c34c7a0f2ac9b650f5a742b2787
2026-04-06 22:00:20 +00:00
stephan
8e7ffc09f5
Add a call to sqlite3_reset_auto_extension() near the end of shell.c.in:main() to squelch a leak message when SQLITE_EXTRA_INIT adds auto-extensions, as reported in [forum:310cb231b07c80d1|forum post 310cb231b07c80d1].
...
FossilOrigin-Name: c4dd7e8b36deced3ee9cc6b5f87d8b3cc9a752cad8d62c9b711c7b58db11834b
2026-04-06 20:24:02 +00:00