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

Use a command line library crate #41

Open
polybuildr opened this issue Jun 8, 2017 · 9 comments
Open

Use a command line library crate #41

polybuildr opened this issue Jun 8, 2017 · 9 comments

Comments

@polybuildr
Copy link
Owner

The current handling of command line arguments (refer to fn main in main.rs) is rather crude. Using a command line library crate would definitely make things simpler.

@polybuildr
Copy link
Owner Author

There seem to be some good crates available for this: https://crates.io/keywords/cli?sort=downloads

@polybuildr
Copy link
Owner Author

Hmm, bad search. The top 3 here - https://crates.io/keywords/command?sort=downloads - are probably what we should look at. clap, docopt and argparse.

@polybuildr
Copy link
Owner Author

@pbteja1998 has expressed interest in taking this up. :)

@pbteja1998
Copy link

@polybuildr, I will not be able to work on this. I got some other work.

@ghost
Copy link

ghost commented Jun 23, 2017

I'm working on this

@polybuildr
Copy link
Owner Author

@anukul that's great! I suggest you compare the solutions I listed above: clap and docopt, most importantly. They're the most used command line argument crates and have two different approaches. Feel free to compare both here, and then we can move forward with one of them.

@ghost
Copy link

ghost commented Jun 26, 2017

@polybuildr clap seems more flexible to me as it allows specifying arguments manually as well as deriving them from usage strings, while docopt only supports usage strings.
also, clap's auto-generated tab completion is better as it always results in valid matches, docopt's does not.

@polybuildr
Copy link
Owner Author

Sounds good. In that case, let's go for Clap.

@polybuildr
Copy link
Owner Author

@anukul, any updates?

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