After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 613999 - Use g_strcompress in notify-send to parse \n from command line
Use g_strcompress in notify-send to parse \n from command line
Status: RESOLVED FIXED
Product: libnotify
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: William Jon McCann
Depends on:
Blocks:
 
 
Reported: 2010-03-26 11:18 UTC by Mike Massonnet
Modified: 2010-04-03 00:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Replace escape characters with g_strcompress in body (728 bytes, patch)
2010-03-26 11:18 UTC, Mike Massonnet
none Details | Review

Description Mike Massonnet 2010-03-26 11:18:21 UTC
Created attachment 157151 [details] [review]
Replace escape characters with g_strcompress in body

It would be cool to allow using \n like characters from the command line with the tool notify-send. Currently it simply displays \n characters, and one has to recover to a sub-command with echo like following:

notify-send summary "`echo -e 'Hello\nWorld\n'`"

The attached patch makes a call to g_strcompress to replace all escaped characters.
Comment 1 William Jon McCann 2010-04-03 00:22:32 UTC
Seems useful.  Pushed a similar patch to master.  You need to free the result of g_strcompress.  Thanks.