Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ftr]Run functions for both a command and its subcommands? #165

Open
liotev opened this issue May 30, 2024 · 2 comments
Open

[Ftr]Run functions for both a command and its subcommands? #165

liotev opened this issue May 30, 2024 · 2 comments

Comments

@liotev
Copy link

liotev commented May 30, 2024

Hi, as far as I can see, if a command has a :runs function, then even if it has :subcommands, they are simply ignored. Is there any way to have :runs functions both for a command and its sub commands?

I mean if we take Git as an example, there is the git remote command which shows remotes, but it also has sub commands, for example git remote add, git remote rename etc.

Is it possible to have this pattern with the current version of cli-matic?

@l3nz
Copy link
Owner

l3nz commented May 31, 2024

No, actually I never thought about it. How ould you determine whether a command is a command or a subcommand?

@liotev
Copy link
Author

liotev commented May 31, 2024

How would you determine whether a command is a command or a subcommand?

I will have a look at the code to see if I can come up with any ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants