From 30ed01d43a4c4df56ea8a9eef9c17db394b0e26d Mon Sep 17 00:00:00 2001 From: Kris Yotam Date: Sat, 21 Mar 2026 00:48:56 -0500 Subject: [PATCH] stask ls shows tasks in a list --- stask.1 | 6 ++++++ stask.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/stask.1 b/stask.1 index ab53a257c61b330e15963d40f199097ee61ebf04..7b129dce3717763a5017373123c36e613355104d 100644 --- a/stask.1 +++ b/stask.1 @@ -78,6 +78,12 @@ Print version and exit. List all task lists with task counts and creation dates. This is the default when no arguments are given. .TP +.BI ls " list" +Show all tasks in +.IR list . +Equivalent to +.BI stask " list" . +.TP .BI new " list" Create a new task list named .IR list . diff --git a/stask.c b/stask.c index 9a69121fcc65ea73d5ed02be0c340c4a40b67f71..654bfc9299425b84a21548178951d37a4e2919c0 100644 --- a/stask.c +++ b/stask.c @@ -223,8 +223,10 @@ main(int argc, char *argv[]) if (db_open(&tdb) < 0) return 1; - if (argc < 2 || strcmp(argv[1], "ls") == 0) { + if (argc < 2 || (argc == 2 && strcmp(argv[1], "ls") == 0)) { cmd_ls(&tdb); + } else if (argc == 3 && strcmp(argv[1], "ls") == 0) { + cmd_show(&tdb, argv[2]); } else if (strcmp(argv[1], "new") == 0) { if (argc < 3) usage(); cmd_new(&tdb, argv[2]);