mirror of
https://github.com/nushell/nushell.git
synced 2025-08-16 23:41:40 +02:00
Remove exit_esc
and show_banner
config from explore
(#10258)
Removing 2 underused config options from `explore`. `show_banner` controls whether `For help type :help"` is shown in the message area when `explore is first launched. I don't think there's any good reason not to show it, it's not a modal dialog or anything. `exit_esc` controls whether to exit `explore` when `esc` is pressed and we can't "go up" any further (or at least that's what it's supposed to do, looking at the code I'm not so sure). IMO we don't need to make this kind of basic interaction configurable unless there's a really good reason. ## Context `explore` is complicated and we want to overhaul its design. It will be easier to make meaningful changes if `explore` is a little slimmer first, so I'm trying to pare back unused/underused code and config as a starting point. I'm gonna be making more PRs like this, I'll try to keep them small+self-contained.
This commit is contained in:
@ -50,9 +50,7 @@ fn run_pager(
|
||||
return p.run(engine_state, stack, ctrlc, information_view(), commands);
|
||||
}
|
||||
|
||||
if config.show_banner {
|
||||
p.show_message("For help type :help");
|
||||
}
|
||||
p.show_message("For help type :help");
|
||||
|
||||
if let Some(value) = has_simple_value(&data) {
|
||||
let text = value.into_abbreviated_string(config.nu_config);
|
||||
@ -146,9 +144,6 @@ fn create_config_command(commands: &[Command]) -> ConfigCmd {
|
||||
|
||||
config.register_group(ConfigOption::new(GROUP, "Highlight color in search", "highlight", default_color_list()));
|
||||
|
||||
config.register_group(ConfigOption::boolean(GROUP, "Show help banner on open", "help_banner"));
|
||||
config.register_group(ConfigOption::boolean(GROUP, "Pressing ESC causes a program exit", "exit_esc"));
|
||||
|
||||
config
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user