diff --git a/writer.sh b/writer.sh index 300e411..b86274a 100755 --- a/writer.sh +++ b/writer.sh @@ -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