summaryrefslogtreecommitdiff
path: root/new-post.sh
diff options
context:
space:
mode:
Diffstat (limited to 'new-post.sh')
-rwxr-xr-xnew-post.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/new-post.sh b/new-post.sh
index 44facd7..79c279a 100755
--- a/new-post.sh
+++ b/new-post.sh
@@ -25,6 +25,7 @@ while [ "$(echo $1 | head -c1)" = '-' -o "$#" -gt $numargs ]; do
"-d") td=$1; shift;;
"-V") VERBOSE=1;;
"-x") DRY_RUN=1;;
+ "--no-editor") NO_EDITOR=1;;
*)
echo "Unknown option '$arg'"
usage;;
@@ -78,3 +79,7 @@ if [ ! -z $IMG_DIR ]; then
mkdir -p "$imgDirName"
fi
fi
+
+if [ -z $DRY_RUN ] && [ -z $NO_EDITOR ]; then
+ exec $EDITOR "$postFileName"
+fi