Skip to content

Commit

Permalink
fix(cli): set default expand mode to auto (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc authored May 27, 2024
1 parent e39b472 commit a9ce7dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ connect_timeout = "30s"
[settings]
display_pretty_sql = true
progress_color = "green"
expand = "auto"
expand = "off"
prompt = ":) "
```
Expand Down Expand Up @@ -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'. |
Expand Down
4 changes: 2 additions & 2 deletions cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl From<&str> for ExpandMode {
"on" => ExpandMode::On,
"off" => ExpandMode::Off,
"auto" => ExpandMode::Auto,
_ => ExpandMode::Off,
_ => ExpandMode::Auto,
}
}
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a9ce7dc

Please sign in to comment.