diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-12-19 13:58:24 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-12-19 13:58:24 -0800 |
commit | 4e6f52c13d9858800e4cf3aa029f48b30712d66d (patch) | |
tree | 6d5382e76a82810c65755e96e88c8f85f8d2c76a | |
parent | ac7f3c3f8f53773b42d33b901f73c615c60479ad (diff) | |
download | cdlog-4e6f52c13d9858800e4cf3aa029f48b30712d66d.tar.gz cdlog-4e6f52c13d9858800e4cf3aa029f48b30712d66d.tar.bz2 cdlog-4e6f52c13d9858800e4cf3aa029f48b30712d66d.zip |
Bail if not interactive.
* cdlog.sh (mainline): If Bash is not interactive, then we
exit from the script.
-rw-r--r-- | cdlog.sh | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |