@@ -495,6 +495,10 @@ impl CliSession {
|
|||||||
|
|
||||||
let current = output::get_theme();
|
let current = output::get_theme();
|
||||||
let new_theme = match current {
|
let new_theme = match current {
|
||||||
|
output::Theme::Ansi => {
|
||||||
|
println!("Switching to Light theme");
|
||||||
|
output::Theme::Light
|
||||||
|
}
|
||||||
output::Theme::Light => {
|
output::Theme::Light => {
|
||||||
println!("Switching to Dark theme");
|
println!("Switching to Dark theme");
|
||||||
output::Theme::Dark
|
output::Theme::Dark
|
||||||
@@ -503,10 +507,6 @@ impl CliSession {
|
|||||||
println!("Switching to Ansi theme");
|
println!("Switching to Ansi theme");
|
||||||
output::Theme::Ansi
|
output::Theme::Ansi
|
||||||
}
|
}
|
||||||
output::Theme::Ansi => {
|
|
||||||
println!("Switching to Light theme");
|
|
||||||
output::Theme::Light
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
output::set_theme(new_theme);
|
output::set_theme(new_theme);
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ thread_local! {
|
|||||||
.unwrap_or_else(||
|
.unwrap_or_else(||
|
||||||
Config::global().get_param::<String>("GOOSE_CLI_THEME").ok()
|
Config::global().get_param::<String>("GOOSE_CLI_THEME").ok()
|
||||||
.map(|val| Theme::from_config_str(&val))
|
.map(|val| Theme::from_config_str(&val))
|
||||||
.unwrap_or(Theme::Dark)
|
.unwrap_or(Theme::Ansi)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user