microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.64k stars 6.57k forks source link

[Run] Aliases Plugin #23174

Open rcswift opened 1 year ago

rcswift commented 1 year ago

Description of the new feature / enhancement

Summary

Inspired by the Launchy default runner plugin, create an 'Aliases' plugin which would allow the user to define custom aliases for commands.

Features:

Allow the user to define a list of aliases via the Plugin settings menu.

aliases:

Scenario when this would be used?

The main value in aliases is to specify some arguments but defer others. This opens up a variety of uses:

Provide quick access to common CMD commands: ping = "C:\Windows\system32\cmd.exe /c ping %1" e.g. ping 127.0.0.1

Pre-fill common arguments to an executable ssh = "C:\Windows\system32\OpenSSH\ssh.exe -AX -i ~/.ssh/id_rsa.pub %1" e.g. ssh user@hostname

Different aliases for different sets of arguments to the same executable SSH = "C:\Program Files (x86)\teraterm\ttermpro.exe %1" e.g. SSH user@hostname COM = "C:\Program Files (x86)\teraterm\ttermpro.exe /C=%1 /BAUD=115200 /CDATABIT=8 /CPARITY=none /CSTOPBIT=1" e.g. COM 4

Aliases using URLs can implement custom search This specific use may overlap with #3420 GitHub = "https://github.com/search?q=%1"

Supporting information

https://github.com/samsonwang/LaunchyQt/tree/master/src/Plugins/Runner

shawnoster commented 1 year ago

I see the original request, to have custom web targets in just the Web Search plugin, has grown into feature creep with this ticket. I'm curious why we shouldn't build this into the Web Search instead of making it a massive alias feature.

Lacking this one feature is why I keep using Wox, since I can create custom web URL targets.

Pity the massive threads with all the context were duped over here, though I'm getting the feeling this feature won't ever be implemented. Does anyone know how different the plugin system is different than Wox? The code was straight-forward to add to Wox...