From 2950d919a5c5a55bd0eb53d6c41f989d8b70bd55 Mon Sep 17 00:00:00 2001 From: Jason Cox Date: Thu, 22 Aug 2024 22:35:37 -0400 Subject: reload: reload everything if no flags are provided Currently, the :reload command silently does nothing if no flags are provided. Eliminate this confusion by reloading all reloadable configs in the absence of flags. Signed-off-by: Jason Cox Reviewed-by: Koni Marti Acked-by: Robin Jarry --- commands/reload.go | 6 ++++++ doc/aerc.1.scd | 3 +++ 2 files changed, 9 insertions(+) diff --git a/commands/reload.go b/commands/reload.go index cd32bb36..2888ef90 100644 --- a/commands/reload.go +++ b/commands/reload.go @@ -47,6 +47,12 @@ func (Reload) Aliases() []string { } func (r Reload) Execute(args []string) error { + if !r.Binds && !r.Conf && r.Style == "" { + r.Binds = true + r.Conf = true + r.Style = config.Ui.StyleSetName + } + reconfigure := false if r.Binds { diff --git a/doc/aerc.1.scd b/doc/aerc.1.scd index d178eb5f..9d1d3302 100644 --- a/doc/aerc.1.scd +++ b/doc/aerc.1.scd @@ -274,6 +274,9 @@ These commands work in any context. Hot-reloads the config files for the key binds and general *aerc* config. Reloading of the account config file is not supported. + If no flags are provided, _binds.conf_, _aerc.conf_, and the current + styleset will all be reloaded. + *-B*: Reload _binds.conf_. *-C*: Reload _aerc.conf_. -- cgit