v0.4.3 : persistance du theme actif choisi
release / linux (push) Successful in 13m24s
release / windows (push) Canceled after 0s
release / macos (push) Canceled after 0s

- le REPL 'theme <name>' applique ET sauvegarde le theme (settings.theme dans le fichier de config actif, cree s'il manque) via persist_setting
- correction racine : config::merge ignorait settings.theme - la valeur persistee n etait jamais relue au chargement, le theme par defaut etait toujours reapplique apres un redemarrage
- 'am --theme <name>' reste un one-shot ; config set settings.theme <nom> fonctionne egalement
- aides mises a jour (banniere, help theme)
- tests de persistance + relecture au demarrage, man pages regenerees, version 0.4.3
This commit is contained in:
2026-08-17 15:23:28 -04:00
parent 91253b79c5
commit 53893f2967
10 changed files with 166 additions and 25 deletions
+11 -4
View File
@@ -706,7 +706,7 @@ pub fn banner_box(
rows.push(inner(dim(&line, theme, color)));
}
rows.push(inner(dim(
" 'am --theme <name>' to switch · settings.theme in the config",
" 'theme <name>' to switch (saved) · 'am --theme <name>' for a one-shot",
theme,
color,
)));
@@ -1831,6 +1831,15 @@ fn theme_command(app: &App, arg: Option<&str>) {
Some(name) => match crate::theme::find(name) {
Some(t) => {
app.set_theme(t);
// Persist the choice (settings.theme in the active config
// file) so it survives an exit and restart.
if let Err(e) =
crate::commands::config_cmd::persist_setting(app, "settings.theme", t.name)
{
app.log.error(format!(
"theme applied for this session, but it could not be saved to the config: {e:#}"
));
}
let color = app.color();
println!(
"{} {}",
@@ -1871,9 +1880,7 @@ fn print_theme_status(app: &App) {
println!(" {}", theme.dimmed(&format!("⇄ {}", others.join(" · "))));
println!(
" {}",
theme.dimmed(
"'theme <name>' to switch · '--theme <name>' or settings.theme to change the default"
)
theme.dimmed("'theme <name>' to switch (saved to the config) · 'am --theme <name>' for a one-shot")
);
}