Skip to content

Instantly share code, notes, and snippets.

@cajones
Created April 4, 2012 10:08
Show Gist options
  • Save cajones/2300092 to your computer and use it in GitHub Desktop.
Save cajones/2300092 to your computer and use it in GitHub Desktop.
Find shell scripts
function Find-File([string[]]$patterns, [string]$extension, [string] $joinPattern = "[\w|/|\\]*") {
$regex = $patterns -join $joinPattern
ls -r -i "*.$extension" | where { $_.Fullname -match $regex } |% { $_.Fullname }
}
Set-Alias -Name ff -Value Find-File
function Find-Solution([string[]]$patterns){
Find-File -e sln $patterns
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment