Commit graph

106 commits

Author SHA1 Message Date
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
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
AndrewEdwards
571056369b Merge branch 'master' of https://github.com/AndrewEdwards/phobos 2014-06-30 01:36:56 +09:00
AndrewEdwards
3d3b3372be Update getopt.d
Fix Ddoc: Stray '(' warning.
2014-06-29 17:05:33 +09:00
AndrewEdwards
de984190f3 Fix unterminated $(OL 2014-06-29 02:46:00 +09:00
Robert burner Schadek
d602a5347a getoptx
some tinkering

alot more

comments

some more

more doc

getoptX cleanup

tuple -> struct

getoptX -> getoptEx

Required

getoptEx is now inline

GetoptRslt -> GetoptResult

more info

some comment fixes
2014-06-17 13:48:17 +02:00
Stefan Frijters
98bf97467a Fix Issue 12921 - Module std.getopt does not respect property syntax 2014-06-14 13:56:47 +02:00
k-hara
46eef6b58e Supply the lacked local import 2014-04-03 12:37:30 +09:00
Andrei Alexandrescu
74d394737f Merge pull request #2049 from AndrejMitrovic/Fix5316
std.getopt: Add character-separated elements support for arrays and associative arrays
2014-03-31 23:34:08 -07:00
Andrej Mitrovic
9924b7aba5 Fixes Issue 5316 - Add character-separated elements support for arrays and associative arrays. 2014-03-31 18:25:27 +02:00
Andrej Mitrovic
43248700c6 Remove trailing spaces. 2014-03-24 19:42:47 +01:00
Andrej Mitrovic
f24c49312a Fix Issue 5228 - Add a GetoptException and document which exceptions are thrown. 2014-03-24 18:54:33 +01:00