diff --git a/PSEverything/PSEverything.csproj b/PSEverything/PSEverything.csproj index 228e8c4..01a058c 100644 --- a/PSEverything/PSEverything.csproj +++ b/PSEverything/PSEverything.csproj @@ -47,17 +47,35 @@ - + + Designer + - + + + + + LICENSE + + + + + + + + $(TargetDir)\PSEverything + + + - --> \ No newline at end of file diff --git a/PSEverything/PSEverything.dll-Help.xml b/PSEverything/PSEverything.dll-Help.xml index c823bf4..ec4f049 100644 --- a/PSEverything/PSEverything.dll-Help.xml +++ b/PSEverything/PSEverything.dll-Help.xml @@ -1,4 +1,4 @@ - + @@ -19,7 +19,9 @@ Search-Everyting Uses the Everything search engine from voidtools to perform near instant system wide searches of NTFS f -ile systems. +ile systems. + +By default, Search-Everything limits the results to items below the current directory. Use the -Global switch to perform system wide searches. @@ -33,10 +35,10 @@ ile systems. String[] - QueryFilter + Filter Search filter in native 'Everything' syntax. - +See http://www.voidtools.com/support/everything/searching/ for more info. Passed as-is to the search engine. The search language that can be used is as follows: @@ -170,6 +172,7 @@ Attribute Constants: V Device String + Exclude @@ -185,33 +188,37 @@ Attribute Constants: String[] - + PathInclude Specifies the filter for for paths to include String[] + - + PathExclude Specifies the filter for for paths to exclude String[] + - + FolderInclude Specifies the filter for for folders to include String[] + - + FolderExclude Specifies the filter for for folders to exclude String[] + ParentCount @@ -254,6 +261,15 @@ Attribute Constants: SwitchParameter + + Global + + Performs a global search, not limited by the current directory. + + + SwitchParameter + + MatchWholeWord @@ -318,6 +334,15 @@ $ Matches the end of the filename SwitchParameter + + Global + + Performs a global search, not limited by the current directory. + + + SwitchParameter + + IncludeTotalCount @@ -344,8 +369,8 @@ followed by the results. - - QueryFilter + + Filter Search filter in native 'Everything' syntax. @@ -524,7 +549,7 @@ Attribute Constants: - + PathInclude Specifies the filter for for paths to include @@ -536,7 +561,7 @@ Attribute Constants: - + PathExclude Specifies the filter for for paths to exclude @@ -548,7 +573,7 @@ Attribute Constants: - + FolderInclude Specifies the filter for for folders to include @@ -560,7 +585,7 @@ Attribute Constants: - + FolderExclude Specifies the filter for for folders to exclude @@ -638,6 +663,19 @@ Attribute Constants: + + Global + + Performs a global search, not limited by the current directory. + + + SwitchParameter + + SwitchParameter + + + + MatchWholeWord diff --git a/PSEverything/PSEverything.psd1 b/PSEverything/PSEverything.psd1 index ee6d161..e18037f 100644 Binary files a/PSEverything/PSEverything.psd1 and b/PSEverything/PSEverything.psd1 differ diff --git a/PSEverything/Properties/AssemblyInfo.cs b/PSEverything/Properties/AssemblyInfo.cs index ada76b2..5b98fb0 100644 --- a/PSEverything/Properties/AssemblyInfo.cs +++ b/PSEverything/Properties/AssemblyInfo.cs @@ -1,17 +1,19 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("PSEverything")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyDescription("Powershell frontent for voidtools PSEverything")] +#if _DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif +[assembly: AssemblyCompany("PowerCode Consulting AB")] [assembly: AssemblyProduct("PSEverything")] [assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible @@ -33,4 +35,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.2.0.0")] +[assembly: AssemblyFileVersion("1.3.0.0")] diff --git a/PSEverything/SearchEverythingCommand.cs b/PSEverything/SearchEverythingCommand.cs index d94910f..2a84e47 100644 --- a/PSEverything/SearchEverythingCommand.cs +++ b/PSEverything/SearchEverythingCommand.cs @@ -11,7 +11,7 @@ namespace PSEverything public class SearchEverythingCommand : PSCmdlet { [Parameter(ParameterSetName = "default")] - public string QueryFilter { get; set; } + public string Filter { get; set; } [Parameter(ParameterSetName = "default", Position = 1)] public string[] Include { get; set; } @@ -22,15 +22,19 @@ public class SearchEverythingCommand : PSCmdlet [Parameter(ParameterSetName = "default")] public string[] Extension { get; set; } + [Alias("pi")] [Parameter(ParameterSetName = "default")] public string[] PathInclude { get; set; } + [Alias("pe")] [Parameter(ParameterSetName = "default")] public string[] PathExclude { get; set; } + [Alias("fi")] [Parameter(ParameterSetName = "default")] public string[] FolderInclude { get; set; } + [Alias("fe")] [Parameter(ParameterSetName = "default")] public string[] FolderExclude { get; set; } @@ -53,7 +57,10 @@ public class SearchEverythingCommand : PSCmdlet [Parameter] public SwitchParameter CaseSensitive { get; set; } - + + [Parameter] + public SwitchParameter Global { get; set; } + [Parameter(ParameterSetName = "default")] public SwitchParameter MatchWholeWord { get; set; } @@ -76,9 +83,9 @@ private string GetSearchString() private void AddPatternFilter(StringBuilder searchBuilder) { - if (!String.IsNullOrEmpty(QueryFilter)) + if (!String.IsNullOrEmpty(Filter)) { - searchBuilder.Append(QueryFilter); + searchBuilder.Append(Filter); } } @@ -111,7 +118,13 @@ private static void AddListFilter(StringBuilder searchBuilder, string filterName private void AddPathFilter(StringBuilder searchBuilder) { - AddListFilter(searchBuilder, "path:", PathInclude, PathExclude); + AddListFilter(searchBuilder, "path:", PathInclude, PathExclude); + if (!Global) + { + searchBuilder.Append(" path:"); + searchBuilder.Append(SessionState.Path.CurrentFileSystemLocation.ProviderPath); + searchBuilder.Append('\\'); + } } void AddFileFilter(StringBuilder searchBuilder)