From bb0f1801402e98266d2554a5f002dc8ce0419808 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Sat, 19 Feb 2022 14:06:57 +0100 Subject: config: do not hardcode sharedir Instead of using a static SHAREDIR at compile time, use a list of standard paths to use at runtime for templates, config files and stylesets. This implies removing all default filters in the default configuration. Replace them with basic commands. New users can configure the filters as they wish. Signed-off-by: Robin Jarry --- aerc.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'aerc.go') diff --git a/aerc.go b/aerc.go index 6467c61..555b3a3 100644 --- a/aerc.go +++ b/aerc.go @@ -86,10 +86,8 @@ func getCompletions(aerc *widgets.Aerc, cmd string) []string { return completions } -var ( - ShareDir string - Version string -) +// set at build time +var Version string func usage() { log.Fatal("Usage: aerc [-v] [mailto:...]") @@ -152,7 +150,7 @@ func main() { logger = log.New(logOut, "", log.LstdFlags) logger.Println("Starting up aerc") - conf, err := config.LoadConfigFromFile(nil, ShareDir, logger) + conf, err := config.LoadConfigFromFile(nil, logger) if err != nil { fmt.Fprintf(os.Stderr, "Failed to load config: %v\n", err) os.Exit(1) -- cgit v1.2.3