-
Notifications
You must be signed in to change notification settings - Fork 395
feat: add explicit flag to list command #3760
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
Conversation
libmamba/src/api/list.cpp
Outdated
@@ -228,6 +240,7 @@ namespace mamba | |||
options.full_name = config.at("full_name").value<bool>(); | |||
options.no_pip = config.at("no_pip").value<bool>(); | |||
options.reverse = config.at("reverse").value<bool>(); | |||
options.explicit_ = config.at("explicit_").value<bool>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the underscore required for this string? I understand explicit
is a C++ keyword, but that doesn't apply to strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not, good catch!
Btw, is adding an underscore after explicit an acceptable way to write a variable name or is there a better practice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No best practice, if you ideally need to name something in a way that's already reserved as a keyword, you either add somethnig to it like you did, or change the name to mean the same thing but make it still readable. For example it could have been explicit_list
or explicit_print
or as_explicit
etc. As long as it's clear in the code and easy to follow when reading it's ok.
ah no, this does something completely different than what I'd have thought it does |
Adds one of the missing sub-command #3535