From 24c95096190d45e84efad87f67dbc91d34086c07 Mon Sep 17 00:00:00 2001 From: Jeffas Date: Wed, 10 Jun 2020 22:08:28 +0100 Subject: [PATCH] Sort command completions Previously the completions weren't sorted which led to a difficult to navigate list, especially for the command names as it would randomly jump through the alphabet. --- aerc.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aerc.go b/aerc.go index 12d9453..17b3c57 100644 --- a/aerc.go +++ b/aerc.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "log" "os" + "sort" "time" "git.sr.ht/~sircmpwn/getopt" @@ -79,6 +80,7 @@ func getCompletions(aerc *widgets.Aerc, cmd string) []string { for _, set := range getCommands((*aerc).SelectedTab()) { completions = append(completions, set.GetCompletions(aerc, cmd)...) } + sort.Strings(completions) return completions }