Skip to content
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

Command aliases #380

Closed
MilkFather opened this issue Jun 1, 2020 · 5 comments · Fixed by #2390
Closed

Command aliases #380

MilkFather opened this issue Jun 1, 2020 · 5 comments · Fixed by #2390
Labels
Issue-Feature This is a feature request for the Windows Package Manager client. Resolution-Fix-Committed
Milestone

Comments

@MilkFather
Copy link

Description of the new feature/enhancement

Inspired by #334 in which the author tried to use find to search for packages, I think some common command aliases could be added to WinGet so that the user would not get confused when using synonyms of a command.

Proposed technical implementation details (optional)

Provide common aliases such as "find ==> search" and "get ==> install", etc.

> winget find git
Name                   Id                    Version                    Matched
-------------------------------------------------------------------------------------
Git                    Git.Git               2.26.2                     Moniker: git
......
@MilkFather MilkFather added the Issue-Feature This is a feature request for the Windows Package Manager client. label Jun 1, 2020
@msftbot msftbot bot added the Needs-Triage label Jun 1, 2020
@megamorf
Copy link

megamorf commented Jun 1, 2020

Could you elaborate on what benefit these aliases will bring in your opinion? Some package managers like apt or yum don't ship with command aliases and others like zypper or eopkg do but those are actually only shortened versions of their long forms, e.g.:

eopkg

Command Alias
search sr
install it
remove rm

zypper

Command Alias
search se
install in
remove rm

@MilkFather
Copy link
Author

MilkFather commented Jun 1, 2020

Different package managers use different command for the same action. For example, in apt you use remove while in Homebrew, Chocolatey and WinGet you should use uninstall. This can cause confusion to some users: A and B are synonyms literally, and command A works in some package manager, why does WinGet requires you to use B?

The example in #334 has shown such confusion: a long-time Chocolatey user simply finds winget find not working. "Find" and "search" are synonyms, so it will be more user-friendly to make find and search even lookfor(maybe) work.

Actually Chocolatey has done this: choco find and choco search are aliases for each other. WinGet should make words with similar or same meaning do the same thing, or at least, provide smart auto-correction advice.

@doctordns
Copy link

If anything, the verbs should be the same ss the verbs you'd use had the team done the sensible thing and implemented winget using PowerShell cmdlets.
There is no good reason for losing consistency when consistency can be delivered easily.

If you use PowerShell Verbs, then you could also use the verb aliases.

WHY are people trying to reinvent the wheel?

@denelon denelon added this to the Package Manager Backlog milestone Jun 2, 2020
@Trenly Trenly mentioned this issue Jul 28, 2022
2 tasks
@denelon denelon modified the milestones: Backlog-Client, v1.4-Client Jul 29, 2022
@msftbot msftbot bot added the In-PR This issue has a related PR label Jul 29, 2022
@Trenly
Copy link
Contributor

Trenly commented Jul 29, 2022

If anyone has any strong opinions on aliases, i.e, if any others should be added, please post a comment on the linked PR

@doctordns
Copy link

Where ever possible make aliases that are consistent with PowerShell. I know the team do not want cmdlets, but let's not diverge just because you can. Even if that boat has sailed

@msftbot msftbot bot added Resolution-Fix-Committed and removed In-PR This issue has a related PR labels Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client. Resolution-Fix-Committed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants