summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Baylis <charles.baylis@linaro.org>2015-02-25 16:10:21 +0000
committerCharles Baylis <charles.baylis@linaro.org>2015-02-25 16:31:25 +0000
commit5f590ee94178a5590d165a8bc14c8ed6b859b70a (patch)
tree24141fea7bf309abd0011088afda053373635dd4
parenta0a3367dd991b71ee5c055daa2766f1c489bc58e (diff)
Allow user to control preferred editor
If $EDITOR is defined in the environment, then don't override it.
-rwxr-xr-xbackflip4
1 files changed, 2 insertions, 2 deletions
diff --git a/backflip b/backflip
index 3afd3ce..c40879b 100755
--- a/backflip
+++ b/backflip
@@ -15,7 +15,7 @@ LINARO_REF_BRANCH=linaro-${VERSION}-branch
DATE=`date +%Y-%m-%d`
NAME=`git config user.name`
EMAIL=`git config user.email`
-EDITOR=vim
+EDITOR="${EDITOR:-vim}"
# Style
NC='\e[0m'
@@ -57,7 +57,7 @@ forge_entry() {
cat $2.bcp
ask "${white}Editing [N/y] ?" user_edit
if [ "$user_edit" == "y" ]; then
- $EDITOR $2.bcp
+ "$EDITOR" $2.bcp
fi
}