aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@firemail.cc>2023-08-01 11:31:05 +0530
committersinanmohd <sinan@firemail.cc>2023-08-01 13:57:28 +0530
commit8b8db40fa51fd314e42363574bbae52870fc2bac (patch)
treee603fcdd2aa878ec03fbe8f1d931b57c64bbd23a
parent996a41ae087b8104e5218a456c58b1a0b72eed95 (diff)
dbook: delete saved data when key is removed
-rwxr-xr-xdbook6
1 files changed, 6 insertions, 0 deletions
diff --git a/dbook b/dbook
index dc71f1d..e1c082c 100755
--- a/dbook
+++ b/dbook
@@ -262,6 +262,12 @@ insert|save)
;;
rm)
key="${1:-$(key_menu)}" || exit 1
+
+ val="$(parse_data getval "$key")"
+ case "$val" in
+ ${book_data}/*) rm "$val";;
+ esac
+
rm_data "$key"
;;
"")