diff --git a/newpost.sh b/newpost.sh index c20df0f..be27b2c 100755 --- a/newpost.sh +++ b/newpost.sh @@ -1,6 +1,6 @@ -#! /bin/bash +#!/bin/bash -date=$(date --rfc-3339=date) +date=$(date +%Y-%m-%d) title= author= @@ -28,7 +28,7 @@ function main { done postname="./site/posts/$date-${title// /-}.md" echo -e "---\ntitle: ${title}\nauthor: ${author}\ndescription: \n---" >> $postname - vim $postname + ${VISUAL:-vim} $postname } main