abiosoft / ishell

Library for creating interactive cli applications.
MIT License
1.68k stars 195 forks source link

How to find the parent of subcommand? #111

Open vshesha opened 5 years ago

vshesha commented 5 years ago

In case of subcommands, how to find the parent command, using the ishell context of the sub command?

For example: Say mycmd and newcmd has 2 subcommands:

mycmd help 
add del

newcmd help
add del

The handler for add receives the ishell.Context. How to figure if the parent of add is mycmd or newcmd?

bharathshetty4 commented 4 years ago

+1. Couldn't find way to get it