mirror of
https://github.com/nushell/nushell.git
synced 2025-02-16 18:41:44 +01:00
Add missing legacy support for config.table_index_mode. (#7170)
This commit is contained in:
parent
587536ddcc
commit
d89d1894d0
@ -754,6 +754,22 @@ impl Value {
|
|||||||
eprintln!("$env.config.table_mode is not a string")
|
eprintln!("$env.config.table_mode is not a string")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
"table_index_mode" => {
|
||||||
|
legacy_options_used = true;
|
||||||
|
if let Ok(b) = value.as_string() {
|
||||||
|
let val_str = b.to_lowercase();
|
||||||
|
match val_str.as_ref() {
|
||||||
|
"always" => config.table_index_mode = TableIndexMode::Always,
|
||||||
|
"never" => config.table_index_mode = TableIndexMode::Never,
|
||||||
|
"auto" => config.table_index_mode = TableIndexMode::Auto,
|
||||||
|
_ => eprintln!(
|
||||||
|
"unrecognized $env.config.table_index_mode '{val_str}'; expected either 'never', 'always' or 'auto'"
|
||||||
|
),
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
eprintln!("$env.config.table_index_mode is not a string")
|
||||||
|
}
|
||||||
|
}
|
||||||
"table_trim" => {
|
"table_trim" => {
|
||||||
legacy_options_used = true;
|
legacy_options_used = true;
|
||||||
config.trim_strategy = try_parse_trim_strategy(value, &config)?
|
config.trim_strategy = try_parse_trim_strategy(value, &config)?
|
||||||
|
Loading…
Reference in New Issue
Block a user