PSReadLine history search with wildcards
See original GitHub issueSummary of the new feature / enhancement
Often I remember some elements of former command lines. However when I used the forward/backward search capability, I have usually to go trough a lot of suggestions before finding the match. Being able to use wild cards would dramatically improve the research experience.
Exemple of current behavior:
I need to search for a line with:
Get-ADUser -Property Description, Manager -Identity accountX
Currently I have to go through:
Get-ADUser -Identity accountA
Get-ADUser -Property Description -Identity accountC
Get-ADUser -Property Manager -Identity accountD
Get-ADUser -Property Description, Manager -Identity accountN
Get-ADUser -Property Description, Manager -Identity accountO
Get-ADUser -Property Description, Manager -Identity accountX
Request:
I wish I could make my search with:
Get-ADUser*accountX
Proposed technical implementation details (optional)
A similar feature already exists, though currently limited to the file system.
Issue Analytics
- State:
- Created 4 months ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
PSReadLine history search with wildcards
PSReadLine history search with wildcards #22464. Sign in to view logs · Sign in to view logs. Summary. PSReadLine history search with wildcards...
Read more >Set-PSReadLineOption (PSReadLine) - PowerShell
Indicates that the cursor moves to the end of commands that you load from history by using a search. When this parameter is...
Read more >Easily Search PowerShell Command History With ...
Easily Search PowerShell Command History With PSReadLine. No need to retype commands when you can just look them up with PSReadline.
Read more >PowerTip: Find Processes by Using Wildcard Characters
Summary: Learn how to use wildcard characters and Windows PowerShell to find processes. Hey, Scripting Guy! Question ...
Read more >PowerShell falling short on performance when wildcard ...
No, it's because PowerShell's rm interprets wildcards much like bash ... rm $ENV:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\*history*.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@daxian-dbw , originally it was for the history searching, like when using
CTRL + R
.However, one can assume that if wildcards can be used with the history prediction too, then the history searching would become nearly useless, except for those who don’t want/like to use the history prediction.
Currently, I still use both. But I noticed that with the improvement of the history prediction (thanks to the
CompletionPredictor
module), I use less the history searching.@fullenw1 Just so I’m clear, are you asking for wildcard matching in history prediction, or the history searching, like when using <kbd>Ctrl+r</kbd>?