Skip to content

Commit bff5f4e

Browse files
rmnullrmnull
authored andcommitted
remove redundant extension when creating note with suffixed extension
1 parent 360a620 commit bff5f4e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

notes

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,7 @@ new_note() {
119119
fi
120120
mkdir -p "$(dirname "$notes_dir/$note_name")"
121121

122-
ext="${note_name#*.}"
123-
if [[ ext = $note_name ]]; then # lacks extension
124-
open_note "$note_name.$NOTES_EXT"
125-
else
126-
open_note "$note_name"
127-
fi
122+
open_note "$note_name"
128123
}
129124

130125
remove_note() {

0 commit comments

Comments
 (0)