mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 14:36:08 +02:00
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:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user