Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing TERM_PROGRAM and TERM_PROGRAM_VERSION environment variables when launched via window manager, Dock, or launcher #21951

Open
1 task done
networkhermit opened this issue Dec 13, 2024 · 0 comments
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue

Comments

@networkhermit
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

When I launch Zed via system launcher and open a project, the login shell exited with exit status 1, the LSP path lookup also fails.

This is partly due to my zshrc automatically exec tmux upon startup, but Zed already set TERM_PROGRAM and TERM_PROGRAM_VERSION environment variables in integrated terminal (see #4571 and #14213 ), it would be more consistent if we could provide these environment variables to login shell too.

if [[ -z "${TMUX}" ]] && [[ -z "${VIM}" ]]; then
    if [[ "${TERM}" = xterm-256color ]] || [[ "${TERM}" = tmux-256color ]]; then
        case ${TERM_PROGRAM} in
        vscode | zed)
            ;;
        *)
            exec tmux new-session -A -D -s main
            ;;
        esac
    fi
fi

Environment

Zed: v0.165.4 (Zed)
OS: macOS 15.2.0
Memory: 16 GiB
Architecture: aarch64

If applicable, add screenshots or screencasts of the incorrect state / behavior

No response

If applicable, attach your Zed.log file to this issue.

Zed.log
2024-12-13T11:06:35.707747+08:00 [INFO] building git repository, `.git` path in the worktree: ".git"
2024-12-13T11:06:35.801047+08:00 [ERROR] login shell exited with exit status: 1
@networkhermit networkhermit added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue
Projects
None yet
Development

No branches or pull requests

1 participant