summary refs log tree commit diff stats
path: root/lib/pure/parseopt.nim
Commit message (Collapse)AuthorAgeFilesLines
* remove deprecated stuff from the stdlib; introduce better deprecation warningsAraq2018-05-051-2/+0
|
* parseopt stdlib module: dont rely on the zero terminatorAndreas Rumpf2018-04-291-23/+25
|
* Add ability for users to elide ':' or '=' when CLI authors pass a (#7297)c-blake2018-03-081-22/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add ability for users to elide ':' or '=' when CLI authors pass a non-empty partial symbol table. Behavior should be identical to the old behavior if empty partial symbol tables are passed. "Partialness" of the symbol table refers to the fact that one need only specify option keys that are toggles/booleans/do not take arguments, hence the "NoArg" suffixes in shortNoArg and longNoArg. commandLineParams() returns seq[TaintedString], so use that consistently in getopt() and initOptParser(seq[TaintedString]) dropping the taint at the quoting stage just as with the paramStr() logic. Fix capitalization inconsistency of cmdLongOption. Export OptParser.cmd and OptParser.pos so that, at least *in principle*, users of this API can handle "--" option processing termination or some "git-like" sub-command stop word with a separate option sub-syntax. { Eg., ``case p.key of "": echo "trailing non-option args: ", p.cmd[p.pos..^1]`` or ``case p.kind of cmdArgument: if p.key == "mysubcmd": ...``. } Really, searching for the last delimiter before p.pos is probably needed to frame the trailing text..Not the nicest API, but still possible with effort. * Make requested changes from string to seq[char] (see https://github.com/nim-lang/Nim/pull/7297) * Document new behavior and elaborate on some special cases. * NoArg => NoVal to be less ambiguous/more clear. * Add more documentation and an example snippet. * Tweak language. Clarify still using ':'/'=' is ok. * Add a test case for new NoVal behavior.
* make travis green againAndreas Rumpf2018-03-011-18/+18
|
* added -d:nimNoArrayToString define to allow easier porting to 0.18Araq2018-03-011-1/+19
|
* fixes parseopt/parseopt2 custom cmdline args.Parashurama2017-06-061-15/+30
|
* docs now build againAraq2015-10-121-0/+178
|
* Move deprecated modules into lib/deprecated/Adam Strzelecki2015-09-301-178/+0
| | | | | This gives clear indication what modules are now deprecated and reduce clutter in non-deprecated module directories.
* fixes #2874Araq2015-07-011-37/+56
|
* lib/pure/p-t - Dropped 'T' from typespdw2015-06-041-1/+1
|
* parseopt is not deprecated anymoreAraq2015-03-031-3/+6
|
* Happy new year!Guillaume Gelin2015-01-061-1/+1
|
* updated nimgrep toolAraq2014-09-101-1/+1
|
* Nimrod renamed to NimAraq2014-08-281-1/+1
|
* several modules changedAraq2014-08-281-1/+1
|
* big renameAraq2014-08-271-15/+14
|
* renamefestAraq2014-08-231-1/+1
|
* distinguish between 'defined' and 'declared'Araq2014-08-111-2/+2
|
* Adds parseopt2 module to documentation index.Grzegorz Adam Hankiewicz2014-01-151-2/+2
|
* case consistency: cs:partial bootstraps on windowsAraq2013-12-291-1/+1
|
* case consistency: next stepsAraq2013-12-291-1/+1
|
* case consistency part 4Araq2013-12-271-3/+3
|
* Make old parseopt as deprecated.Michał Zieliński2013-12-101-1/+4
|
* Removes executable bit for text files.Grzegorz Adam Hankiewicz2013-03-161-0/+0
|
* year 2012 for most copyright headersAraq2012-01-021-1/+1
|
* renamed optional to discardableAraq2011-09-241-14/+14
|
* beginning of a taint mode; type system enhancementsAraq2011-09-241-1/+1
|
* bugfix: proper cache for generic instantiationsAraq2011-07-211-9/+1
|
* deprecated system.copy: use system.substr insteadAraq2011-05-141-1/+1
|
* inlining of the write barrier for dllsAndreas Rumpf2010-08-081-44/+54
|
* fixed pango/pangoutils new wrappersAndreas Rumpf2010-02-261-0/+0
|
* continued work on html/xmlparserrumpf_a@web.de2010-02-141-0/+0
|
* implemented multi methodsAndreas Rumpf2009-09-231-19/+19
|
* added tools and web dirsAndreas Rumpf2009-09-151-0/+0
|
* version0.7.10Andreas Rumpf2009-06-081-0/+152