-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Open
Labels
Needs-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
The highlighting / emphasis from Select-String is only done for the first instance of Select-String in the pipeline. It should be the last since it is a highlighting technique.
Expected behavior
PowerShell 7.3.6
[C:\Users\lee]
PS:1 > "Hello World" | Select-String Hello
>>Hello<< World
[C:\Users\lee]
PS:2 > "Hello World" | Select-String World
Hello >>World<<
[C:\Users\lee]
PS:3 > "Hello World" | Select-String Hello | Select-String World
Hello >>World<<
[C:\Users\lee]
PS:4 > "Hello World" | Select-String Hello -NoEmphasis | Select-String World
Hello >>World<<
Actual behavior
PowerShell 7.3.6
[C:\Users\lee]
PS:1 > "Hello World" | Select-String Hello
>>Hello<< World
[C:\Users\lee]
PS:2 > "Hello World" | Select-String World
Hello >>World<<
[C:\Users\lee]
PS:3 > "Hello World" | Select-String Hello | Select-String World
>>Hello<< World
[C:\Users\lee]
PS:4 > "Hello World" | Select-String Hello -NoEmphasis | Select-String World
Hello World
(no highlighting / emphasis at all)
Error details
No response
Environment data
Name Value
---- -----
PSVersion 7.3.6
PSEdition Core
GitCommitId 7.3.6
OS Microsoft Windows 10.0.22000
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals

jazzdelightsme
Metadata
Metadata
Assignees
Labels
Needs-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.