aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@firemail.cc>2023-07-05 12:02:49 +0530
committersinanmohd <sinan@firemail.cc>2023-07-05 12:02:49 +0530
commit4b9029ef427db8379495a10de65bec8b5ac406f4 (patch)
tree452e95d260cb9bf6cbab69b08683a7ee518c8240
parent37409bbf57cbe87431d90afc62f783b84f856752 (diff)
dbook: fail gracefully when bookmarks is empty
-rwxr-xr-xdbook2
1 files changed, 2 insertions, 0 deletions
diff --git a/dbook b/dbook
index 81a8dd1..2557a9a 100755
--- a/dbook
+++ b/dbook
@@ -289,6 +289,8 @@ main()
;;
"")
dep_check "xdg-open"
+ [ -s "$book_conf" ] ||
+ die "no bookmarks, try dbook -h"
data="$(parse_name | "$menu" -p " " -l 25 | parse_data)"
[ -z "$data" ] &&