Commit graph

166 commits

Author SHA1 Message Date
Jack Stouffer
4c4733ae72 Removed unused variables from std.getopt 2016-07-13 11:33:53 -04:00
Jack Stouffer
541aa66f5d Fixed std.algorithm imports in std.getopt to not be package wide 2016-07-03 01:15:41 -04:00
Atila Neves
4e27b6f376 Add @safe and @system to std.getopt unit tests 2016-07-01 11:25:52 +02:00
Andrei Alexandrescu
81d132f39a Merge pull request #4381 from MartinNowak/merge_stable
Merge remote-tracking branch 'upstream/stable' into merge_stable
2016-06-18 08:31:42 -04:00
Sebastian Wilzbach
ec47ac4224 Remove the WEB macro in favor of HTTP
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
Martin Nowak
82a147765a Merge remote-tracking branch 'upstream/stable' into merge_stable 2016-05-29 23:56:51 +02:00
Sebastian Wilzbach
2dfbc51f17 Standardize whitespace after imports
Unified with:

sed -E "s/import\s*([^ ]+)\s*:\s*(.*(,|;))/import \1 : \2/" -i **/*.d
2016-05-29 22:09:56 +02:00
Sebastian Wilzbach
18b8abf60a remove the deprecated wiki macros 2016-05-27 05:52:23 +02:00
Sebastian Wilzbach
484f7bfbe0 enforce: whitespace after catch 2016-05-14 15:28:43 +03:00
Sebastian Wilzbach
d1714c9afb minor style fixes 2016-04-27 04:18:22 +03:00
Sebastian Wilzbach
3d67cd228c style fix: space between operators 2016-04-26 22:26:20 +03:00
Basile Burg
4a21631a0f fix issue 15914 2016-04-14 10:01:50 +02:00
Q. F. Schroll
f88d9402e5 Typo 2016-04-03 16:36:13 +02:00
H. S. Teoh
405858d816 Merge pull request #3859 from BBasile/getopt-checker
Static verification of std.getopt arguments with more helpful error messages
2016-02-17 22:01:21 -08:00
Basile Burg
ad226e92d5 added getOpt constraint that checks the options
on invalid pattern:
- outputs a message that gives a hint about the wrong type
- includes the index of the wrong option

the message doesn't hide the error origin becasue pragma(msg) is used instead or assert(0)
2016-01-19 18:51:47 +01:00
Shriramana Sharma
5978ca7831 migrate other Phobos modules to use std.exception.basicExceptionCtors 2016-01-17 10:39:37 +05:30
Jakob Øvrum
8b495a5e60 Remove use of exit() in std.getopt example
Supersedes #3875
2016-01-12 16:39:20 +09:00
AndrejMitrovic
3612fdab0e Merge pull request #3727 from CyberShadow/pull-20151018-004338
fix Issue 15220 - [REG2.065] std.getopt parses -o=value as "=value"
2015-10-18 15:17:39 +02:00
jibal
dd34ae8757 std.getopt: Documentation fixes and improvements 2015-10-18 03:04:31 +00:00
Vladimir Panteleev
3c7c3ecfd6 fix Issue 15220 - [REG2.065] std.getopt parses -o=value as "=value" 2015-10-18 00:44:23 +00:00
Vladimir Panteleev
c403d644a4 std.getopt: Re-add constructor removed in PR #3489 2015-10-05 19:49:53 +00:00
Robert burner Schadek
6c8b8232c3 fix issue14724
some nicer impl
2015-08-16 23:50:38 +02:00
Steven Schveighoffer
6d3c95ecc5 Change all bold headers to DDOC headers 2015-06-01 18:26:50 -04:00
Steven Schveighoffer
a1591f048b Document --help better.
Removed redundant documentation for GetoptResult
2015-05-29 21:40:32 -06:00
Robert burner Schadek
f52ecdb185 getopt: some string decl fixes 2015-05-28 18:49:56 +02:00
Vladimir Panteleev
c1276c12dd fix Issue 14526 - GetOptException DDOC needs cleanup 2015-05-05 08:06:34 +00:00
Brian Schott
c039fbe847 Fix ddoc for Option.required
DDoc did not consider that this second comment was connected to the first, leading to part of the comment being missing at http://dlang.org/phobos/std_getopt.html#.Option
2015-04-29 10:37:30 -07:00
Alex Parrill
6eb18526dd Getopt: fixed a missing space between the option name and the rest of the error message for the error when a required option is not specified. 2015-04-16 17:35:33 -04:00
H. S. Teoh
b34307abef [Trivial] Add missing comma in std.getopt code example. 2015-03-23 11:52:46 -07:00
Matt Kline
f10cf5ba57 Remove parens from last commit 2015-02-13 09:17:22 -08:00
Matt Kline
9a3cfd1aaa Goodbye to more dups.
Many thanks to Steven Schveighoffer for catching these.
2015-02-13 09:06:11 -08:00
Matt Kline
6e9307b492 Kill more .dups in std.getopt 2015-02-13 08:55:05 -08:00
Matt Kline
a15d9be6fd Remove unneeded .dup of arrays
See comments from #2974, specifically
https://github.com/D-Programming-Language/phobos/pull/2974#discussion_r24388654
2015-02-12 22:22:58 -08:00
Matt Kline
aee709b080 Remove array dup from this PR 2015-02-09 22:17:47 -08:00
Matt Kline
cd8b96c032 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.
2015-02-09 20:24:46 -08:00
Robert burner Schadek
014ff8e155 getopt public undocumented symbols and style
some of the symbols where clearly only used from within getopt but still where
public.

additionally some style violation fixes
2015-01-21 14:48:31 +01:00
Ilya Yaroshenko
48547acdd5 update scope import in std.getopt 2014-11-16 00:27:53 +03:00
Ilya Yaroshenko
dc5cc96b8e std.getopt: clean imports 2014-11-14 16:47:46 +03:00
Robert burner Schadek
cd1191eecf some doc fixes 2014-10-22 21:43:09 +02:00
Geod24
0fb95b8c27 Usage of WEB macro for License everywhere 2014-10-15 11:30:42 +02:00
Robert burner Schadek
b7e5be9543 getopt had some trailing whitespace 2014-10-10 14:00:26 +02:00
Nils Boßung
b676492d66 whoops, forgot one ++i 2014-08-18 07:24:47 +02:00
Nils Boßung
c40fd397c6 fix Issue 13317 - std.getopt: endOfOptions broken when it doesn't look like an option 2014-08-18 01:14:40 +02:00
Nils Boßung
9c10c24220 fix Issue 13316 - std.getopt: implicit help option breaks the next argument 2014-08-18 00:48:01 +02:00
Nils Boßung
d51af72d5a fix Issue 13315 - std.getopt: implicit help option doesn't work without config.passThrough 2014-08-18 00:11:13 +02:00
H. S. Teoh
5a6aec71db Fix screwed up list nesting in getopt's ddoc comment. 2014-08-08 15:06:32 -07:00
Alex Rønne Petersen
561b28ebcc Merge pull request #2398 from CyberShadow/getopt-bundling-doc
std.getopt: Remove opinionated comment regarding option bundling
2014-08-04 04:36:20 +02:00
Vladimir Panteleev
3ec999261e std.getopt: Remove opinionated comment regarding option bundling
The behavior is standard in UNIX programs. Although it wouldn't make sense
to change the default at this point, D documentation is not a good place
for criticizing established standards.
2014-08-04 02:22:12 +00:00
k-hara
35bf8e1719 fix property enforcement 2014-07-30 19:15:39 +09:00
Walter Bright
dc97d14b3c Merge pull request #2072 from burner/getoptx
getoptX Help Messages for getopt
2014-07-10 15:04:28 -07:00