PowerShell / PowerShell/vscode-powershell

Add option to filter out file/folder suggestions when completions are automatically triggered by a space

Open
#5,054 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Enhancement Up for Grabs
Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

Prerequisites
  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
Summary

I think the constant file/folder completion suggestions are distracting and I'd like to reduce those distractions. For example, if I type in a command like: Clear-Disk -Number 0 -RemoveData -RemoveOEM it will show unwanted file completions 4 times, once after the command and once for every space after each parameter/parameter value.
If you repeat this experiment in ISE you will note that it doesn't show any file completions. This is because ISE filters out file/folders from the automatic IntelliSense that is triggered by space.

Ideally something would be done about this in PowerShell itself to but unfortunately support for 5.1 has to be considered as well so adding an option in the extension would be nice.

Proposed Design

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the extension's automatic completion handling and the path that produces file/folder suggestions after spaces. Reproduce the Clear-Disk example in VS Code and compare it with PowerShell ISE behavior. Done should include a clear option that suppresses file/folder suggestions for space-triggered completions while preserving other completion behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, typescript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.