From a9ce7dc613b858ba2b27b52518f2cf43d2c50002 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Mon, 27 May 2024 16:07:31 +0800 Subject: [PATCH] fix(cli): set default expand mode to auto (#430) --- README.md | 4 ++-- cli/src/config.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fa590cd6..bdc26716 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ connect_timeout = "30s" [settings] display_pretty_sql = true progress_color = "green" -expand = "auto" +expand = "off" prompt = ":) " ``` @@ -138,7 +138,7 @@ prompt = ":) " | `max_width` | Limit display render box max width, 0 means default to the size of the terminal. | | `max_col_width` | Limit display render each column max width, smaller than 3 means disable the limit. | | `output_format` | The output format to use. | -| `expand` | Expand table format display, default off, could be on/off/auto. | +| `expand` | Expand table format display, default auto, could be on/off/auto. | | `time` | Whether to show the time elapsed when executing queries. | | `multi_line` | Whether to allow multi-line input. | | `replace_newline` | whether replace '\n' with '\\\n'. | diff --git a/cli/src/config.rs b/cli/src/config.rs index a4151a48..78654a2c 100644 --- a/cli/src/config.rs +++ b/cli/src/config.rs @@ -57,7 +57,7 @@ impl From<&str> for ExpandMode { "on" => ExpandMode::On, "off" => ExpandMode::Off, "auto" => ExpandMode::Auto, - _ => ExpandMode::Off, + _ => ExpandMode::Auto, } } } @@ -237,7 +237,7 @@ impl Default for Settings { prompt: "{user}@{warehouse}/{database}> ".to_string(), output_format: OutputFormat::Table, quote_style: OutputQuoteStyle::Necessary, - expand: ExpandMode::Off, + expand: ExpandMode::Auto, show_progress: false, max_display_rows: 40, max_col_width: 1024 * 1024,