Skip to content

Commit f09e947

Browse files
committed
Fix VS Code Shell Integration with p10k instant prompt
Refs romkatv/powerlevel10k#2513 (comment)
1 parent 142d42f commit f09e947

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

home/dot_local/bin/executable_code

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ elif [ "${is_wsl}" = true ]; then
151151
if [ "${is_vscode_terminal_native}" = true ]; then
152152
# Already inside native VS Code terminal, no need to warn again
153153
export DONT_PROMPT_WSL_INSTALL=1
154-
else
154+
elif [ "${is_vscode_terminal}" = false ]; then
155155
echo "INFO(dotfiles-code): using code from windows (set NO_REMOTE=1 to disable this)" >&2
156156
executables=$(echo "${executables}" | grep '^/mnt/.*$' || true)
157157
fi

home/dot_zshrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ if command -v kubectl >/dev/null; then
130130
compdef kubecolor=kubectl
131131
fi
132132

133+
# https://github.com/romkatv/powerlevel10k/issues/2513#issuecomment-3539890949
134+
if [[ "${TERM_PROGRAM}" == "vscode" ]]; then
135+
source "$(code --locate-shell-integration-path zsh)"
136+
fi
137+
133138
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
134139
if [[ -f "${HOME}/.p10k.zsh" ]]; then
135140
source "${HOME}/.p10k.zsh"

0 commit comments

Comments
 (0)