'select' and 'sort' aliases not highlighted.

Open
#39 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reproducing the PowerShell snippets from the issue in a supported editor and compare highlighting for the aliases where, sort, and select with Where-Object, Sort-Object, and Select-Object. Done means aliases receive consistent highlighting and all Verb-xxx commands are highlighted consistently, including related keywords identified during investigation.

Written by the indexing model from the issue text.

Description

bug

In the following snippet

Get-AzureVMImage 
| where ImageFamily -eq $imageFamily
| sort PublishedDate -Descending 
| select -ExpandProperty ImageName -First 1 

the aliases sort and select are not highlighted like the where alias, besides representing the same type of filter/alias.

When expanding the snippet to

Get-AzureVMImage `
| Where-Object ImageFamily -eq $imageFamily `
| Sort-Object PublishedDate -Descending `
| Select-Object -ExpandProperty ImageName -First 1

Where of Where-Object will be highlighted as keyword, Sort-Object won't be highlighted and Select-Object will be highlighted as command.

Expected behavior:

  • all alias should be highlighted the same way.
  • all commands (Verb-xxx) should be highlighted the same way.

Note: there might be other keywords that are effected by this issue.

Dominant language
PowerShell
Stars
151
Forks
55
PR merge metrics
No merged PRs in 30d

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.

More from PowerShell/EditorSyntax

All issues in PowerShell/EditorSyntax

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.