mirror of
https://git.sr.ht/~sircmpwn/aerc
synced 2024-11-23 16:42:07 +01:00
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.
This commit is contained in:
parent
d841c8c251
commit
24c9509619
2
aerc.go
2
aerc.go
@ -6,6 +6,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.sr.ht/~sircmpwn/getopt"
|
"git.sr.ht/~sircmpwn/getopt"
|
||||||
@ -79,6 +80,7 @@ func getCompletions(aerc *widgets.Aerc, cmd string) []string {
|
|||||||
for _, set := range getCommands((*aerc).SelectedTab()) {
|
for _, set := range getCommands((*aerc).SelectedTab()) {
|
||||||
completions = append(completions, set.GetCompletions(aerc, cmd)...)
|
completions = append(completions, set.GetCompletions(aerc, cmd)...)
|
||||||
}
|
}
|
||||||
|
sort.Strings(completions)
|
||||||
return completions
|
return completions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user