From eabd6396c3d18ee0294b191c9fad12a9faaa4ea7 Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 12 Nov 2019 23:29:10 +0000 Subject: osd: fix for arguments with shell escapes (e.g. parens) --- sys/jao-osd.el | 6 ++++-- 1 file 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)))) -- cgit v1.2.3