mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 09:06:44 +00:00
feat(zshrc): skip interactive shell setup for Claude Code sessions
Add CLAUDECODE=1 environment variable check to bail early from full interactive shell setup, matching behavior for Cursor and VSCode. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
4
zshrc
4
zshrc
@@ -16,10 +16,12 @@
|
||||
# Cursor's agent setup, which is used when the agent runs terminal commands.
|
||||
# Though it does also set a proper `TERM` value sometimes, hence the check for
|
||||
# `CURSOR_AGENT` as well.
|
||||
# - Claude Code's shell sessions, identified by `CLAUDECODE=1`.
|
||||
#
|
||||
if [[ -n "$VSCODE_RESOLVING_ENVIRONMENT" ]] ||
|
||||
[[ "$TERM" == "dumb" ]] ||
|
||||
[[ "$CURSOR_AGENT" == "1" ]]; then
|
||||
[[ "$CURSOR_AGENT" == "1" ]] ||
|
||||
[[ "$CLAUDECODE" == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user