-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add aliases to the cmdlets in Microsoft.Winget.Client PowerShell module #4411
Comments
I frequently find myself typing "find", pressing right arrow to autocomplete |
Note that PowerShell aliases are typically (but not necessarily) formed based on a naming convention that utilizes a standardized prefix for the verb of the target cmdlet (whereas there are no rules around how to abbreviate the noun part). E.g., the standardized prefix for the Thus, an alias for |
This is a user preference thing not specific to winget. PowerShell uses explicit, verbose cmdlet and parameter names - alwqys. This is good. If you like cryptic aliases you can always define them yourself in your PowerShell profile: New-Alias -Alias 'fdwg' Value 'Find-WingetPackage' |
@jantari: Most of PowerShell's built-in cmdlets have built-in aliases (e.g., Let's take the recently introduced Microsoft.PowerShell.PSResourceGet module as an example (which is now bundled with PowerShell 7, installable on demand in Windows PowerShell): PS> Get-Alias | Where Definition -like '*-PSResource*' | Select Name, Definition
Name Definition
---- ----------
fdres Find-PSResource
isres Install-PSResource
pbres Publish-PSResource
udres Update-PSResource
usres Uninstall-PSResource Having aliases is important for interactive use, whereas in scripts they should be avoided. While, of course, anyone is free to define their own aliases, having aliases that ship with the module and whose names are methodically constructed is important, as it allows cross-machine use of these aliases without extra effort and facilitates recalling or discovering their names (all it takes is to know the naming convention, and remembering the alias prefixes for the fixed list of approved verbs (some of which are obvious, such as This is especially important for cmdlets that are frequently used interactively, as in the case at hand. |
Description of the new feature / enhancement
Add some default aliases for commands to reduce typing mistakes and aid use of the module on the cmdline
Proposed technical implementation details
No response
The text was updated successfully, but these errors were encountered: