Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Add "subcommand chooser" #19

Closed
yegle opened this issue May 6, 2015 · 2 comments
Closed

Add "subcommand chooser" #19

yegle opened this issue May 6, 2015 · 2 comments

Comments

@yegle
Copy link

yegle commented May 6, 2015

The cli.CLI struct should add a SubcommandChooser, which is a func that return a cli.Command.

The reason would be when the specified subcommand doesn't exist (see also pull reqeust #10) the behaviour can be controlled by the user.

Also I can implement something similar to busybox's behaviour that by creating a link foo to my binary, I can invoke the foo subcommand directly.

If this idea looks good to you I can send a PR and implement it.

@mitchellh
Copy link
Owner

This looks good! If you submit a PR I'd be happy to merge this. Going to close this issue though since I don't plan on doing this myself in the short term. Thanks!

@yegle
Copy link
Author

yegle commented Jun 4, 2015

FYI this is implemented in #20

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

No branches or pull requests

2 participants