Skip to content
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

Allow running shell integration scripts inside an rc file #151933

Closed
Tyriar opened this issue Jun 13, 2022 · 0 comments · Fixed by #152802
Closed

Allow running shell integration scripts inside an rc file #151933

Tyriar opened this issue Jun 13, 2022 · 0 comments · Fixed by #152802
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan terminal-shell-integration Shell integration, command decorations, etc.
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jun 13, 2022

Currently shell integration scripts source rc/profile files here for example:

if [ -z "$VSCODE_SHELL_LOGIN" ]; then
. ~/.bashrc
else
# Imitate -l because --init-file doesn't support it:
# run the first of these files that exists
if [ -f /etc/profile ]; then
. /etc/profile
fi
# exceute the first that exists
if [ -f ~/.bash_profile ]; then
. ~/.bash_profile
elif [ -f ~/.bash_login ]; then
. ~/.bash_login
elif [ -f ~/.profile ]; then
. ~/.profile
fi
VSCODE_SHELL_LOGIN=""
fi

When using a manual install approach we must not do this.

Related: microsoft/vscode-docs#5219

@Tyriar Tyriar added feature-request Request for new features or functionality terminal-shell-integration Shell integration, command decorations, etc. labels Jun 13, 2022
@Tyriar Tyriar added this to the June 2022 milestone Jun 13, 2022
Tyriar added a commit that referenced this issue Jun 21, 2022
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Jun 22, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan terminal-shell-integration Shell integration, command decorations, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants