aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sort
diff options
context:
space:
mode:
authorVitaly Ovchinnikov <v@postbox.nz>2023-09-22 20:59:29 +0000
committerRobin Jarry <robin@jarry.cc>2023-10-13 00:40:53 +0200
commitd2f92473b3d8e68aad8a7f3d3b3c6c194446713c (patch)
tree1781dbf8b1af0b45e8c074ffde19b5c09f838d1a /lib/sort
parent00ded54adde070723c665a1c5a589c3ee080b001 (diff)
downloadaerc-d2f92473b3d8e68aad8a7f3d3b3c6c194446713c.tar.gz
sort: new `flagged` sorting criteria
Add new `flagged` criteria to `:sort` command (and apparently to the `sort` config option). Good for moving important stuff up. Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz> Reviewed-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/sort')
-rw-r--r--lib/sort/sort.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sort/sort.go b/lib/sort/sort.go
index 287f986c..082ba48b 100644
--- a/lib/sort/sort.go
+++ b/lib/sort/sort.go
@@ -51,6 +51,8 @@ func parseSortField(arg string) (types.SortField, error) {
return types.SortSubject, nil
case "to":
return types.SortTo, nil
+ case "flagged":
+ return types.SortFlagged, nil
default:
return types.SortArrival, fmt.Errorf("%v is not a valid sort criterion", arg)
}