-
Notifications
You must be signed in to change notification settings - Fork 148
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
context: adding append/remove args option #179
context: adding append/remove args option #179
Conversation
190fc96
to
24c9f2e
Compare
|
||
Several configuration options are actually *lists* of objects. For such | ||
options, you can use the ``--append-args`` and ``--remove-args`` options to | ||
append or remove elements from these lists, respectively. |
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.
Should it be (is it?) mentioned somewhere that the default behavior is to replace the list?
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.
Yeah, that should be made more clear.
Other than the comment +1 |
As mentioned in #152 , I think it would be better to let the default behaviour be to add items to a list and have a --clear-[something] to clear the list. This maintains the same functionality with one less argument (and to be honest, is what I would expect it to do). |
I agree. The With respect to making it append by default, making the The real problem here is that "whitelist" can be a noun or a verb. The argument is meant to be a noun, i.e. you're setting the whitelist but it's equally reasonable at first glance to read it as if you're whitelisting a package. I also tried to clarify this in the documentation: https://github.com/catkin/catkin_tools/blame/master/docs/verbs/catkin_config.rst#L239-252 |
- calling catkin config -a [ARGS] will append elements to list args - calling catkin config -r [ARGS] will remove elements from list args - also fixing context load/save code style - also fixing line-too-long code style
24c9f2e
to
4e4d7f3
Compare
@wjwwood I've updated the documentation |
lgtm, thanks. |
context: adding append/remove args option
catkin config [--append-args | -a] [ARGS]
will append elements to list argscatkin config [--remove-args | -r] [ARGS]
will remove elements from list argsFixes #176