Open pborglin opened 6 years ago
The first one is, indeed, a change I want to implement.
The second one, actually, I've considered it since I started this project. However, it's not that easy as it seems. I gave up on this feature because: when a non-exists argv
value appears, and there are multi use-cases, it's difficult to determine it's a non-exists command or a missed args
The third one is due to the implement. When writing
Usage: prog (-a | -b | -c)
It will internally be expanded to
Usage:
prog -a
prog -b
prog -c
Which will lead docpie
miss the "exclusive" information. And the following usage works in docpie
:
Usage:
prog (-a | -b | -c)
prog -a -b
prog -a -c
prog -b -c
But, is it acceptable? Should this give an error? :(
So, in short:
Priority order: 1 > 2/3
Thanks for opening this issue. Due to my job, I may have little time working on these (but I'll try). Pull requests are welcome :)
Hi, Thanks for your quick response! I see your point in number two. And for number three I understand that it is good to be able to enter two options of three. For the third point we will probably add our own checks in the code.
Best Regards, Pernilla
From: Tyler Temp [mailto:notifications@github.com] Sent: den 26 oktober 2017 18:00 To: TylerTemp/docpie docpie@noreply.github.com Cc: Borglin, Pernilla pernilla.borglin@volvocars.com; Author author@noreply.github.com Subject: Re: [TylerTemp/docpie] Improvement proposals (#7)
The first one is, indeed, a change I want to implement.
The second one, actually, I've considered it since I started this project. However, it's not that easy as it seems. I gave up on this feature because: when a non-exists argv value appears, and there are multi use-cases, it's difficult to determine it's a non-exists command or a missed args
The third one is due to the implement. When writing
Usage: prog (-a | -b | -c)
It will internally be expanded to
Usage:
prog -a
prog -b
prog -c
Which will lead docpie miss the "exclusive" information. And the following usage works in docpie:
Usage:
prog (-a | -b | -c)
prog -a -b
prog -a -c
prog -b -c
But, is it acceptable? Should this give an error? :(
So, in short:
Priority order: 1 > 2/3
Thanks for opening this issue. Due to my job, I may have little time working on these (but I'll try). Pull requests are welcome :)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/TylerTemp/docpie/issues/7#issuecomment-339714383, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AcCcHRQn5Lmdhri0fM3melQjE28Thdxlks5swKyFgaJpZM4QET0N.
Hey! Thanks for a really good package. We are now using it for one of our internal tools. This is not a bug report, but some proposals for improvements, that we think would make the package even better.
Add an api option to only allow exact matching of options. Right now we have an option --compress_lzss. If you type --compress at the command line, it will be interpreted as --compress_lzss, since no other option starts with --compress. But later on we will also add an option --compress_proprietary. If you then have created scripts to run the CLI, containing --compress, then will then stop to work. So therefore we would like to only accept options if they are completely right entered.
Give a message "Unknown Command" when an unknown command is entered (Just as for unknown options)
But when I give argv as:
it give the result:
Usage: pie.py get --opt1=O1 --opt2=O2
get --optt1 ds --opt2 ds
Unknown option: --optt1.
Usage: pie.py get --opt1=O1 --opt2=O2
But when I give argv as:
it give the result:
Please respond if you think this is something to add or not.
Best Regards, Pernilla
docpie
version: 0.3.6 / Sat Jul 1 01:54:16 2017