question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Seems like this is supported, but I can't get multiple arguments to work

See original GitHub issue

This is the docstring for punt.

I would like to have multiple --watch options, but I can’t figure out a syntax that supports it.

"""Watches current path (or another path) for changes and executes
command(s) when a change is detected.  Uses watchdog to track file changes.

Usage:
    punt [-w <path> ...] [-l] [--] <commands>...
    punt (-h | --help)
    punt --version

Options:
    -w <path> ..., --watch <path> ...  Which path to watch [default: current directory]
    -l, --local                        Only tracks local files (disables recusive)
"""
# blablabla
arguments = docopt(__doc__, version='punt v1.6')
print repr(arguments)
> punt -w dir1 dir2  -- make
{'--': False,
 '--help': False,
 '--local': False,
 '--version': False,
 '--watch': 'dir1',
 '-h': False,
 '<commands>': ['dir2', '--', 'make']}

> punt -w dir1 -w dir2  -- make
{'--': True,
 '--help': False,
 '--local': False,
 '--version': False,
 '--watch': 'dir2',
 '-h': False,
 '<commands>': ['make']}

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
binarytrailscommented, Aug 6, 2015

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> ...])
0reactions
keleshevcommented, Dec 17, 2013

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Retrieving multiple arguments for a single option using ...
I need help with getopts . I created a Bash script which looks like this when run:.
Read more >
How to pass multiple arguments to function ? - GeeksforGeeks
We pass arguments in a function, we can pass no arguments at all, single arguments or multiple arguments to a function and can...
Read more >
UI Doesn't Accept Functions with more than two Arguments or ...
I'm confused, I was able to get my button to work with a function with one argument. But when I add a second...
Read more >
Use parameters to ask for input when running a query
Adding parameters to an Access desktop database query makes it ask for criteria so that it filters the results.
Read more >
Function Argument Validation - MATLAB & Simulink
You can use multiple arguments blocks in a function, but all blocks must occur ... Use any MATLAB class or externally defined class...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found