abiosoft / abiosoft/ishell

How to find the parent of subcommand?

Open
#111 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.8k
Forks
213
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.