mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
CmdPal: entirely redo the Run page (#39955)
This entirely rewrites the shell page. It feels a lot more like the old run dialog now. * It's got icons for files & exes * it can handle network paths * it can handle `commands /with args...` * it'll suggest files in that path as you type * it handles `%environmentVariables%` * it handles `"Paths with\spaces in them"` * it shows you the path as a suggestion, in the text box, as you move the selection References: Closes #39044 Closes #39419 Closes #38298 Closes #40311 ### Remaining todo's * [x] Remove the `GenerateAppxManifest` change, and file something to fix that. We are still generating msix's on every build, wtf * [x] Clean-up code * [x] Double-check loc * [x] Remove a bunch of debug printing that we don't need anymore * [ ] File a separate PR for moving the file (indexer) commands into a common project, and re-use those here * [x] Add history support again! I totally tore that out * did that in #40427 * [x] make `shell:` paths and weird URI's just work. Good test is `x-cmdpal://settings` ### further optimizations that probably aren't blocking * [x] Our fast up-to-date is clearly broken, but I think that's been broken since early 0.91 * [x] If the exe doesn't change, we don't need to create a new ListItem for it. We can just re-use the current one, and just change the args * [ ] if the directory hasn't changed, but we typed more chars (e.g. `c:\windows\s` -> `c:\windows\sys`), we should cache the ListItem's from the first query, and re-use them if possible.
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Microsoft.CmdPal.Ext.Shell;
|
||||
public partial class ShellCommandsProvider : CommandProvider
|
||||
{
|
||||
private readonly CommandItem _shellPageItem;
|
||||
|
||||
private readonly SettingsManager _settingsManager = new();
|
||||
private readonly FallbackCommandItem _fallbackItem;
|
||||
|
||||
@@ -39,4 +40,6 @@ public partial class ShellCommandsProvider : CommandProvider
|
||||
public override ICommandItem[] TopLevelCommands() => [_shellPageItem];
|
||||
|
||||
public override IFallbackCommandItem[]? FallbackCommands() => [_fallbackItem];
|
||||
|
||||
public static bool SuppressFileFallbackIf(string query) => FallbackExecuteItem.SuppressFileFallbackIf(query);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user