create clickable links in ls output if configured (#6333)

* create clickable links in ls output if configured

* move some comments
This commit is contained in:
Darren Schroeder
2022-08-18 05:45:49 -05:00
committed by GitHub
parent ec4e3a6d5c
commit 1843fdc060
3 changed files with 64 additions and 5 deletions

View File

@ -82,6 +82,7 @@ pub struct Config {
pub enable_external_completion: bool,
pub trim_strategy: TrimStrategy,
pub show_banner: bool,
pub show_clickable_links_in_ls: bool,
}
impl Default for Config {
@ -117,6 +118,7 @@ impl Default for Config {
enable_external_completion: true,
trim_strategy: TRIM_STRATEGY_DEFAULT,
show_banner: true,
show_clickable_links_in_ls: true,
}
}
}
@ -397,6 +399,13 @@ impl Value {
eprintln!("$config.show_banner is not a bool")
}
}
"show_clickable_links_in_ls" => {
if let Ok(b) = value.as_bool() {
config.show_clickable_links_in_ls = b;
} else {
eprintln!("$config.show_clickable_links_in_ls is not a bool")
}
}
x => {
eprintln!("$config.{} is an unknown config setting", x)
}