aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cdlog.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/cdlog.sh b/cdlog.sh
index d8aa931..f0bb25f 100644
--- a/cdlog.sh
+++ b/cdlog.sh
@@ -1,5 +1,8 @@
# License at bottom.
+# Bail if not interactive
+[[ $- == *i* ]] || return 0
+
# Globals
declare -a cdlog_hist # directory history
declare -A cdlog_alias # cd aliases