From 9641876d432f97675864051517f9301ce3bdb58d Mon Sep 17 00:00:00 2001 From: Yuhao Qing Date: Thu, 18 Dec 2025 18:10:03 +0800 Subject: [PATCH] Add a new option --- zshrc/merlin_devbox.zsh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/zshrc/merlin_devbox.zsh b/zshrc/merlin_devbox.zsh index 526ed6f..1a61e97 100644 --- a/zshrc/merlin_devbox.zsh +++ b/zshrc/merlin_devbox.zsh @@ -1,3 +1,19 @@ +# # Patch prep_env.sh for zsh compatibility (only if not already patched) +# _prep_env="/workspace/vscode/prep_env.sh" +# if [[ -f "$_prep_env" ]] && ! grep -q '# PATCHED_FOR_ZSH' "$_prep_env" 2>/dev/null; then +# sed -i \ +# -e '1a# PATCHED_FOR_ZSH' \ +# -e 's/^shopt -s histappend$/[[ -n "${BASH_VERSION}" ]] \&\& shopt -s histappend/' \ +# -e 's/\${!\([^}]*\)}/\$( [[ -n "\${ZSH_VERSION}" ]] \&\& echo "\${(P)\1}" || echo "\${!\1}" )/g' \ +# -e 's/cur_dir="\$(cd "\$(dirname "\$0")" && pwd)"/cur_dir="\/workspace\/vscode"/' \ +# "$_prep_env" +# fi + +# # Now source the patched script directly +# source "$_prep_env" + + + # Set cur_dir before sourcing so prep_env.sh uses the correct path export cur_dir="/workspace/vscode"