Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pass the path to shellIntegration.ps1 directly to the server #4959

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

Merged
andyleejordan merged 1 commit into main from shell-integration
Apr 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/session.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,11 @@ export class SessionManager implements Middleware {
});
};

// When Terminal Shell Integration is enabled, we pass the path to the script that the server should execute.
// Passing an empty string implies integration is disabled.
const shellIntegrationEnabled = vscode.workspace.getConfiguration("terminal.integrated.shellIntegration").get<boolean>("enabled");
const shellIntegrationScript = path.join(vscode.env.appRoot, "out", "vs", "workbench", "contrib", "terminal", "browser", "media", "shellIntegration.ps1");
Copy link
Member Author

@andyleejordan andyleejordan Apr 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tyriar I'm taking a hard dependency on this relative-to-app-root path. You all have too, but just internally as far as I can tell. Trust me, it was no good going down the road of passing process.argv0 and trying to use code --locate-blah-blah.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know, chances of that path changing are very slim anyway

andyleejordan reacted with thumbs up emoji

const clientOptions: LanguageClientOptions = {
documentSelector: this.documentSelector,
synchronize: {
Expand All @@ -622,7 +627,7 @@ export class SessionManager implements Middleware {
initializationOptions: {
enableProfileLoading: this.sessionSettings.enableProfileLoading,
initialWorkingDirectory: await validateCwdSetting(this.logger),
shellIntegrationEnabled: vscode.workspace.getConfiguration("terminal.integrated.shellIntegration").get<boolean>("enabled"),
shellIntegrationScript: shellIntegrationEnabled ? shellIntegrationScript : "",
},
errorHandler: {
// Override the default error handler to prevent it from
Expand Down

AltStyle によって変換されたページ (->オリジナル) /