1
- using Flow . Launcher . Core . Resource ;
1
+ using Flow . Launcher . Core . Resource ;
2
2
using Flow . Launcher . Infrastructure ;
3
3
using Flow . Launcher . Plugin . SharedCommands ;
4
4
using System ;
@@ -21,23 +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 , string actionKeyword )
24
+ public static string GetPathWithActionKeyword ( string path , ResultType type , string actionKeyword )
25
25
{
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
35
- ? $ "{ Settings . PathSearchActionKeyword } "
36
- : Settings . SearchActionKeyword == Query . GlobalPluginWildcardSign
37
- ? string . Empty // Query.ActionKeyword is string.Empty when Global Action Keyword ('*') is used
38
- : $ "{ Settings . SearchActionKeyword } ";
39
- }
26
+ // actionKeyword will be empty string if using global, query.ActionKeyword is ""
40
27
28
+ var usePathSearchActionKeyword = Settings . PathSearchKeywordEnabled && ! Settings . SearchActionKeywordEnabled ;
29
+
30
+ var pathSearchActionKeyword = Settings . PathSearchActionKeyword == Query . GlobalPluginWildcardSign
31
+ ? string . Empty
32
+ : $ "{ Settings . PathSearchActionKeyword } ";
33
+
34
+ var searchActionKeyword = Settings . SearchActionKeyword == Query . GlobalPluginWildcardSign
35
+ ? string . Empty
36
+ : $ "{ Settings . SearchActionKeyword } ";
37
+
38
+ var keyword = usePathSearchActionKeyword ? pathSearchActionKeyword : searchActionKeyword ;
39
+
41
40
var formatted_path = path ;
42
41
43
42
if ( type == ResultType . Folder )
0 commit comments