You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some picocli commands that can process instructions defined in an 'action' YAML file, with the YAML file defining acceptable CLI options (i.e., somewhat similar to picocli @Option). To have picocli accept and pass these options to our command, we use the following in our command implementation:
@UnmatchedprivateString[] actionArgs;
As we want the synopsis to show a generic placeholder for these unmatched arguments, we add a dummy picocli option like the below:
However, the special characters in the option name cause syntax errors in the command completion script generated by picocli:
-bash: ./fcli_completion: line 6357: syntax error near unexpected token `<'-bash: ./fcli_completion: line 6357: ` --<action-parameter>)'
Of course, as an easy work-around, we could just rename this option to --action-parameter, but users may interpret this as a literal option name rather than generic placeholder. Also, ideally this dummy option shouldn't even be present in the completion script.
Can you think of any quick fixes/work-arounds to have something like --<action-parameter> listed in synopsis (and manual pages), but not included in the completion script?
The text was updated successfully, but these errors were encountered:
We have some picocli commands that can process instructions defined in an 'action' YAML file, with the YAML file defining acceptable CLI options (i.e., somewhat similar to picocli
@Option
). To have picocli accept and pass these options to our command, we use the following in our command implementation:As we want the synopsis to show a generic placeholder for these unmatched arguments, we add a dummy picocli option like the below:
However, the special characters in the option name cause syntax errors in the command completion script generated by picocli:
Of course, as an easy work-around, we could just rename this option to
--action-parameter
, but users may interpret this as a literal option name rather than generic placeholder. Also, ideally this dummy option shouldn't even be present in the completion script.Can you think of any quick fixes/work-arounds to have something like
--<action-parameter>
listed in synopsis (and manual pages), but not included in the completion script?The text was updated successfully, but these errors were encountered: