Skip to content

Commit 55f25fc

Browse files
authored
rm notes with custom ext
1 parent 7109153 commit 55f25fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

notes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ remove_note() {
151151
local note_name="$*"
152152
local to_remove="$notes_dir/$note_name"
153153

154-
if [ -f "$notes_dir/$note_name.$NOTES_EXT" ]; then
154+
if [ ! -f "$to_remove" ] && [ -f "$notes_dir/$note_name.$NOTES_EXT" ]; then
155+
# append default extension only if no file exists with exact filename given
155156
to_remove="$notes_dir/$note_name.$NOTES_EXT"
156157
fi
157158
rm "${rm_args[@]}" "$to_remove"

0 commit comments

Comments
 (0)