Asterisk is not recognized as valid function/cmdlet name character

Open
#200 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
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
powershell
Domain
devtools

Research direction

Start with the PowerShell examples function Get-A*A {} and Get-A*A, then inspect the syntax-highlighting rules and autocomplete behavior for function and cmdlet names. Reproduce the issue in VS Code and compare it with PowerShell itself and GitHub highlighting; done means the asterisk remains part of the name, uses the same color, and does not trigger an incorrect suggestion.

Written by the indexing model from the issue text.

Description

Environment
  • Editor and Version VS Code
  • Your primary theme: High Contrast Default
Issue Description

The character * is not recognized as part of a function/cmdlet name

Screenshots

Defining such a function...

In VSCode:
grafik
In PowerShell itself:
grafik

Calling such a function/cmdlet...

In VSCode:
grafik
In PowerShell itself:
grafik

To show that the semantics are wrong, too, here's an autocomplete popup:

grafik

Expected Behavior

The asterisk and the rest of the function name should be the same color and the asterisk should not interrupt the function name and cause suggestions to pop up all of a sudden.

Code Samples
function Get-A*A {}
Get-A*A

(GitHub highlighting is also wrong, here)

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.