Open philippgille opened 6 years ago
Yes you can. See the calculator example on the main readme of the project.
The usage example for the calculator example is Calculator.exe add -Value1 1 -Value2 5
, which is app action -param
, not app subject action -param
. Or did I misunderstand the example?
As I understand the documentation, with PowerArgs you can currently implement these two kinds of CLI:
myApp -some "arg"
myApp someAction -some "arg"
But some CLIs have another "level", which is subjects. For example the Docker CLI:
docker container ls -a
docker image ls -a
docker container run --name some-redis -d redis
Where
docker
is the application,container
/image
the subject andls
/run
etc. the action, with actions belonging to the subject and with arguments only applying to the specific action.Is this possible with PowerArgs? If not, I think this might be a powerful addition for complex CLIs.