Commit 46ac52ba authored by Dustin L. Howett's avatar Dustin L. Howett

scs: add -Exclude and multiple paths

parent 790c7338
......@@ -3,13 +3,14 @@ Function Search-SourceCode {
Param (
[Parameter(Mandatory=$True, ValueFromPipeline=$True, ValueFromRemainingArguments=$True)]
[string[]]$Pattern,
[string]$Path,
[string[]]$Path,
[string]$Filter,
[string[]]$Include = ("*.c", "*.cpp", "*.h", "*.java", "*.m", "*.mm", "*.cc"),
[string[]]$Exclude,
[switch]$CaseSensitive = $False
)
Get-ChildItem -Path:$Path -Filter:$Filter -Include:$Include -Recurse |
Get-ChildItem -Path:$Path -Filter:$Filter -Include:$Include -Exclude:$Exclude -Recurse |
Select-String -Pattern:$Pattern -CaseSensitive:$CaseSensitive
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment