You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[<Description "Folders to ignore during indexing.">]
131
-
member valFoldersToIgnore:string array =[||]with get, set
140
+
member valFoldersToIgnore:string array =[||]with get, set
132
141
133
142
typeIndexCommand()=
134
143
inherit Command<IndexSettings>()
@@ -168,8 +177,9 @@ type SetLauncherSettings() =
168
177
member valPath=""with get, set
169
178
170
179
[<CommandOption "-a|--args">]
171
-
[<Description "Launcher command line arguments.">]
172
-
member valArguments=""with get, set
180
+
[<Description "Launcher command line arguments. Default is '%s' where the launched file or directory path will be inserted.">]
181
+
[<DefaultValue("%s")>]
182
+
member valArguments="%s"with get, set
173
183
174
184
[<CommandOption "-c|--choose">]
175
185
[<Description "Which should be launched, the 'file' [italic](default)[/] or the 'directory'?">]
@@ -190,7 +200,10 @@ type SetLauncherCommand() =
190
200
{
191
201
Name = settings.Name
192
202
Path = FilePath settings.Path
193
-
Arguments = settings.Arguments
203
+
Arguments =
204
+
match settings.Arguments with
205
+
| x when String.IsNullOrWhiteSpace(x)-> None
206
+
| args -> Some args
194
207
Choose = settings.Choose
195
208
}
196
209
|>fun launcher ->
@@ -322,18 +335,12 @@ module Program =
322
335
app.Configure(fun conf ->
323
336
conf.SetApplicationName(IO.AppName)|> ignore
324
337
325
-
conf
326
-
.AddCommand<PromptCommand>("prompt")
327
-
.WithDescription(
328
-
"[italic](default command)[/] Type to search. Arrows Up/Down to navigate. Enter to launch. Escape to quit."
329
-
)
338
+
conf.AddCommand<PromptCommand>("prompt").WithDescription("[italic](default command)[/] Type to search. Arrows Up/Down to navigate. Enter to launch. Escape to quit.")
330
339
|> ignore
331
340
332
341
conf
333
342
.AddCommand<IndexCommand>("index")
334
-
.WithDescription(
335
-
"Indexes all files recursively with a specific pattern which can be a wildcard [italic](default)[/] or a regular expression."
336
-
)
343
+
.WithDescription("Indexes all files recursively with a specific pattern which can be a wildcard [italic](default)[/] or a regular expression.")
337
344
|> ignore
338
345
339
346
conf.AddBranch<LauncherSettings>(
@@ -352,9 +359,7 @@ module Program =
352
359
conf.AddCommand<DeindexCommand>("deindex").WithDescription("Clears the current index.")
353
360
|> ignore
354
361
355
-
conf
356
-
.AddCommand<InfoCommand>("info")
357
-
.WithDescription("Prints the current pattern and all the indexed files.")
362
+
conf.AddCommand<InfoCommand>("info").WithDescription("Prints the current pattern and all the indexed files.")
358
363
|> ignore
359
364
360
365
conf.AddCommand<RefreshCommand>("refresh").WithDescription("Updates the current index.")
0 commit comments