question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PSReadLine history search with wildcards

See original GitHub issue

Summary 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.

https://github.com/Ink230/DirectoryPredictor

Issue Analytics

  • State:open
  • Created 4 months ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
fullenw1commented, May 22, 2023

@fullenw1 Just so I’m clear, are you asking for wildcard matching in history prediction, or the history searching, like when using Ctrl+r?

@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.

0reactions
daxian-dbwcommented, May 15, 2023

@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>?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found