From 8b8db40fa51fd314e42363574bbae52870fc2bac Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Tue, 1 Aug 2023 11:31:05 +0530 Subject: dbook: delete saved data when key is removed --- dbook | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dbook') 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" ;; "") -- cgit v1.2.3