Re-port filesystem commands (#4387)

* Re-port the filesystem commands

* Remove commented out section
This commit is contained in:
JT
2022-02-09 09:56:27 -05:00
committed by GitHub
parent 94ab981235
commit 43850bf20e
9 changed files with 494 additions and 391 deletions

View File

@ -67,6 +67,7 @@ pub struct Config {
pub menu_config: HashMap<String, Value>,
pub keybindings: Vec<ParsedKeybinding>,
pub history_config: HashMap<String, Value>,
pub rm_always_trash: bool,
}
impl Default for Config {
@ -90,6 +91,7 @@ impl Default for Config {
menu_config: HashMap::new(),
keybindings: Vec::new(),
history_config: HashMap::new(),
rm_always_trash: false,
}
}
}
@ -194,6 +196,13 @@ impl Value {
eprintln!("$config.quick_completions is not a bool")
}
}
"rm_always_trash" => {
if let Ok(b) = value.as_bool() {
config.rm_always_trash = b;
} else {
eprintln!("$config.rm_always_trash is not a bool")
}
}
"filesize_format" => {
if let Ok(v) = value.as_string() {
config.filesize_format = v.to_lowercase();