PowerShell / PowerShell/vscode-powershell

powershell.codeFormatting.autoCorrectAliases not working as expected

Open
#3,143 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Code Formatting Issue-Bug
Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

This is similar to bug reported here

I can reproduce this bug in any script on any computer I am using.

For example when typing with editor.formatOnType set to True

measure -distance

I would expect it to expand it to

Measure-Distance -distance

logs and payload logs to follow shortly

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 reproducing the behavior with powershell.codeFormatting.autoCorrectAliases enabled and editor.formatOnType set to True, using measure -distance in a script. Review the related issue comment and the eventual logs or payload mentioned in this report; done means formatting expands the alias to Measure-Distance -distance.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.