commit ff091937d01c2f508c8c999d224a664585619743
parent f982bbb78de170b267a1f6947ef46c9d23af8049
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date: Sat, 31 Jul 2021 13:51:37 -0700
Use next patterns when the list command has no arguments
The ability to see what items come next as defined by the the next
patterns is very useful and works well in the list command.
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/aps/command.c b/aps/command.c
@@ -96,6 +96,11 @@ aps_list(struct aps *aps, int s, int argc, char **argv)
{
struct item *item;
+ if (!argc) {
+ argv = aps->next;
+ argc = arglen(argv);
+ }
+
item = aps->queue;
while ((item = finddir(findnext, item, aps->queue, argv, argc, 0))) {
if (respadd(aps, s, item->path))