fiatjaf / noscl

Command line client for Nostr.
Other
269 stars 53 forks source link

main: pass docopt only the remaining command line args #27

Closed x1ddos closed 1 year ago

x1ddos commented 1 year ago

the original intention was that -datadir flag is parsed by the stdlib's flag pkg and the remaining args by docopt.

however, docopt.ParseDoc parses again all cmd line flags passed to noscl executable. since -datadir isn't defined for docopt, the following invocation is invalid:

noscl -datadir path/to/dir <sub-command>

this commit passes docopt only the args left after stdlib's flag parsing so the above example now works.