-
Notifications
You must be signed in to change notification settings - Fork 19
Commands that run other commands #60
There are many examples of arguments and options that run other commands.
ssh foo@example.com some-other-command arg1 arg2 arg3
docker run image ls -l
sh -c "vi somefile.txt"
When interpreting or assembling command-lines the OpenCLI specification of the top-level command the structure of the inner-command invocation is left entirely opaque since there's no easy way to know that there are semantics of the inner command, that might also be described by another OpenCLI specification. Also, in the case of inner-command arguments, it's important to recognize that options/flags are consumed by the inner command and not meant to be interpreted by the outer one.
OpenCLI should probably have a way to mark a set of arguments, or an option as an inner-command invocation. Heuristics, possibly outside of the scope of the OpenCLI specification, can allow tools to match known OpenCLI specification for the inner command and unwrap the semantics of the inner command invocation.
All reactions
Replies: 1 comment
It would be amazing!
Having this in spec would have many benefits because it's a very common pattern. It would be possible to generate a docs also.