allows for nushell to have tables without the index column (#5380)

This commit is contained in:
Darren Schroeder
2022-04-30 09:07:46 -05:00
committed by GitHub
parent 1fc7abcc38
commit 5999506f87
3 changed files with 20 additions and 7 deletions

View File

@ -47,6 +47,7 @@ pub struct Config {
pub menus: Vec<ParsedMenu>,
pub rm_always_trash: bool,
pub shell_integration: bool,
pub disable_table_indexes: bool,
}
impl Default for Config {
@ -73,6 +74,7 @@ impl Default for Config {
menus: Vec::new(),
rm_always_trash: false,
shell_integration: false,
disable_table_indexes: false,
}
}
}
@ -254,7 +256,13 @@ impl Value {
eprintln!("$config.shell_integration is not a bool")
}
}
"disable_table_indexes" => {
if let Ok(b) = value.as_bool() {
config.disable_table_indexes = b;
} else {
eprintln!("$config.disable_table_indexes is not a bool")
}
}
x => {
eprintln!("$config.{} is an unknown config setting", x)
}