Fix "Open terminal here" not working in apps

This commit is contained in:
JeremyStar™ 2024-06-03 11:41:53 +02:00
parent b28a7774bf
commit 3294f8f6b2
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -1,6 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck disable=SC2154 # 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 # 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 if [ -n "${BASHRCD_SYSTEM}" ] && [ -d "${HOME}/.bashrc.d" ] && [ -f "${HOME}/.bashrc.d/startup.sh" ]; then
unset BASHRCD_SYSTEM unset BASHRCD_SYSTEM
@ -86,5 +90,5 @@ for file in startup.d/*; do
done done
# Finish startup # Finish startup
cd "${HOME}" cd "${BASHRCD_WORKDIR}"
unset BASHRCD_SYSTEM unset BASHRCD_SYSTEM