-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
\ path separators are interpreted as escape sequences when HOME is set in bash terminal #240539
Comments
Here's a work around. The automatic setting of environment variables happens after shell startup, so we can't work around this in the shell configuration alone. However it can be done by disabling terminal shell integration automatic script injection, and preserving and restoring HOME either side of terminal shell integration manual installation:
if [ "$TERM_PROGRAM" == "vscode" ]
then
tmp="$HOME"
. "$(code --locate-shell-integration-path bash)"
HOME="$tmp"
fi |
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.97.1. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding! |
Note that Extension Bisect identified the Python extension as the cause. |
Thanks, yes it is still present in 1.97.1. It is also present in 1.98.0-insider. |
In shellIntegration-bash.sh, VALUE="$(echo "$ITEM" | cut -d "=" -f 2- | sed 's/\\x3a/:/g')" |
Type: Bug
Behaviour
\
path separators are interpreted as escape sequences whenHOME
is set in bash terminalSteps to reproduce:
HOME
is set correctly: [output is reformatted slightly for compactness]HOME
is set incorrectly:That is, the path separators have been interpreted as escape codes, so the 2 character sequence
\
anda
has become a single control character\a
. Also, it is using theC:\
form rather than/c/
.Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Extension version: 2025.0.0
VS Code version: Code 1.96.4 (cd4ee3b, 2025-01-16T00:16:19.038Z)
OS version: Windows_NT x64 10.0.19045
Modes:
The text was updated successfully, but these errors were encountered: