Replies: 3 comments 4 replies
-
I am just not sure if this type of feature already exists, or if there has been any previous discussions on it. If not, I can create an issue. There I could also share some more ideas for how this could be implemented. |
Beta Was this translation helpful? Give feedback.
-
Are you asking for something like python's shlex.split? Clikt doesn't currently expose a function like that directly, but you can get something similar by making a command with treatUnknownOptionsAsArgs and no other parameters. |
Beta Was this translation helpful? Give feedback.
-
No, I am not asking about anything related to parsing command line arguments. I am asking about the opposite: generating command line arguments. I am looking for a typesafe way to configure a CliktCommand in kotlin, and then output a List that would produce that command. So from my snippet above, I would construct an instance of |
Beta Was this translation helpful? Give feedback.
-
I just discovered the library and I am very impressed! I've already begun using it and I'm enjoying it.
One thing that I am looking for right away but having trouble finding is a way to configure a
CliktCommand
at runtime and get a List from it (typesafe and without any reflection tricks)Here is how I imagine it might look:
Though currently, it seems arguments and options can only be
val
, and I cannot find a feature that "reverse-parses" a list of strings from a pre-configured CliktCommandBeta Was this translation helpful? Give feedback.
All reactions