Created
July 5, 2016 20:13
-
-
Save cdhunt/2009559de73bdaf7efc1db42d147bf08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Select-FuzzyCommand { | |
param( | |
$search='' | |
) | |
Begin { | |
$data = Get-Command | |
$search = $search.ToCharArray() -join '.*?' | |
$data.Foreach({ | |
if ($_.Name -match $search) {$_} | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment