diff options
author | Jeffas <dev@jeffas.io> | 2020-06-10 22:08:28 +0100 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2020-06-13 10:12:53 +0200 |
commit | 24c95096190d45e84efad87f67dbc91d34086c07 (patch) | |
tree | 590c5355ba718f372ee29e76f11399065721bfc2 | |
parent | d841c8c251ed632b86ac73646f35f1157819a1e9 (diff) | |
download | aerc-24c95096190d45e84efad87f67dbc91d34086c07.tar.gz |
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.
-rw-r--r-- | aerc.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 } |