From 3294f8f6b2fb44569fb360f38a295a60f7c8e276 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Mon, 3 Jun 2024 11:41:53 +0200 Subject: [PATCH] Fix "Open terminal here" not working in apps --- startup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index 373c8bf..ad67ca8 100755 --- a/startup.sh +++ b/startup.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash # shellcheck disable=SC2154 +# Save cwd +BASHRCD_WORKDIR=$(pwd) +[[ -z "${BASHRCD_WORKDIR}" ]] && BASHRCD_WORKDIR=${HOME} + # Cancel execution of system-wide punktdateien-bashrc if user-wide installation is detected if [ -n "${BASHRCD_SYSTEM}" ] && [ -d "${HOME}/.bashrc.d" ] && [ -f "${HOME}/.bashrc.d/startup.sh" ]; then unset BASHRCD_SYSTEM @@ -86,5 +90,5 @@ for file in startup.d/*; do done # Finish startup -cd "${HOME}" +cd "${BASHRCD_WORKDIR}" unset BASHRCD_SYSTEM