Use a command line library crate
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.
There seem to be some good crates available for this: https://crates.io/keywords/cli?sort=downloads
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.
@pbteja1998 has expressed interest in taking this up. :)
@polybuildr, I will not be able to work on this. I got some other work.
I'm working on this
@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.
@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.
Sounds good. In that case, let's go for Clap.
@anukul, any updates?