v1cont / yad

Yet Another Dialog
GNU General Public License v3.0
657 stars 58 forks source link

Problems with "-" and "_" #151

Open wolfgang-58 opened 2 years ago

wolfgang-58 commented 2 years ago

Good Morning, I have problems displaying strings with "-" and "_". Here's an example:

yad --form --title="Test mit -TEST und _TEST" --expander="Text: -TEST und _TEST" \
--field="Input1": "-1.TEST und _1.TEST" \
--field="Input2": " -2.TEST und _2.TEST"

Title: is OK expander: is without "_" Input1: Text 2 is displayed Input2: is empty Does anyone have an idea? Thanks very much! greeting wolfgang

Misko-2083 commented 2 years ago

You found a bug. When a string begins with "-N" where N is a number it makes a mess. yad --form --field="Input1" --field="Input2" "-0" "-1" However it does not happen if fields are set from stdin. { echo -e "-1.TEST und _1.TEST" ; echo "-2.TEST und _2.TEST" ;} | yad --form --field="Input1" --field="Input2"

v1cont commented 2 years ago

В Sat, 27 Nov 2021 06:36:47 -0800 Милош Павловић @.***> пишет:

You found a bug. When a string begins with "-N" where N is a number it makes a mess. yad --form --field="Input1" --field="Input2" "-0" "-1" However it does not happen if fields are set from stdin. { echo -e "-1.TEST und _1.TEST" ; echo "-2.TEST und _2.TEST" ;} | yad --form --field="Input1" --field="Input2"

it's not a bag, just separate options and regular arguments starting with dash with two dashes

yad --form --field="Input1" --field="Input2" -- "-0" "-1"

Misko-2083 commented 2 years ago

That's right, my mistake. I way distracted by the Gtk3 popover that displays emojis when pressing ctrl + : It appears when the text entry or a form entry text info dialog. image