Skip to content

Instantly share code, notes, and snippets.

@cdhunt
Created July 5, 2016 20:13
Show Gist options
  • Save cdhunt/2009559de73bdaf7efc1db42d147bf08 to your computer and use it in GitHub Desktop.
Save cdhunt/2009559de73bdaf7efc1db42d147bf08 to your computer and use it in GitHub Desktop.
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