m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Cassou <damien@cassou.me>2017-08-29 16:44:25 +0200
committerSvend Sorensen <svend@svends.net>2017-08-29 16:26:20 -0700
commit04bea9e06009c4a073101bed8a251597002d13c3 (patch)
treef995999646ad6dc4290be2a5aeeb5f86b471f667
parent38a419408360a37070600ca9f9102fbd7a703fc7 (diff)
emacs: --run-async: Quote shell arguments
This is important for filenames with special characters such as spaces and parenthesis.
-rw-r--r--contrib/emacs/password-store.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el
index 879eb2f..02ff1b8 100644
--- a/contrib/emacs/password-store.el
+++ b/contrib/emacs/password-store.el
@@ -83,10 +83,11 @@ outputs error message on failure."
"Run pass asynchronously with ARGS.
Nil arguments are ignored."
- (with-editor-async-shell-command
- (mapconcat 'identity
- (cons password-store-executable
- (delq nil args)) " ")))
+ (let ((args (mapcar #'shell-quote-argument args)))
+ (with-editor-async-shell-command
+ (mapconcat 'identity
+ (cons password-store-executable
+ (delq nil args)) " "))))
(defun password-store--run-init (gpg-ids &optional folder)
(apply 'password-store--run "init"