main: change account order sort
Sort the accounts based on case insensitive names. Signed-off-by: Tobias Wölfel <tobias.woelfel@mailbox.org> Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
parent
1aa4fb9bff
commit
f6a7a64fa7
3 changed files with 3 additions and 3 deletions
2
aerc.go
2
aerc.go
|
@ -107,7 +107,7 @@ func buildInfo() string {
|
|||
|
||||
func usage(msg string) {
|
||||
fmt.Fprintln(os.Stderr, msg)
|
||||
fmt.Fprintln(os.Stderr, "usage: aerc [-v] [-a <account-name>] [mailto:...]")
|
||||
fmt.Fprintln(os.Stderr, "usage: aerc [-v] [-a <account-name[,account-name>] [mailto:...]")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
|
|
@ -365,7 +365,7 @@ func loadAccountConfig(path string, accts []string) ([]AccountConfig, error) {
|
|||
return nil, errors.New("account(s) not found")
|
||||
}
|
||||
sort.Slice(accounts, func(i, j int) bool {
|
||||
return accts[i] < accts[j]
|
||||
return strings.ToLower(accts[i]) < strings.ToLower(accts[j])
|
||||
})
|
||||
}
|
||||
return accounts, nil
|
||||
|
|
Loading…
Reference in a new issue