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

Interactive option #44

Closed
oleiade opened this issue Nov 24, 2013 · 7 comments
Closed

Interactive option #44

oleiade opened this issue Nov 24, 2013 · 7 comments

Comments

@oleiade
Copy link

oleiade commented Nov 24, 2013

I'd really to be able to create interactive flags: when it's used, it will read it's value from standard input.

example:

$ mycmdlineapp --ask-password
password: *******

It's golang usage could like:

cli.InteractiveFlag{"ask-password, a, password", "default-password", "Asks for password"}

What do you think?

@kytrinyx
Copy link
Contributor

kytrinyx commented Dec 4, 2013

I have that use case, but for individual commands as well as for a whole app, and I'd want any number of them.

$ mycmdlineapp stuff
a question: something
another question: abc123
yet another question: more answers

@codegangsta
Copy link
Contributor

I'm not sure this needs to be in the cli package itself. I needed to have an interactive mode so I did it this way:

https://github.com/codegangsta/hip/blob/master/hip.go#L64-L78

@kytrinyx
Copy link
Contributor

kytrinyx commented Dec 4, 2013

Yeah, I've got code that handles it, as well. I'm happy to keep it that way, if you think that it's best to keep it out of the cli package.

Should this issue be closed, then?

@codegangsta
Copy link
Contributor

Yup. Closing

@kytrinyx
Copy link
Contributor

kytrinyx commented Dec 4, 2013

❤️ <-- random open source love (thanks for writing this package)

@codegangsta
Copy link
Contributor

Thanks for reminding me to clean up these issues. I have been so busy with
Martini that I have somewhat neglected cli in the process. :)

On Tue, Dec 3, 2013 at 6:08 PM, Katrina Owen notifications@github.comwrote:

[image: ❤️] <= random open source love (thanks for writing this
package)


Reply to this email directly or view it on GitHubhttps://github.com//issues/44#issuecomment-29771610
.

@oleiade
Copy link
Author

oleiade commented Dec 4, 2013

Wow, closing that ticket without even letting me troll a little bit. That's rude.

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

3 participants