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

Add aliases for installation and uninstallation #2303

Closed
wmstack opened this issue Jul 2, 2022 · 4 comments · Fixed by #2390
Closed

Add aliases for installation and uninstallation #2303

wmstack opened this issue Jul 2, 2022 · 4 comments · Fixed by #2390
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Milestone

Comments

@wmstack
Copy link

wmstack commented Jul 2, 2022

Description of the new feature / enhancement

Make add and i aliases for install in winget. add is used by NPM, by the yarn package manager, and by cargo-edit. Different names improve the experience for newcomers, which, if they come from different package managers, might be used to different names for installing packages, and it would be delightful if they just work.

Also add r or rm and remove as aliases to uninstall. remove is used by the apt-package manager, so it would be helpful if users of apt can have the same feel with Winget. One letter subcommand aliases might feel wrong, however, NPM has one for installation. Another option is to have u as an alias for uninstall, though I don't recommend it.

Could also add ls as an alias for list. However, it depends on how much the team focuses on UX or DX. I personally strongly suggest those aliases, which need to be strongly tied to historical command names. For example, the apt package manager for linux was perhaps the oldest and most popular, and it has the remove keyword for removing a package. So if we reuse its subcommand names, we reduce the friction.

Notes

One downside is this would give us fewer names for new commands. However, I think that if the package manager makes two similar names for different commands, then it is not a good package manager, solely for that reason. My experience with the rustup package manager in particular strengthens that feeling about similar names, because it has both a target subcommand and a toolchain subcommand and I always mess them up.

Edit: I want to show you the NPM package manager npm-install synopsis:
https://docs.npmjs.com/cli/v8/commands/npm-install

npm install [<package-spec> ...]

aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall

What do you think?

Proposed technical implementation details

Make i, add aliases for install, and document them, including in the help page. Make rm and remove aliases for uninstall and document them in the help page as well. Make ls an alias for list.

@wmstack wmstack added the Issue-Feature This is a feature request for the Windows Package Manager client. label Jul 2, 2022
@ghost ghost added the Needs-Triage Issue need to be triaged label Jul 2, 2022
@wmstack wmstack changed the title Add small subcommand for installation and uninstallation Add aliases for installation and uninstallation Jul 2, 2022
@denelon denelon removed the Needs-Triage Issue need to be triaged label Jul 5, 2022
@PlexPt
Copy link

PlexPt commented Jul 25, 2022

+1

@vedantmgoyal9
Copy link
Contributor

vedantmgoyal9 commented Jul 25, 2022

This is something I would also upvote for, except making remove, etc.. an alias for uninstall.

@wmstack
Copy link
Author

wmstack commented Jul 26, 2022

This is something I would also upvote for, except making remove, etc.. an alias for uninstall.

Not sure why you are against making remove and alias for uninstall. Even NPM has that...
Source: https://docs.npmjs.com/cli/v8/commands/npm-uninstall/

npm uninstall [<@scope>/]<pkg>...

aliases: unlink, remove, rm, r, un

@Trenly Trenly mentioned this issue Jul 28, 2022
2 tasks
@denelon denelon added this to the v1.4-Client milestone Jul 29, 2022
@ghost ghost added the In-PR Issue related to a 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

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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants