commit 30952658e2257617c2d4a06a379cd620e6ee9781 parent 53fba5645455d3b652bf1b1c016ed3d32cf8982d Author: Jacob R. Edwards <n/a> Date: Tue, 4 Oct 2022 14:01:14 -0700 In the resume script, print matches when there are multiple Diffstat:
| M | local/bin/bin/resume | | | 15 | +++++++++++++-- |
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/local/bin/bin/resume b/local/bin/bin/resume @@ -22,7 +22,18 @@ else export base awk -F ' +# +' ' match($1, ENVIRON["book"]) { - system("mupdf " ENVIRON["base"] "/" $1 " &") - system("herbe " $2 " &") + if (book) { + print(book) + multiple = 1 + } + book = $1 + } + END { + if (multiple) + print(book) + else { + system("mupdf " ENVIRON["base"] "/" $1 " &") + system("herbe " $2 " &") + } }' < "$file" fi