Skip to content

Latest commit

 

History

History
65 lines (41 loc) · 1.73 KB

TODO.md

File metadata and controls

65 lines (41 loc) · 1.73 KB

docopts (docopt for bash) TODO list or questions

better error handling

#17

See also:

PR: docopt/docopt.go#65

It probably needs to rewrite the docopt parser.

Example error handling:

  • docopt/docopt#459 (-d at the endi handling [options])
    • it means "any option not in usage-pattern".

    • error could be: -d option not allowed in generate action it has conflict with follwing Usage: mytool -d | --debug
  • docopt/docopt#466 (invalid option must be named)
    • myscript.py --junkoption ==> error: Invalid option '--junkoption'
  • docopt/docopt#460 (invalid option for selected action + debug parse)
    • see my comment on issue
  • docopt/docopt#472 ( options are in multiple lines)
    • error about mandatory argument
    • curiously --repl=234 is matched?

--json output

same as --no-mangle but json formated

Somewhat discussed here: docopt/docopt#174

Trivial, could be implemented, even without embbeding JSON lib. See branch json-api too.

functional testing for all options

./docopts --help

  • tests/functional_tests_docopts.bats was introduced in PR #52

return or kill for function instead of exit

Add a parameter to handle return or kill instead of exit so it can be launched inside a function.

See also: #43

verb action

docopts parse "$usage" : [<args>...]

generate bash completion from usage

Would probably need a new docopt parser too.

docopts completion "$usage"

config file parse config to option format

À la nslcd… ?

  • json merge
  • toml merge (ini)