mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 06:46:40 +00:00
fix(shell): improve conditions for skipping interactive shell setup
This commit is contained in:
18
zshrc
18
zshrc
@@ -2,10 +2,20 @@
|
|||||||
# ZSH Interactive Shell Setup
|
# ZSH Interactive Shell Setup
|
||||||
#
|
#
|
||||||
|
|
||||||
# If we are in VSCode's environment resolution process, we should behave as if
|
# There's a few scenarios where we should bail from interactive shell setup, as
|
||||||
# this is a non-interactive shell by bailing before we load any of our
|
# in our full interactive shell setup we have tools like `mise` and others that
|
||||||
# interactive shell setup.
|
# continuously update `PATH` among other things. So scenarios that need a static
|
||||||
if [[ -n $VSCODE_RESOLVING_ENVIRONMENT ]]; then
|
# environment don't play nice with this.
|
||||||
|
#
|
||||||
|
# The following scenarios are the ones we bail from:
|
||||||
|
#
|
||||||
|
# - VSCode's environment resolution process, as all it cares for it to load PATH
|
||||||
|
# and other environment variables. We specifically have tools like `mise` that
|
||||||
|
# continuously update PATH,
|
||||||
|
# - Anything that sets the `TERM` environment variable to `dumb`. This includes
|
||||||
|
# Cursor's agent setup, which is used when the agent runs terminal commands.
|
||||||
|
#
|
||||||
|
if [[ -n "$VSCODE_RESOLVING_ENVIRONMENT" ]] || [[ "$TERM" == "dumb" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user