aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Wölfel <tobias.woelfel@mailbox.org>2022-09-07 08:31:12 +0200
committerRobin Jarry <robin@jarry.cc>2022-09-10 09:43:29 +0200
commitf6a7a64fa7b973abad48a82af5423bfabde92f03 (patch)
treeab9ba306e494b5e6ffe7aea12338773fb1bcdd52
parent1aa4fb9bff14e6857362f22e668369a47e43bc24 (diff)
downloadaerc-f6a7a64fa7b973abad48a82af5423bfabde92f03.tar.gz
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>
-rw-r--r--aerc.go2
-rw-r--r--config/config.go2
-rw-r--r--doc/aerc.1.scd2
3 files changed, 3 insertions, 3 deletions
diff --git a/aerc.go b/aerc.go
index 4c9debff..203a232a 100644
--- a/aerc.go
+++ b/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)
}
diff --git a/config/config.go b/config/config.go
index 4d4bfe81..9f2af8f8 100644
--- a/config/config.go
+++ b/config/config.go
@@ -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
diff --git a/doc/aerc.1.scd b/doc/aerc.1.scd
index 8ceed4dd..88827955 100644
--- a/doc/aerc.1.scd
+++ b/doc/aerc.1.scd
@@ -6,7 +6,7 @@ aerc - the world's best email client
# SYNOPSIS
-_aerc_ [-v] [-a <account-name[,account-name]>] [mailto:...]
+_aerc_ [-v] [-a <account-name[,account-name]>] [mailto:...]
For a guided tutorial, use *:help tutorial* from aerc, or *man aerc-tutorial*
from your terminal.