~sircmpwn/aerc

24c95096190d45e84efad87f67dbc91d34086c07 — Jeffas 26 days ago d841c8c
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.
1 files changed, 2 insertions(+), 0 deletions(-)

M aerc.go
M aerc.go => aerc.go +2 -0
@@ 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
}