-
Notifications
You must be signed in to change notification settings - Fork 431
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
CommandSpec.remove(arg) does not removes the arg from command, which increases args in CommandSpec #1434
Labels
Milestone
Comments
Thanks for raising this! |
Done. Please check 1435 |
Wonderful, many thanks! I merged the PR. |
Updated the release notes now, closing this ticket. |
MarkoMackic
pushed a commit
to MarkoMackic/picocli
that referenced
this issue
Oct 17, 2021
MarkoMackic
added a commit
to MarkoMackic/picocli
that referenced
this issue
Oct 17, 2021
…ndSpec.remove(arg)` fix" This reverts commit ea8b76b.
MarkoMackic
added a commit
to MarkoMackic/picocli
that referenced
this issue
Oct 17, 2021
…ndSpec.remove(arg)` fix" This reverts commit ea8b76b.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Using picocli, we have developed a feature to hide/unhide options at runtime (based on user input). For this we used reference of 736. It works great, but CommandSpec keeps adding the argument to variable args, whose size keeps increasing, though they are not linked to any commandspec.
We could not figure out any solid reason of adding items to the list during remove. We faced a problem, as we used args() to get the list of arguments for a command and were assuming that it will provide unique set of args (associated to command), but it returned duplicate (unwanted/outdated) elements. Is it possible to remove the arg from args list when removing the arg.
For example, using the code given below, we see that args size grows from 12 to 212 (in 20 set of hide/unhide). This seems to be unnecessary so thought of indicating it.
The text was updated successfully, but these errors were encountered: