Archived
1
0
Fork 0

Updated writer.sh to use existing nvim if defined

This commit is contained in:
Siina Mashek 2024-02-17 16:01:00 +02:00
parent cbbf2340e4
commit 4de2542e90

View file

@ -1,5 +1,8 @@
#!/bin/bash
# writer 1.0 - @k@layer8.space - mit
# writer 1.2 - @k@layer8.space - mit
# Use the assigned editor, if any, else use nano
[[ ${EDITOR:-"unset"} == "unset" ]] && EDITOR=nano
nlog() {
local ORANGE='\033[0;33m'
@ -11,5 +14,5 @@ mkdir -p notes
current_date=$(date +%Y-%m-%d)
nlog "opening note notes/$current_time.txt"
filename="notes/${current_date}.txt"
nano "$filename"
$EDITOR "$filename"
./noter.sh