[phobos] [D-Programming-Language/phobos] cd8b96: Add keeEndOfOptions flag to std.getopt

GitHub via phobos phobos at puremagic.com
Wed Feb 11 10:16:46 PST 2015


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/phobos
  Commit: cd8b96c03272bea7fb763a1d8f6c01a946e01d93
      https://github.com/D-Programming-Language/phobos/commit/cd8b96c03272bea7fb763a1d8f6c01a946e01d93
  Author: Matt Kline <slavik262 at gmail.com>
  Date:   2015-02-09 (Mon, 09 Feb 2015)

  Changed paths:
    M std/getopt.d

  Log Message:
  -----------
  Add keeEndOfOptions flag to std.getopt

Currently, the endOfOptions separator ("--" by default) is
stripped from args by getopt.  At times it may be advantageous to
keep this separator, such as when your program is forwarding
command line arguments to some other program.

Without this, hacks such as

auto remaining = args.find(endOfOptions);
args = args[0 .. $ - remaining.length];
getopt(args, opts);
args = args ~ remaining;

are needed to achieve the desired behavior.


  Commit: aee709b080d374f5db265cf8fe7c20a5965653e0
      https://github.com/D-Programming-Language/phobos/commit/aee709b080d374f5db265cf8fe7c20a5965653e0
  Author: Matt Kline <slavik262 at gmail.com>
  Date:   2015-02-09 (Mon, 09 Feb 2015)

  Changed paths:
    M std/getopt.d

  Log Message:
  -----------
  Remove array dup from this PR


  Commit: 1129a2cd7ff99caa2f11a00cc35e4daec07373cd
      https://github.com/D-Programming-Language/phobos/commit/1129a2cd7ff99caa2f11a00cc35e4daec07373cd
  Author: H. S. Teoh <hsteoh at quickfur.ath.cx>
  Date:   2015-02-11 (Wed, 11 Feb 2015)

  Changed paths:
    M std/getopt.d

  Log Message:
  -----------
  Merge pull request #2974 from mrkline/getopt-preserve-EOO

Add keepEndOfOptions flag to std.getopt


Compare: https://github.com/D-Programming-Language/phobos/compare/f4d3493df782...1129a2cd7ff9


More information about the phobos mailing list