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

Allow to call conda-lock -h (argparse default) instead of conda-lock --help #765

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

basnijholt
Copy link
Contributor

Description

After calling conda-lock -h MANY times I still fall for it. This adds it as an alias for --help.

@basnijholt basnijholt requested a review from a team as a code owner January 8, 2025 01:39
Copy link

netlify bot commented Jan 8, 2025

Deploy Preview for conda-lock ready!

Name Link
🔨 Latest commit b408e8d
🔍 Latest deploy log https://app.netlify.com/sites/conda-lock/deploys/677dd86630362900085c2fe2
😎 Deploy Preview https://deploy-preview-765--conda-lock.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@basnijholt basnijholt changed the title Allow to call conda-lock -h Allow to call conda-lock -h (argparse default) instead of conda-lock --help Jan 8, 2025
@@ -1191,8 +1191,10 @@ def main() -> None:
Literal["CRITICAL"],
]

CONTEXT_SETTINGS = {"show_default": True, "help_option_names": ["--help", "-h"]}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did ["--help", "-h"] instead of the more common ["-h", "--help"] to keep the suggestion in the CLI --help.

@maresb
Copy link
Contributor

maresb commented Jan 9, 2025

Thanks @basnijholt!!!

@maresb maresb merged commit 306e074 into conda:main Jan 9, 2025
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants