@@ -21,13 +21,22 @@ public static void Init(PluginInitContext context, Settings settings)
21
21
Settings = settings ;
22
22
}
23
23
24
- private static string GetPathWithActionKeyword ( string path , ResultType type )
24
+ private static string GetPathWithActionKeyword ( string path , ResultType type , string actionKeyword )
25
25
{
26
- var keyword = Settings . PathSearchKeywordEnabled && ! Settings . SearchActionKeywordEnabled
26
+ string keyword ;
27
+ // Using Quick Access or Index Search action keywords to then navigate to directory
28
+ if ( actionKeyword == Settings . PathSearchActionKeyword || actionKeyword == Settings . SearchActionKeyword )
29
+ {
30
+ keyword = actionKeyword == Settings . PathSearchActionKeyword ? $ "{ actionKeyword } " : string . Empty ;
31
+ }
32
+ else
33
+ {
34
+ keyword = Settings . PathSearchKeywordEnabled && ! Settings . SearchActionKeywordEnabled
27
35
? $ "{ Settings . PathSearchActionKeyword } "
28
36
: Settings . SearchActionKeyword == Query . GlobalPluginWildcardSign
29
37
? string . Empty // Query.ActionKeyword is string.Empty when Global Action Keyword ('*') is used
30
38
: $ "{ Settings . SearchActionKeyword } ";
39
+ }
31
40
32
41
var formatted_path = path ;
33
42
@@ -42,7 +51,7 @@ private static string GetAutoCompleteText(string title, Query query, string path
42
51
{
43
52
return ! Settings . PathSearchKeywordEnabled && ! Settings . SearchActionKeywordEnabled
44
53
? $ "{ query . ActionKeyword } { title } " // Only Quick Access action keyword is used in this scenario
45
- : GetPathWithActionKeyword ( path , resultType ) ;
54
+ : GetPathWithActionKeyword ( path , resultType , query . ActionKeyword ) ;
46
55
}
47
56
48
57
public static Result CreateResult ( Query query , SearchResult result )
@@ -83,7 +92,7 @@ internal static Result CreateFolderResult(string title, string subtitle, string
83
92
}
84
93
}
85
94
86
- Context . API . ChangeQuery ( GetPathWithActionKeyword ( path , ResultType . Folder ) ) ;
95
+ Context . API . ChangeQuery ( GetPathWithActionKeyword ( path , ResultType . Folder , query . ActionKeyword ) ) ;
87
96
88
97
return false ;
89
98
} ,
@@ -118,7 +127,7 @@ internal static Result CreateDriveSpaceDisplayResult(string path, string actionK
118
127
{
119
128
Title = title ,
120
129
SubTitle = subtitle ,
121
- AutoCompleteText = GetPathWithActionKeyword ( path , ResultType . Folder ) ,
130
+ AutoCompleteText = GetPathWithActionKeyword ( path , ResultType . Folder , actionKeyword ) ,
122
131
IcoPath = path ,
123
132
Score = 500 ,
124
133
ProgressBar = progressValue ,
@@ -199,7 +208,7 @@ internal static Result CreateOpenCurrentFolderResult(string path, string actionK
199
208
Title = title ,
200
209
SubTitle = $ "Use > to search within { subtitleFolderName } , " +
201
210
$ "* to search for file extensions or >* to combine both searches.",
202
- AutoCompleteText = GetPathWithActionKeyword ( folderPath , ResultType . Folder ) ,
211
+ AutoCompleteText = GetPathWithActionKeyword ( folderPath , ResultType . Folder , actionKeyword ) ,
203
212
IcoPath = folderPath ,
204
213
Score = 500 ,
205
214
CopyText = folderPath ,
0 commit comments