Skip to content

Navigation Menu

Sign in
Sign up

Commands that run other commands #60

Unanswered
cmcgee1024 asked this question in General
Discussion options

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.

You must be logged in to vote

Replies: 1 comment

Comment options

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /