Skip to content

Ignore inline env var setting prefix in path completions - #273391

Merged
Daniel Imms (Tyriar) merged 2 commits into
mainfrom
tyriar/255709
Oct 27, 2025
Merged

Daniel Imms (Tyriar) merged 2 commits into
mainfrom
tyriar/255709

Conversation

@Tyriar

Copy link
Copy Markdown
Contributor

Fixes #255709

@Tyriar Daniel Imms (Tyriar) added this to the October 2025 milestone Oct 26, 2025
@Tyriar Daniel Imms (Tyriar) self-assigned this Oct 26, 2025
Copilot AI review requested due to automatic review settings October 26, 2025 11:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where terminal path completions incorrectly included inline environment variable assignment prefixes (e.g., FOO=) in the completion suggestions. When users type something like FOO=./, the completions should now properly exclude the FOO= prefix.

Key Changes

  • Added logic to detect and strip environment variable assignment prefixes from path completions
  • Added test coverage to verify the fix works correctly

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/vs/workbench/contrib/terminalContrib/suggest/browser/terminalCompletionService.ts Added regex matching to detect and remove VAR= prefixes from the last word before path completion
src/vs/workbench/contrib/terminalContrib/suggest/test/browser/terminalCompletionService.test.ts Added test case verifying that environment variable prefixes are ignored in path completions

@Tyriar
Daniel Imms (Tyriar) merged commit 366d6a0 into main Oct 27, 2025
@Tyriar
Daniel Imms (Tyriar) deleted the tyriar/255709 branch October 27, 2025 09:44
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Dec 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminal suggestions doesn't work for paths while setting an environment variable

3 participants