fw
fw copied to clipboard
Confusing doc / error
fw add --help
fw-add
Add project to config
USAGE:
fw add [OPTIONS] <URL> [--] [NAME]
...
then:
fw add -t rust [email protected]:chevdor/fw.git
error: The following required arguments were not provided:
<URL>
USAGE:
fw add <URL> --tag <tag>...
The 2 doc don't agree with each other.
I stumbled on this a while ago.
https://github.com/brocode/fw/blob/master/src/app/mod.rs#L164 the issue is probably the index
here.
I didn't have the time to analyze this further.
No stress, I may look into this eventually, I noticed that following the doc did not behave as intended. I guess something changed and the doc was not updated.
So the right syntax as currently implemented is:
fw add <URL> [NAME] [-t ... ]
The usage fw add [OPTIONS] <URL> [--] [NAME]
is wrong.
The library generates the help and the parser. So either we are doing something wrong using it or the lib has bug.
I will have a look, I just wanted to document what I briefly checked to at least know how it works as I ended up with git urls as tags 😄
I had a look and I think the code as it is is OK.
clap
gets lots if the options such as -t rust
are provided before the URL.
It would be interesting to see whether clap 3 handles this better.