Closed frostworx closed 3 years ago
simply add -- (two dashes) before $CMDARG
this is working
yad --form --separator="\n" --quoted-output \
--text="<span font_weight='bold'>Settings for Game</span>" \
--field="commandline arguments" -- "$CMDARGS"
Oh my.... Thank you very much for your quick reply! closing here
Sorry, closed it too early. Indeed this works for one argument, but I have multiple and yad stops after the first one:
#!/bin/bash
CMDARGS="-leading -minus breaks"
OTHERARGS="-second -of -multiple -lines"
yad --form --separator="\n" --quoted-output \
--text="<span font_weight='bold'>Settings for Game</span>" \
--field="commandline arguments" -- "$CMDARGS" \
--field="other arguments" -- "$OTHERARGS"
Would be great if you had a hint :)
-- is a usual separator for options and arbitrary arguments. if some of your arguments started with dash, don't mix them with options.
yad --form --separator="\n" --quoted-output \
--text="<span font_weight='bold'>Settings for Game</span>" \
--field="commandline arguments" --field="other arguments" \
-- "$CMDARGS" "$OTHERARGS"
Great, that works (I knew double dash, but tbh I never ever had any real life need for it...)... Thank you very much for your help! Very appreciated!
Hi, First of all great program, thanks a lot! Currently I'm implementing a yad settings menu in my steamtinkerlaunch and noticed, that yad has problems with a leading "-" (minus) in variables, which breaks the whole config, as the entry is skipped and destroys the order of all config options. I workaround this, by adding a " " (space) before the minus in the variable directly in the yad command, which seems to work as it should. Here's a little example, which demonstrates the issue:
If there's anything else you need please tell me.