You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the latest variant of the "F7 for History" script @SteveL-MSFT used Select-Object-like to filter the history based on what was already on the command line.
I think this would be much slicker if we could pass an initial text to the cmdlet to use as a filter. E.g.
ls | ocgv -Filter "foo"
Then the script could change to:
...
$history=Get-History|Sort-Object-Descending -Property Id |Select-Object CommandLine
$selection=$history|Out-ConsoleGridView-Title "Select CommandLine from History"-OutputMode Single -Filter $line
...
In the latest variant of the "F7 for History" script @SteveL-MSFT used
Select-Object
-like
to filter the history based on what was already on the command line.I think this would be much slicker if we could pass an initial text to the cmdlet to use as a filter. E.g.
Then the script could change to:
Full script here: https://gist.github.com/tig/cbbeab7f53efd73e329afd6d4b838191
The text was updated successfully, but these errors were encountered: