Re: String argument with optional value in std.getopt

2020-08-09 Thread Hassan via Digitalmars-d-learn
Thanks for the reply Steve On Sunday, 9 August 2020 at 12:20:16 UTC, Steven Schveighoffer wrote: 2. If your optional parameters are not tied to the option itself, then don't accept them via getopt. In other words, if `hashtrack filter` is supposed to be valid, then filter isn't an option afte

Re: String argument with optional value in std.getopt

2020-08-09 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/8/20 7:58 PM, Hassan wrote: Hello I'm trying to get getopt to recognize an argument that may or may not take a value. Here's an example : ../hashtrack --list ../hashtrack --list filter The problem is that if I point list to a string variable, the first call fails with "Missing value fo

String argument with optional value in std.getopt

2020-08-08 Thread Hassan via Digitalmars-d-learn
Hello I'm trying to get getopt to recognize an argument that may or may not take a value. Here's an example : ./hashtrack --list ./hashtrack --list filter The problem is that if I point list to a string variable, the first call fails with "Missing value for argument --list". I tried having