use shell-quote-argument to create safe shell command

This commit is contained in:
conao3 2020-02-11 04:38:19 +09:00
parent 1cc39ab352
commit 3a1bb7f503
No known key found for this signature in database
GPG key ID: F4B6A5A98EB01936

View file

@ -145,7 +145,8 @@ Further details can be found in the =style(1)= man page.\n"
(smog-target (buffer-file-name (current-buffer)))) (smog-target (buffer-file-name (current-buffer))))
;; run the shell command. synchronously. ;; run the shell command. synchronously.
(shell-command (shell-command
(format "%s '%s'" smog-command smog-target) smog-output) (mapconcat #'shell-quote-argument (list smog-command smog-target) " ")
smog-output)
;; output the results and add references (in org-mode if it's available) ;; output the results and add references (in org-mode if it's available)
(with-current-buffer smog-output (with-current-buffer smog-output
(goto-char (point-min)) (goto-char (point-min))