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

PAC usage / docopt inconsistent #106

Open
JKrag opened this issue Jul 12, 2017 · 1 comment
Open

PAC usage / docopt inconsistent #106

JKrag opened this issue Jul 12, 2017 · 1 comment

Comments

@JKrag
Copy link
Member

JKrag commented Jul 12, 2017

The docopt section (in core.cli_text) that defines the usage of pac is currently inconsistent/incorrect.

The main Usage: section defines to main usage patterns (apart from --help):
pac from ...
pac from-latest-tag ...

but the Options: section defines two switches called --from and --from-latest-tag.

Apart from the fact that this is confusing and inconsistent, it also means that pac currently accepts, without failure, input like:

./pac.rb from 55857d4 --from fb49307

or

./pac.rb from 55857d4 --from-latest-tag

According to @MadsNielsen the "correct" one is from as a command even if it seems a bit inconsistent with the --to switch.

Suggested solution:

  • The docopt section should be changed to remove the two deprecated switches (--from and --from-latest-tag)
  • The docopt should instead document the legal commands from and from-latest-tag in a separate section. Docopt allows this by just adding more sections. See fake git example for inspiration.
  • While we are at it, the docopt should also document the rather important --to switch.
  • The docopt should probably also contain at least a simple Examples section (see calculator example )
@buep
Copy link
Contributor

buep commented Jul 13, 2017

That is a well described change you mention. It would be great to implement that next time we change something, or maybe before.

Relates a bit to #57

@buep buep added this to the Backlog milestone Jul 13, 2017
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