From 2a19db986c55bcef909126d3c13999f9ded8dd4c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 8 Jun 2024 16:21:46 +0200 Subject: [PATCH] cd_path --- cd.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cd.sh b/cd.sh index 5bec963..b12c1e7 100644 --- a/cd.sh +++ b/cd.sh @@ -40,6 +40,9 @@ cd_main () { cd_set_environment_variables () { cd_step "Set environment variables" + # set path + CD_PATH="$(realpath "${0}")" + cd_echo "CD_PATH" # set operating system id CD_OS_ID="$(cd_grep_os ID)" case "${CD_OS_ID}" in @@ -105,6 +108,7 @@ cd_set_environment_variables () { esac ;; esac + cd_split cd_echo "CD_OS_ID" "CD_OS_VERSION" # universal CD_DNS_FILE="/etc/resolv.conf" @@ -583,12 +587,9 @@ CD_STEP = $((CD_STEP+1)) } cd_switch_to_python () { -local path cd_step "Switch to Python" - # - path="$(realpath "${0}")" echo "\ -${path} +${CD_PATH} ↓ ${CD_PYTHON_PACKAGES}/${CD_GIT_CHILD}" "${CD_PYTHON_ALIAS}" -m "${CD_GIT_CHILD}" "${@}"