From 090c7780d9a13fa7c2a0a45c75905ba8bb2ef30e Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Sat, 12 Mar 2022 16:02:41 +0100 Subject: [PATCH] Use . for sourcing (POSIX standard) --- catmd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catmd.sh b/catmd.sh index cf2591a..72100c5 100755 --- a/catmd.sh +++ b/catmd.sh @@ -377,7 +377,7 @@ FO_QUOTE='\033[96;100m' # Use linefeeder for input handling WDIR="$(cd "$(dirname -- "$(realpath ${BASH_SOURCE[0]})")" >>/dev/null 2>&1 && pwd)" -source ${WDIR}/linefeeder/linefeeder.sh +. ${WDIR}/linefeeder/linefeeder.sh # Provide catmd also as function if this script is sourced catmd() { @@ -385,7 +385,7 @@ catmd() { echo -en "$FO_RESET" } -### Check if script is sourced +### Check if script is sourced for all kinds of shells ### https://stackoverflow.com/a/28776166 sourced=0 if [ -n "$ZSH_EVAL_CONTEXT" ]; then