diff --git a/etc/profile.d/z-aliases.sh b/etc/profile.d/z-aliases.sh index ac8c32e..342c14d 100755 --- a/etc/profile.d/z-aliases.sh +++ b/etc/profile.d/z-aliases.sh @@ -1,3 +1,8 @@ +if [ "${BASH_SOURCE-}" = "$0" ]; then + echo -e "You must source this script:\n\tsource $0" >&2 + exit 33 +fi + # show hidden files and directories alias l.='ls -d .[^.]* ..?* --color=tty 2>/dev/null' diff --git a/etc/profile.d/z-env.sh b/etc/profile.d/z-env.sh index fe82f50..2d51b39 100755 --- a/etc/profile.d/z-env.sh +++ b/etc/profile.d/z-env.sh @@ -1,3 +1,8 @@ +if [ "${BASH_SOURCE-}" = "$0" ]; then + echo -e "You must source this script:\n\tsource $0" >&2 + exit 33 +fi + EDITOR=mcedit export EDITOR diff --git a/etc/profile.d/z-ps-twtty-7.sh b/etc/profile.d/z-ps-twtty-7.sh index 754eba4..de02975 100755 --- a/etc/profile.d/z-ps-twtty-7.sh +++ b/etc/profile.d/z-ps-twtty-7.sh @@ -42,6 +42,11 @@ # - http://www.onerussian.com/Linux/bash_history.phtml # - https://debian-administration.org/article/175/BASH_history_forever. +if [ "${BASH_SOURCE-}" = "$0" ]; then + echo -e "You must source this script:\n\tsource $0" >&2 + exit 33 +fi + if [ "$PS1" ] ; then # interactive shell detection # Log the logout event. diff --git a/etc/profile.d/z-time_style.sh b/etc/profile.d/z-time_style.sh index 1412474..9c47dca 100755 --- a/etc/profile.d/z-time_style.sh +++ b/etc/profile.d/z-time_style.sh @@ -1,2 +1,7 @@ +if [ "${BASH_SOURCE-}" = "$0" ]; then + echo -e "You must source this script:\n\tsource $0" >&2 + exit 33 +fi + TIME_STYLE=long-iso export TIME_STYLE