Add ! command to refetch current failed item - sacc - sacc (saccomys): simple g… | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit b3267f7121ee0e15deffd9a9f6129c1ac8e1b69a | |
parent 5b0662d5646321f91ccc9f8ec97e5fa3a65f8118 | |
Author: Quentin Rameau <[email protected]> | |
Date: Thu, 22 Jun 2017 19:07:37 +0200 | |
Add ! command to refetch current failed item | |
Diffstat: | |
sacc.c | 7 +++++++ | |
1 file changed, 7 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/sacc.c b/sacc.c | |
@@ -93,6 +93,7 @@ help(void) | |
puts("Commands:\n" | |
"N = [1-9]...: browse item N.\n" | |
"0: browse previous item.\n" | |
+ "!: refetch failed item.\n" | |
"^D, q: quit.\n" | |
"h: this help."); | |
} | |
@@ -352,6 +353,12 @@ selectitem(Item *entry) | |
if (!strcmp(buf, "q\n")) | |
return NULL; | |
+ if (!strcmp(buf, "!\n")) { | |
+ if (entry->raw) | |
+ continue; | |
+ return entry; | |
+ } | |
+ | |
item = -1; | |
if (!strcmp(buf, "h\n")) { | |
help(); |