diff --git a/Resources/shell-integration/cmux-bash-integration.bash b/Resources/shell-integration/cmux-bash-integration.bash index 1981b9f2..fe66dbfa 100644 --- a/Resources/shell-integration/cmux-bash-integration.bash +++ b/Resources/shell-integration/cmux-bash-integration.bash @@ -451,6 +451,8 @@ _cmux_prompt_command() { _CMUX_GIT_LAST_PWD="$pwd" _CMUX_GIT_LAST_RUN=$now { + # Skip git operations if not in a git repository to avoid TCC prompts + git rev-parse --git-dir >/dev/null 2>&1 || return 0 local branch dirty_opt="" branch=$(git branch --show-current 2>/dev/null) if [[ -n "$branch" ]]; then diff --git a/Resources/shell-integration/cmux-zsh-integration.zsh b/Resources/shell-integration/cmux-zsh-integration.zsh index 6077a528..b468984c 100644 --- a/Resources/shell-integration/cmux-zsh-integration.zsh +++ b/Resources/shell-integration/cmux-zsh-integration.zsh @@ -236,6 +236,9 @@ _cmux_report_git_branch_for_path() { [[ -n "$CMUX_TAB_ID" ]] || return 0 [[ -n "$CMUX_PANEL_ID" ]] || return 0 + # Skip git operations if not in a git repository to avoid TCC prompts + git -C "$repo_path" rev-parse --git-dir >/dev/null 2>&1 || return 0 + local branch dirty_opt="" first branch="$(git -C "$repo_path" branch --show-current 2>/dev/null)" if [[ -n "$branch" ]]; then