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

Expose shell's environment - fish #238328

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

Expose shell's environment - fish #238328

wants to merge 16 commits into from

Conversation

anthonykim1
Copy link
Contributor

@anthonykim1 anthonykim1 commented Jan 21, 2025

Trying to break #228791 down smaller so that it is easier to review.

Part of #227467 last edition

Also adding isTrusted and changing things here and there in order to support shell env for fish without nonce

@anthonykim1 anthonykim1 self-assigned this Jan 21, 2025
@anthonykim1
Copy link
Contributor Author

anthonykim1 commented Jan 21, 2025

Adding isTrusted field:

Good progress, I'm starting to see the env.value and env.isTrusted ( tested on bash after adding isTrusted):
Screenshot 2025-01-21 at 4 29 38 PM

Progress: now working with fish as well.
Works correctly in a way .value enlists the intended environment and isTrusted is FALSE for fish as expected.
Screenshot 2025-01-22 at 12 49 59 AM

@@ -125,7 +125,7 @@ export async function activate(context: vscode.ExtensionContext) {
return;
}

const commandsInPath = await getCommandsInPath(terminal.shellIntegration?.env);
const commandsInPath = await getCommandsInPath(terminal.shellIntegration?.env?.value as { [key: string]: string | undefined });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if this is the best way to handle the type errors :/ (but its giving me a pass)

@anthonykim1 anthonykim1 requested a review from Tyriar January 22, 2025 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant