summaryrefslogtreecommitdiffhomepage
path: root/sys
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2019-11-12 23:29:10 +0000
committerjao <jao@gnu.org>2019-11-12 23:29:10 +0000
commiteabd6396c3d18ee0294b191c9fad12a9faaa4ea7 (patch)
tree4aab4d682c7d0fc9b3fccfce5840f517e5846aaf /sys
parentdb6ee15a7fcd32f12a8188f085b4a00437bc0053 (diff)
downloadelibs-eabd6396c3d18ee0294b191c9fad12a9faaa4ea7.tar.gz
elibs-eabd6396c3d18ee0294b191c9fad12a9faaa4ea7.tar.bz2
osd: fix for arguments with shell escapes (e.g. parens)
Diffstat (limited to 'sys')
-rw-r--r--sys/jao-osd.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/jao-osd.el b/sys/jao-osd.el
index 260af44..5e70b79 100644
--- a/sys/jao-osd.el
+++ b/sys/jao-osd.el
@@ -53,8 +53,10 @@
(clrhash jao-osd-processes))
(defun jao-notify (msg &optional title icon)
- (let ((args (if title (format "'%s' '%s'" msg title) (format "'%s'" msg)))
- (iflag (if (and (stringp icon) (file-exists-p icon))
+ (let* ((title (shell-quote-argument title))
+ (msg (shell-quote-argument msg))
+ (args (if title (format "%s %s" msg title) msg))
+ (iflag (if (and (stringp icon) (file-exists-p icon))
(format " -i %s" icon)
"")))
(shell-command-to-string (format "notify-send %s%s" args iflag))))