Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse bug with option and value within command #50

Open
samhocevar opened this issue Jun 10, 2020 · 0 comments
Open

Parse bug with option and value within command #50

samhocevar opened this issue Jun 10, 2020 · 0 comments

Comments

@samhocevar
Copy link

Using the following:

auto dither =
(
    command("dither").set(run_mode, mode::dither),
    option("--palette") & value("palette", palette),
    option("--hicolor").set(hicolor, true),
    option("--error-diffusion").set(error_diffusion, true),
    value("image").set(in)
);

Help string looks OK:

tool dither [--palette <palette>] [--hicolor] [--error-diffusion] <image>

However nothing gets accepted; I tried all the following:

tool dither
tool dither image.jpeg
tool dither --palette x image.jpeg
tool dither image.jpeg --palette x

What does work:

  • remove the --palette option
  • move the value("image") part before the option parts; but I want to be able to specify options before the final argument in the commandline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant