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

Feature request: add a "default" action #2

Closed
lstep opened this issue Nov 10, 2015 · 2 comments
Closed

Feature request: add a "default" action #2

lstep opened this issue Nov 10, 2015 · 2 comments
Assignees

Comments

@lstep
Copy link

lstep commented Nov 10, 2015

It would be cool if climax could execute a default climax.Command if no parameter is specified on the CLI.

@tucnak tucnak self-assigned this Nov 10, 2015
@tucnak
Copy link
Owner

tucnak commented Nov 10, 2015

Thanks! Sounds pretty reasonable and easy to implement, will definitely do.

@tucnak
Copy link
Owner

tucnak commented Nov 9, 2016

Back here after a while. I guess we should stick to Application.Default, which is a func(Context) int for now (with some documentation arrangements probably). At the moment what you can do is:

app := climax.New("name")
// ...
app.Default = someCommand.Run

We could introduce DefaultCmd or anything, but it would most certainly add some ambiguity.

@tucnak tucnak closed this as completed Nov 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants