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

Short name for "--group" option #11484

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hongquan
Copy link

Summary

Add short name -G for --group option in uv add command.

The uv add --group command is used quite often. Having short alternative form uv add -G will let user type less.
The -G short name also exists in Poetry and PDM.

Test Plan

$ uv help add

...

Options:
  -G, --group <GROUP>
          Add the requirements to the specified dependency group.

@zanieb zanieb added the cli Related to the command line interface label Feb 13, 2025
@zanieb zanieb self-assigned this Feb 13, 2025
@zanieb
Copy link
Member

zanieb commented Feb 13, 2025

I'm a little hesitant to use an uppercase short flag, I'm not sure we're really doing that elsewhere. Why do they use -G instead of -g? What's pip going to do for the short flag?

@hongquan
Copy link
Author

PDM uses -G instead of -g because it already has -g / --global.

@hongquan
Copy link
Author

@zanieb should I change it to lowercase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants