Funny zenity bug…
Johnny Rosenberg
gurus.knugum at gmail.com
Fri Sep 17 14:37:13 UTC 2010
Den 2010-09-17 00:00:57 skrev Joep L. Blom <jlblom at neuroweave.nl>:
> J wrote:
>> 2010/9/16 Johnny Rosenberg <gurus.knugum at gmail.com>:
>>> Try this (for instance):
>>>
>>> zenity --title "Hello\!" --info --text "This is a funny bug\!"
>>>
>>> Note that the \ is actually displayed after ”Hello”…
>>>
>>> Another strange thing is that ”This is a funny bug\!” is displayed
>>> correctly, that is without the ”\”.
>>>
>>> So I found no way to display a ”!” in the title line of a zenity
>>> dialogue.
>>> Is this a bug or is it just me?
>>>
>>>
>>> If I omit one or both of the ”\” characters, I get the error message
>>> ”bash: !": event not found”
>>
>> Not sure if this is a bug with Zenity in the way it takes the bit
>> after --title and turns it into a window title, or just the weirdness
>> of BASH and quotation marks.
>>
>> If I do it with single quotes, everything works fine:
>>
>> bladernr at klaatu:~$
>>
>> This opens a window that has Hello! in the title bar and This is a
>> funny bug! in the window pane itself...
>>
> I think I found the solution in the man-pages.
> It says" --title=TITLE"
> and "--text=STRING"
>
> Apparently is the command string after"title=" a special kind of string
> which doesn't need the quotes.Try:
> zenity --title Hello\! --info --text "This is a funny bug\!"
> This will work correctly (Hello\! without quotes).
> Joep
>
>
Thank you both. I didn't know that double quotes were handled differently
than singe quotes.
:)
--
Kind regards
Johnny Rosenberg
More information about the ubuntu-users
mailing list