adishavit / argh

Argh! A minimalist argument handler.
BSD 3-Clause "New" or "Revised" License
1.33k stars 93 forks source link

Problem space in string value #50

Closed RegisGraptin closed 4 years ago

RegisGraptin commented 4 years ago

Hello,

I would like to put string value with space. Currently I could have only the first element. Example :

my-app --config="test test"

I have : test

Here is the code I used :


  argh::parser cmdl;
  cmdl.add_params({"-t", "--config", "-s", "--scale"});
  cmdl.parse(argc, argv);
  std::cout << cmdl("config").str() << '\n';

I don't know if someone already handle this problem ?

Best regards

adishavit commented 4 years ago

Hmmm... the last tip in the readme Tips section shows exactly this example 🤔. I’ll check.

RegisGraptin commented 4 years ago

Ok, I found what was the problem it was my mistake. I have an intermediary script for running my program to Docker. Sorry about that, and thanks for the help.

Best regards