dan-t / rusty-tags

Create ctags/etags for a cargo project
Other
408 stars 32 forks source link

Used clap to simplify command line argument parsing #4

Closed kbknapp closed 9 years ago

kbknapp commented 9 years ago

@dan-t If you're interested I added clap to do the argument parsing for you. This simplifies the start-up as you don't have have to do any error handling or usage statements. It also gives you the help/version flags for free.

To see what I mean, build and run:

$ rusty-tags wrong
"wrong" isn't a valid value for MODE
        [valid values: vi emacs]
USAGE:
        rusty-tags [FLAGS]  <MODE>  
For more information try --help
$ rusty-tags vi
[... your output ...]

I know it's not really needed just to parse a single argument, but in the event you want to add options in the future this simplifies it quite a bit.

No pressure to include if you're not interested, just thought I'd throw it out there ;)

Edit: Forgot to add at-mention :P

dan-t commented 9 years ago

Thanks! For now I just want to keep the dependencies low until Rust 1.0 is out.

If Rust 1.0 is out I will have another look.

kbknapp commented 9 years ago

No worries, thanks for the look :)

On Mon, Mar 30, 2015 at 1:00 PM, Daniel Trstenjak notifications@github.com wrote:

Thanks! For now I just want to keep the dependencies low until Rust 1.0 is out.

If Rust 1.0 is out I will have another look.

— Reply to this email directly or view it on GitHub https://github.com/dan-t/rusty-tags/pull/4#issuecomment-87750891.

Anachron commented 9 years ago

Rust 1.0 is out ;)

dan-t commented 9 years ago

Thanks! It's now part of rusty-tags 0.4.1.