From 6132c2374bd8e06fd79d4d9a236f2c770e0390db Mon Sep 17 00:00:00 2001 From: Ahmed Date: Thu, 18 Jun 2026 16:24:03 +0300 Subject: fix: "alfred list ls command ordering --- alfred/mlmmj.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/alfred/mlmmj.py b/alfred/mlmmj.py index 8c3749b..b58a669 100644 --- a/alfred/mlmmj.py +++ b/alfred/mlmmj.py @@ -135,8 +135,9 @@ def cmd_list(bot, trigger): return items = sorted( - f for f in os.listdir(ARCHIVE) - if os.path.isfile(os.path.join(ARCHIVE, f)) and not f.endswith('.html') + (f for f in os.listdir(ARCHIVE) + if os.path.isfile(os.path.join(ARCHIVE, f)) and not f.endswith('.html')), + key=lambda f: int(f) if f.isdigit() else f ) if not items: bot.say("archive: empty") -- cgit v1.2.3