You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some programs want to accumulate "unknown" flags, i.e. those which aren't otherwise recognised by the program. I'm in two minds about this, since it brings a number of disadvantages:
There will be no --help output for these commands, so they are undiscoverable.
Given a known flag --bar, then --ba will automatically resolve to --bar, unless there is also a --baa in which case it will be an ambiguous error. The existence or otherwise of commands changes the parser, so having unknown flags can be problematic.
On the other hand, it's something that hledger already does with the -- option, so supporting it more explicitly might give a better experience for them. See this thread for details: http://www.mail-archive.com/[email protected]/msg92770.html
Yes, without this (optional) feature it seems hard to pass extra flags through to be handled by a sub-executable. Here's an example: hledger wants to pass some web-specific options through to hledger-web as in https://code.google.com/p/hledger/issues/detail?id=64 .
@ndmitchell Is there any update on this? It would be nice if the program gets access to "unknown flags" instead of cmdargs just throwing an error for better error reporting and integration with, say, editors.
From https://code.google.com/p/ndmitchell/issues/detail?id=470:
Some programs want to accumulate "unknown" flags, i.e. those which aren't otherwise recognised by the program. I'm in two minds about this, since it brings a number of disadvantages:
On the other hand, it's something that hledger already does with the -- option, so supporting it more explicitly might give a better experience for them. See this thread for details: http://www.mail-archive.com/[email protected]/msg92770.html
@simonmichael says:
Yes, without this (optional) feature it seems hard to pass extra flags through to be handled by a sub-executable. Here's an example: hledger wants to pass some web-specific options through to hledger-web as in https://code.google.com/p/hledger/issues/detail?id=64 .
Not quite so hard as all that: http://joyful.com/darcsden/simon/hledger/patch/20110923141027-3c3f9 . But it would still be nice not to have to type --.
The text was updated successfully, but these errors were encountered: