diff options
author | jao <jao@gnu.org> | 2019-11-12 23:29:10 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2019-11-12 23:29:10 +0000 |
commit | eabd6396c3d18ee0294b191c9fad12a9faaa4ea7 (patch) | |
tree | 4aab4d682c7d0fc9b3fccfce5840f517e5846aaf /sys | |
parent | db6ee15a7fcd32f12a8188f085b4a00437bc0053 (diff) | |
download | elibs-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.el | 6 |
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)))) |