Quotation mark with actions %s

18 views
Skip to first unread message

mm1ge...@gmail.com

unread,
May 6, 2021, 9:14:13 AM5/6/21
to yad-common
# I have some trouble with --select-action or --dclick-action when the string contains some quotation mark " (double q.m.)
# Data returned by --print-all are always correct
# Strings containing single quote ' are correct.

# two quotation marks  "  return  abc i.e. the " are removed from %s
echo 'a"b"c'|yad --list --column=uno --width=1000 --height=200  --print-all --select-action='bash -c "echo %s"'

# one (unpaired) quotation mark " : no action and no data returned (internal error ?)
echo 'ab"c'|yad --list --column=uno --width=1000 --height=200  --print-all --select-action='bash -c "echo %s"'

# one (unpaired) apostrophe ' : correct
echo "ab'c"|yad --list --column=uno --width=1000 --height=200  --print-all --select-action='bash -c "echo %s"'

# one escaped " :  OK
echo 'ab\"c'|yad --list --column=uno --width=1000 --height=200  --print-all --select-action='bash -c "echo %s"'

# string translated to html code is correct: Idisplay ok, return  ab"c
echo 'ab"c'|yad --list --column=uno --width=1000 --height=200  --print-all --select-action='bash -c "echo %s"'

# I got this problem with a command like this one:
pgrep -a yad|yad --list --column=A --width=800 --height=200  --print-all --select-action='bash -c "echo %s"'  
# Error: unexpected EOF
# and more with more complex strings
# tested with yad 9 and 10

Any ideas ? Thank you

Johnny Rosenberg

unread,
May 6, 2021, 2:35:24 PM5/6/21
to yad-c...@googlegroups.com
I always make sure my strings don't contain those default quotation marks, but rather those who are considered to be the proper ones in my locale.
But that doesn't solve the problem when getting a string from an external source, of course·


Kind regards

Johnny Rosenberg
 

--
You received this message because you are subscribed to the Google Groups "yad-common" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yad-common+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/yad-common/093cd7e1-9523-4622-baf8-2b86da083ff1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages