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 short command aliases to improve user experience and efficiency #4775

Open
thecodermehedi opened this issue Aug 30, 2024 · 5 comments
Open
Labels
Area-User-Interface Issue related to user interface Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@thecodermehedi
Copy link

Description of the new feature / enhancement

I propose adding short command aliases to winget-cli to enhance user experience and improve efficiency for frequent users. This feature would allow users to execute common winget commands using abbreviated versions of both the main command and its subcommands.

Currently, users need to type out full commands like:

winget install -e --id Git.Git

With the proposed feature, users could instead use shorter aliases like:

wg i -e --id Git.Git

This enhancement would:

  1. Reduce typing effort for frequent users
  2. Improve command memorability
  3. Align winget more closely with other popular CLI tools that offer similar shortcuts
  4. Maintain full backward compatibility with existing long-form commands

Proposed alias examples:

  • winget -> wg
  • install -> i
  • search -> s
  • list -> l
  • upgrade -> u
  • uninstall -> rm

Proposed technical implementation details

  1. Implement an alias mapping system that translates short commands to their full equivalents.
  2. Add a configuration file (e.g., winget-aliases.json) where users can define custom aliases.
  3. Modify the command parser to check for aliases before processing the full command.
  4. Update the help documentation to include information about aliases and how to use them.
  5. Optionally, add a new command like winget alias to manage custom aliases directly from the CLI.

This feature would make winget more user-friendly while maintaining its current functionality and compatibility. It would be particularly beneficial for power users and those who frequently use winget in scripts or daily workflows.

@thecodermehedi thecodermehedi added the Issue-Feature This is a feature request for the Windows Package Manager client. label Aug 30, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Aug 30, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@stephengillie
Copy link

winget -> wg
install -> i
search -> s
list -> l
upgrade -> u
uninstall -> rm

Some of these are already taken:

  • -a,--architecture - Select the architecture
  • -e,--exact - Find package using exact match
  • -h,--silent - Request silent installation
  • -i,--interactive - Request interactive installation; user input may be needed
  • -l,--location - Location to install to (if supported)
  • -o,--log - Log location (if supported)
  • -r,--rename - The value to rename the executable file (portable)
  • -s,--source - Find package using the specified source
  • -v,--version - Use the specified version; default is the latest version

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage Issue need to be triaged label Aug 30, 2024
@mdanish-kh
Copy link
Contributor

uninstall -> rm

This one already exists. winget <command> --help would show you all aliases available, but most of them aren't short like rm

@denelon
Copy link
Contributor

denelon commented Aug 30, 2024

The primary command "winget" isn't something we would likely shorten in the "CLI", but the PowerShell Module can have shorter aliases for cmdlets.

The auto-completion feature can also save typing in the CLI, and PowerShell already has a notion of this.

@denelon denelon added the Area-User-Interface Issue related to user interface label Aug 30, 2024
@Trenly
Copy link
Contributor

Trenly commented Sep 19, 2024

There do already exist short aliases for some of these, as @mdanish-kh mentioned. Specifically,

  • install => add
  • list => ls
  • uninstall => rm

The one character aliases could be very confusing to new users - i could be for import or install; s could be for show, search, source, or settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User-Interface Issue related to user interface Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

5 participants