aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2017-05-18 11:32:02 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2017-05-18 11:32:02 +0200
commite66c5ecbcaed98f0379953cef7a556fb50659526 (patch)
treee9a63b3f508cd4938289869dd44c736fd8aa23e7
parentc61e937414c2c78a4baec80c96bbc49692ba5b8d (diff)
downloaddiary-e66c5ecbcaed98f0379953cef7a556fb50659526.tar.gz
diary-e66c5ecbcaed98f0379953cef7a556fb50659526.zip
only jump to diary_location if its definedHEADmaster
-rwxr-xr-xdiary6
1 files changed, 4 insertions, 2 deletions
diff --git a/diary b/diary
index 724bca5..0eb9455 100755
--- a/diary
+++ b/diary
@@ -140,7 +140,7 @@ else
fi
-pushd $diary_location > /dev/null
+[ -n "$diary_location" ] && pushd $diary_location > /dev/null
# set defaults
if [ ! "$EDITOR" ]
@@ -159,5 +159,7 @@ help) shift; cmd_help "$@" ;;
*) cmd_edit_or_usage "$@" ;;
esac
-popd > /dev/null
+[ -n "$diary_location" ] && popd > /dev/null
+
+exit 0