On Wednesday, 9 March 2016 at 18:56:10 UTC, Markus Laker wrote:
To support git-style syntax while using Argon, I'd do this:
1. Find the (possibly empty) initial sequence of tokens that
start with a dash. Pass them to an Argon-derived class which
we'll call `Stem', which parses them.
2. If
On Thursday, 3 March 2016 at 09:33:38 UTC, Johannes Pfau wrote:
Am Thu, 03 Mar 2016 09:09:38 +
schrieb Markus Laker :
* It can open files specified at the command line. It can do
a simplified version of what cat(1) does and many Perl
programs so, and open a file specified by the user or
On Wednesday, 9 March 2016 at 18:56:10 UTC, Markus Laker wrote:
On Saturday, 5 March 2016 at 16:28:25 UTC, karabuta wrote:
I think he meant: [git status --help], where you have three
attributes with the last one being the flag. So in addition
to: [status --help] by default, you also have: [git
On Saturday, 5 March 2016 at 16:28:25 UTC, karabuta wrote:
I think he meant: [git status --help], where you have three
attributes with the last one being the flag. So in addition to:
[status --help] by default, you also have: [git status --help]
to get help on status only.
Odd: I wrote a
On Friday, 4 March 2016 at 17:34:08 UTC, Markus Laker wrote:
On Friday, 4 March 2016 at 12:21:25 UTC, Jacob Carlborg wrote:
No, I mean a longer description, more like documentation. Look
at the help for git when using --help, it has different
behavior than -h. The first one is more like a man
On Friday, 4 March 2016 at 12:21:25 UTC, Jacob Carlborg wrote:
No, I mean a longer description, more like documentation. Look
at the help for git when using --help, it has different
behavior than -h. The first one is more like a man page.
Ah, I see. Sorry for the misunderstanding.
An app
On 2016-03-03 21:55, Markus Laker wrote:
Yes. You can give an option a description, like this:
// ...
uint nr_doors;
// ...
Named("doors", nr_doors, 0) ("number of doors").AddRange(1, 4);
If you do this, the user has a nice, short name to type:
--doors 2
But the description will be used in
On 03/03/2016 04:09 AM, Markus Laker wrote:
On Thursday, 3 March 2016 at 01:52:11 UTC, Chris Wright wrote:
You might want to take a minute to shill it here. What's great about it?
OK. :-)
[snip]
Very nice! I think we should adopt some of these ideas for std.getopt as
well. -- Andrei
On Thursday, 3 March 2016 at 15:08:37 UTC, Jacob Carlborg wrote:
Does it support some longer documentation for the flags, i.e.
"git status -h" vs "git status --help"?
Yes. You can give an option a description, like this:
// ...
uint nr_doors;
// ...
Named("doors", nr_doors, 0) ("number of
On Thursday, 3 March 2016 at 09:33:38 UTC, Johannes Pfau wrote:
The rest of this list sounds quite good, but please reconsider
automatically opening files:
https://media.ccc.de/v/32c3-7130-the_perl_jam_2
I guess the scenario can't happen in D as our open file methods
won't execute programs
On Thursday, 3 March 2016 at 04:48:42 UTC, Jason White wrote:
I was also dissatisfied with std.getopt and wrote a command
line argument parser (competition!):
https://github.com/jasonwhite/darg
Though it's not quite feature-complete yet, it does everything
I need it to. It uses
On 03/02/2016 02:50 PM, Markus Laker wrote:
https://github.com/markuslaker/Argon
Let me know if you do something interesting with it.
Markus
Reminds me of one I used years ago for C#: I like the approach, it's a
good one. Getopt by comparison, while very good, always seemed like a
kludge
On 2016-03-02 20:50, Markus Laker wrote:
https://github.com/markuslaker/Argon
Let me know if you do something interesting with it.
Does it support some longer documentation for the flags, i.e. "git
status -h" vs "git status --help"?
--
/Jacob Carlborg
Am Thu, 03 Mar 2016 09:09:38 +
schrieb Markus Laker :
> * It can open files specified at the command line. It can do a
> simplified version of what cat(1) does and many Perl programs so,
> and open a file specified by the user or fall back to reading
> from stdin.
On Thursday, 3 March 2016 at 04:48:42 UTC, Jason White wrote:
Looks nice! Can it support sub-commands (e.g., git status)? I
suppose that can be done by passing through unused arguments
and parsing those again.
Yes, that's what I'd do.
Also, you'll get more users if it's a dub package and on
On Thursday, 3 March 2016 at 01:52:11 UTC, Chris Wright wrote:
You might want to take a minute to shill it here. What's great
about it?
OK. :-)
* It parses positional parameters, error-checks them and places
them into type-safe variables: it doesn't just pick out named
--switches and then
On Wednesday, 2 March 2016 at 19:50:30 UTC, Markus Laker wrote:
https://github.com/markuslaker/Argon
Let me know if you do something interesting with it.
Markus
Looks nice! Can it support sub-commands (e.g., git status)? I
suppose that can be done by passing through unused arguments and
On Wed, 02 Mar 2016 19:50:30 +, Markus Laker wrote:
> https://github.com/markuslaker/Argon
>
> Let me know if you do something interesting with it.
>
> Markus
You might want to take a minute to shill it here. What's great about it?
How do I use it? Why should I use it instead of
18 matches
Mail list logo