Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Tab completion doesn't recognize line breaks in usage strings #106

Open
con-f-use opened this issue Feb 23, 2015 · 2 comments
Open

Tab completion doesn't recognize line breaks in usage strings #106

con-f-use opened this issue Feb 23, 2015 · 2 comments
Labels

Comments

@con-f-use
Copy link

The follwing docstring is perfectly parsed by docopt:

Usage:
  example.py ( cmd1 | cmd2 |
     cmd3 )

But docopt_wortlist has problems in bash shell

confus@confusion:~$ example.py Expected pattern but reached end of usage pattern.
@BurntSushi BurntSushi added the bug label Feb 23, 2015
@BurntSushi
Copy link
Member

Seems like a bug in docopt.rs proper. I wonder if that type of syntax should even be allowed by Docopt.

@con-f-use
Copy link
Author

I don't know if it "should", but it is. My example is parsed correctly and cmd3 is recognized as a command by pythonic docopt. Multiline usage strings are allowed.
See:
docopt/docopt#130

Btw. depending on whether the | character is before or after the linebreak I get another error message:

confus@confusion:~$ example.py Unclosed group. Expected ')'.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants