-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Prepended (.venv) when terminal shell already adds it #23736
Comments
Hello, Thank you for filing this issue. Are you able to post: It would be great if you can share contents inside your ~/.zshrc To help diagnose the issue, could you also further share:
Output for
|
@andyshinn Also when you say previously, do you mean in terminal instance outside of VS Code? |
I meant that this wasn't a problem in previous weeks. It started happening after a recent VS Code or Python extension update. My `.zshrc` after sanitizing is:# shellcheck shell=bash
HISTFILE=~/.histfile
HISTSIZE=100000
SAVEHIST=100000
setopt appendhistory
setopt sharehistory
bindkey -e
zstyle :compinstall filename '/Users/ashinn/.zshrc'
autoload -Uz compinit
compinit
autoload -Uz bashcompinit
autoload zmv
bashcompinit
setopt NO_NOMATCH
export HOMEBREW_GITHUB_API_TOKEN=""
export HOMEBREW_NO_ENV_HINTS=1
export DOCKER_BUILDKIT=1
export _ARGCOMPLETE_SHELL=tcsh
export NPM_CONFIG_FUND=false
export NPM_CONFIG_AUDIT=false
export KICS_QUERIES_PATH=/opt/homebrew/opt/kics/share/kics/assets/queries
# export FZF_CTRL_R_OPTS="--no-sort"
# export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
# export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
# export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
export PATH="/opt/homebrew/sbin:$PATH"
export PATH="/opt/homebrew/opt/gnu-tar/libexec/gnubin:$PATH"
export VIRTUAL_ENV_DISABLE_PROMPT=1
alias dri='docker run --rm -ti'
alias d='docker'
alias g='git'
# alias a='awsume'
alias a='php artisan'
alias t='terraform'
alias s='ssh-add ~/.ssh/andy'
alias p='podman'
alias awsume="source awsume"
eval "$(/opt/homebrew/bin/brew shellenv)"
eval "$(/opt/homebrew/bin/starship init zsh --print-full-init)"
eval "$(jump shell)"
eval "$(direnv hook zsh)"
# eval "$(rbenv init - zsh)"
eval "$(mise activate zsh)"
fpath=(~/.awsume/zsh-autocomplete/ $fpath)
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
function tfe() {
if [ -z "$1" ]; then
echo "Usage: tf <project> <terraform arguments>"
return
fi
local folder
folder="$1"; shift
pushd "$folder" > /dev/null || exit 1
command terraform "$@"
popd > /dev/null || exit 1
}
function find() {
{ LC_ALL=C command find -x "$@" 3>&2 2>&1 1>&3 | \
grep -v -e 'Permission denied' -e 'Operation not permitted' >&3; \
[ $? = 1 ]; \
} 3>&2 2>&1
}
function decodests() {
aws sts decode-authorization-message --encoded-message "$@" | jq '.DecodedMessage | fromjson'
} And the Python trace output:
|
Apologies for late response and thanks again for this detailed log here. We've had very similar issue: Give this a read: #23137. Way to resolve this would be #23159 so please feel free to go give a thumbs up. This is the limitation we currently have with the new terminal env variable activation since we do not have context of user's shell initialization file, it should be resolved once #23159 is taken care of. Lets track the issue there but let me know if you have any other questions. Thanks. |
Type: Bug
Behaviour
I use the Starship shell integration with zsh on macOS. A recent version of this Python extension seems to not play nicely with it or has started prepending
(.venv)
toPS1
where it wasn't previously.The logs for the Python extension show:
I didn't see any option to disable it. My shell now gets a new line added to it when
(.venv)
gets activated even though Starship already handles this:Previously it would be:
Screenshot example:
Steps to reproduce:
.venv
already created..venv
addon activated.Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Extension version: 2024.8.1
VS Code version: Code 1.91.0 (ea1445cc7016315d0f5728f8e8b12a45dc0a7286, 2024-07-01T18:53:23.353Z)
OS version: Darwin arm64 23.5.0
Modes:
python.languageServer
setting: DefaultUser Settings
Installed Extensions
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: