ned: fixed notes not being put in the notes dir
This commit is contained in:
parent
83acbc6ad9
commit
ce104e4922
1 changed files with 4 additions and 2 deletions
|
@ -77,7 +77,9 @@ new() {
|
|||
fi
|
||||
|
||||
# Note dir
|
||||
NEW_NOTE_DIR="$BASE_DIR/$(cd "$BASE_DIR" && fd -d 1 | sed 's-\./--g' | $FZF_SEARCH "$2")" || exit
|
||||
NEW_NOTE_DIR="$BASE_DIR/$(cd "$BASE_DIR" && fd -d 1 | sed 's-\./--g' | $FZF_SEARCH "$2")/notes" || exit
|
||||
|
||||
[ -d "${NEW_NOTE_DIR%/*}" ] || mkdir "${NEW_NOTE_DIR%/*}"
|
||||
|
||||
if [ -f "$NEW_NOTE_DIR/$NEW_NOTE_NAME" ]; then
|
||||
open_file "$NEW_NOTE_DIR/$NEW_NOTE_NAME"
|
||||
|
@ -85,7 +87,7 @@ new() {
|
|||
cd "$NEW_NOTE_DIR" || exit
|
||||
# apply a template for notes
|
||||
cat <<-EOF >> "$NEW_NOTE_DIR/$NEW_NOTE_NAME"
|
||||
# ${NEW_NOTE_NAME%%$DEFAULT_NEW_NOTE_EXT}
|
||||
# ${NEW_NOTE_NAME%%"$DEFAULT_NEW_NOTE_EXT"}
|
||||
|
||||
<!-- vim: wrap nonu nornu
|
||||
-->
|
||||
|
|
Loading…
Add table
Reference in a new issue