$test:/ - colon is not being parsed correctly on string
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- powershell
- Domain
- tooling
Research direction
Reproduce the examples in VS Code using the PowerShell syntax-highlighting support, comparing cases where the colon is followed by /, -, or @ with the plain colon case. Inspect the syntax grammar or entry point responsible for variable highlighting; done means the colon remains associated with $ip in all shown examples.
Written by the indexing model from the issue text.
Description
Environment
- Editor and Version (VS Code, Atom, Sublime): vscode 1.42.0-insiders
- Your primary theme: Monokai
Issue Description
From my tests, this seems to only happen if the colon is followed by some sort of special character such as - @ / etc
Screenshots

Expected Behavior
It should parse correctly, like this (taken from windows powershell). Notice that the colon is green, since it "belongs" to the variable:

Code Samples
$ip = "192.1.1.1"
###not being parsed###
"pi@$ip:/home/pi/PowerShell_IoT/"
"pi@$ip:-home/pi/PowerShell_IoT/"
"pi@$ip:@home/pi/PowerShell_IoT/"
###parsed correctly when without special characters###
"pi@$ip:home/pi/PowerShell_IoT/"
###correct syntax###
"pi@$ip`:/home/pi/PowerShell_IoT/"```
- Dominant language
- PowerShell
- Stars
- 151
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PowerShell/EditorSyntax
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
PowerShell/EditorSyntax#224 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
PowerShell/EditorSyntax#222 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
PowerShell/EditorSyntax#221 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
PowerShell/EditorSyntax#220 · 2 comments · 1 reaction ·
-
Issue-Bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
PowerShell/EditorSyntax#219 · 2 comments ·
All issues in PowerShell/EditorSyntax
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
0xMiden/bridge-portal#132 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
newrelic-experimental/preflight#793 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
babalae/bettergi-scripts-list#3674 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
caddyserver/caddy#8046 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zilliztech/memsearch#759 ·