mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 03:37:10 +08:00
Add tips string to folder subtitle
This commit is contained in:
parent
1efcb2f80b
commit
5aa15ef731
@ -118,7 +118,7 @@ namespace Wox.Plugin.Folder
|
|||||||
|
|
||||||
private List<Result> QueryInternal_Directory_Exists(Query query)
|
private List<Result> QueryInternal_Directory_Exists(Query query)
|
||||||
{
|
{
|
||||||
var search = query.Search.ToLower();
|
var search = query.Search;
|
||||||
var results = new List<Result>();
|
var results = new List<Result>();
|
||||||
var hasSpecial = search.IndexOfAny(_specialSearchChars) >= 0;
|
var hasSpecial = search.IndexOfAny(_specialSearchChars) >= 0;
|
||||||
string incompleteName = "";
|
string incompleteName = "";
|
||||||
@ -213,12 +213,17 @@ namespace Wox.Plugin.Folder
|
|||||||
|
|
||||||
private static Result CreateOpenCurrentFolderResult(string incompleteName, string search)
|
private static Result CreateOpenCurrentFolderResult(string incompleteName, string search)
|
||||||
{
|
{
|
||||||
string firstResult = "Open current directory";
|
var firstResult = "Open current directory";
|
||||||
if (incompleteName.Length > 0)
|
if (incompleteName.Length > 0)
|
||||||
firstResult = "Open " + search;
|
firstResult = "Open " + search;
|
||||||
|
|
||||||
|
var folderName = search.TrimEnd('\\').Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.None).Last();
|
||||||
|
|
||||||
return new Result
|
return new Result
|
||||||
{
|
{
|
||||||
Title = firstResult,
|
Title = firstResult,
|
||||||
|
SubTitle = $"Use > to search files and subfolders within {folderName}, " +
|
||||||
|
$"* to search for file extensions in {folderName} or both >* to combine the search",
|
||||||
IcoPath = search,
|
IcoPath = search,
|
||||||
Score = 500,
|
Score = 500,
|
||||||
Action = c =>
|
Action = c =>
|
||||||
|
Loading…
Reference in New Issue
Block a user