diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa59e76f..943b789d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,9 @@ jobs: xcodebuild -version xcrun --sdk macosx --show-sdk-path + - name: Download Metal Toolchain + run: xcodebuild -downloadComponent MetalToolchain + - name: Build GhosttyKit.xcframework run: | set -euo pipefail diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6dc0b3bf..4cbcb8dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,6 +46,9 @@ jobs: brew install zig npm install --global create-dmg + - name: Download Metal Toolchain + run: xcodebuild -downloadComponent MetalToolchain + - name: Build GhosttyKit.xcframework run: | cd ghostty diff --git a/Resources/shell-integration/cmux-zsh-integration.zsh b/Resources/shell-integration/cmux-zsh-integration.zsh index b4c3f020..9c20fd6a 100644 --- a/Resources/shell-integration/cmux-zsh-integration.zsh +++ b/Resources/shell-integration/cmux-zsh-integration.zsh @@ -266,9 +266,23 @@ _cmux_precmd() { fi if (( should_git )); then + local can_launch_git=1 if [[ -n "$_CMUX_GIT_JOB_PID" ]] && kill -0 "$_CMUX_GIT_JOB_PID" 2>/dev/null; then - : # previous update still running - else + # If a stale probe is still running but the cwd changed (or we just ran + # a git command), restart immediately so branch state isn't delayed + # until the next user command/prompt. + # Note: this repeats the cwd check above on purpose. The first check + # decides whether we should refresh at all; this one decides whether + # an in-flight older probe can be reused vs. replaced. + if [[ "$pwd" != "$_CMUX_GIT_LAST_PWD" ]] || (( _CMUX_GIT_FORCE )); then + kill "$_CMUX_GIT_JOB_PID" >/dev/null 2>&1 || true + _CMUX_GIT_JOB_PID="" + else + can_launch_git=0 + fi + fi + + if (( can_launch_git )); then _CMUX_GIT_FORCE=0 _CMUX_GIT_LAST_PWD="$pwd" _CMUX_GIT_LAST_RUN=$now