Merge 'Add abbreviated alias for .quit and .exit' from Krishna Vishal

Accidentally found that you can quit SQLite CLI just by typing `.q`,
`.qu` and `.qui` instead of full `.quit`.
IMO this will be an improvement to the DX.
I've also found bunch of other dot commands that work with abbreviated
aliases in SQLite. If this PR is okay then I will also add them here.

Closes #1720
This commit is contained in:
Pekka Enberg
2025-06-16 11:11:17 +03:00

View File

@@ -27,10 +27,10 @@ pub struct CommandParser {
#[command(disable_help_flag(false), disable_version_flag(true))]
pub enum Command {
/// Exit this program with return-code CODE
#[command(display_name = ".exit")]
#[command(display_name = ".exit", alias = "ex", alias = "exi")]
Exit(ExitArgs),
/// Quit the shell
#[command(display_name = ".quit")]
#[command(display_name = ".quit", alias = "q", alias = "qu", alias = "qui")]
Quit,
/// Open a database file
#[command(display_name = ".open")]