diff --git a/new_article.sh b/new_article.sh index dff4c77..b0c885d 100755 --- a/new_article.sh +++ b/new_article.sh @@ -39,6 +39,7 @@ EDITOR=${EDITOR:-$(update-alternatives --list editor | head -n1)} # If not present set it to vi EDITOR=${EDITOR:-vi} -# Open the newly created file, openfully in the chosen editor - -$EDITOR content/articles/"$filename" +# Open the newly created file, hopefully in the chosen editor +if [ -n "$EDITOR" ]; then + $EDITOR content/articles/"$filename" +fi