Coder Social home page Coder Social logo

Comments (14)

binarytrails avatar binarytrails commented on June 1, 2024 1

In of my projects, I tried to use this feature with the -e option in the following line:

script.py [-v] (-i) <interface> [-e <ip> -c] ((-h) <directory> | (-f) <frontend> (-a) <address>)

So it looks like:

script.py [-v] (-i) <interface> [-e <ips> ... -c] ((-h) <directory> | (-f) <frontend> (-a) <address>)

I also tried:

script.py [-v] (-i) <interface> [-e <ips> ...] [-c] ((-h) <directory> | (-f) <frontend> (-a) <address>)

Unfortunately, it does not works. Any suggestions?

UPDATE
I solved this issue by moving the -e to the end:

script.py [-v] (-i) <interface> [-c] ((-h) <directory> | (-f) <frontend> (-a) <address> [-e <ips> ...])

from docopt.

keleshev avatar keleshev commented on June 1, 2024

I'm sorry, but at this point only multiple positional arguments are supported. When I have time I plan to implement the syntax for multiple options:

-w <path> ...

from docopt.

colinta avatar colinta commented on June 1, 2024

Just wanted to make sure I wasn't using it wrong! :-)

from docopt.

keleshev avatar keleshev commented on June 1, 2024

I will reopen this issue, since this is something I want "todo".

BTW, will be interesting to see: what workaround are you going to make? or stop using docopt?

from docopt.

colinta avatar colinta commented on June 1, 2024

I dunno, I don't want to promise that i'll look at the code and send a pull request, but I might.

The multiple-watch-folders thing is not a feature that I urgently need, so sticking with docopt for now! :-)

from docopt.

keleshev avatar keleshev commented on June 1, 2024

@colinta I added support for the syntax [-w <path> ...] which can be used as > punt -w dir1 -w dir2. It is now in experimental branch.

After more testing this will get into master branch and then released as 0.5.0 to PyPI during the upcoming week.

Any feedback is appreciated.

from docopt.

colinta avatar colinta commented on June 1, 2024

I'll play with it and let you know if I find anything. Thanks!

from docopt.

colinta avatar colinta commented on June 1, 2024

http://github.com/colinta/punt/tree/experimental/

It works great! Thanks Vladimir! I'll leave it on my experimental branch until this gets merged into master.

from docopt.

keleshev avatar keleshev commented on June 1, 2024

Great! I'll close this issue as soon as this change is on PyPI.

from docopt.

keleshev avatar keleshev commented on June 1, 2024

0.5.0 is now out and on PyPI

from docopt.

colinta avatar colinta commented on June 1, 2024

Thanks for the heads up, Vladimir! punt v1.8 can be released!

from docopt.

shabbyrobe avatar shabbyrobe commented on June 1, 2024

Woohoo! I will bring the PHP port up to speed tonight.

from docopt.

kyle-fritz-zocdoc avatar kyle-fritz-zocdoc commented on June 1, 2024

Is there a way to specify multiple options in a similar way, but using the [options] shortcut as part of the usage section? The following didn't seem to work for me:

Naval Fate.

Usage:
  naval_fate.py ship [options]

Options:
  --speed <kn> ...  Speed in knots.

argv: ship --speed=20 --speed=30

from docopt.

keleshev avatar keleshev commented on June 1, 2024

@kyle-fritz-zocdoc no, unfortunately (or luckily).

from docopt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.