Skip to content

Commit 7936f13

Browse files
committed
Fix new command file extension
1 parent 1324b1b commit 7936f13

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

notes

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ new_note() {
103103
note_name=$resolved_name
104104
fi
105105
mkdir -p "$(dirname "$notes_dir/$note_name")"
106-
open_note "$note_name$file_ext"
106+
open_note "$note_name"
107107
}
108108

109109
remove_note() {
@@ -146,16 +146,12 @@ open_note() {
146146
local ext_check
147147
local buffer=()
148148

149-
150149
for arg in $@; do
151-
152150
ext_check=true
153151
note_path=$arg
154-
155152
if echo $note_path | grep -q '\.[a-z]'; then
156153
ext_check=false
157154
fi
158-
159155
if [[ "$note_path" != *$file_ext ]] && $ext_check; then
160156
note_path="$note_path$file_ext"
161157
fi

0 commit comments

Comments
 (0)