m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorSvend Sorensen <svend@ciffer.net>2015-09-30 14:48:03 -0700
committerSvend Sorensen <svend@ciffer.net>2015-09-30 14:53:28 -0700
commit5daf632af9b78042531631ce1ab6716a3b678de0 (patch)
treed37dbbc237b216d3fef46d7ce2609138bbb69df0 /contrib
parentb464e33fe86fc6145e351846c382188934a1e815 (diff)
emacs: Guard against "%" in message string
The output of pass may contain "%", which will cause `message` to throw the error: "Not enough arguments for format string". For example, `pass rename foo bar` outputs: [master c33f7a9] Rename foo to bar. 1 file changed, 0 insertions(+), 0 deletions(-) rename foo.gpg => bar.gpg (100%)
Diffstat (limited to 'contrib')
-rw-r--r--contrib/emacs/password-store.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el
index 035cc08..79aa4f3 100644
--- a/contrib/emacs/password-store.el
+++ b/contrib/emacs/password-store.el
@@ -204,14 +204,14 @@ after `password-store-timeout' seconds."
Separate multiple IDs with spaces."
(interactive (list (read-string "GPG ID: ")))
- (message (password-store--run-init (split-string gpg-id))))
+ (message "%s" (password-store--run-init (split-string gpg-id))))
;;;###autoload
(defun password-store-insert (entry password)
"Insert a new ENTRY containing PASSWORD."
(interactive (list (read-string "Password entry: ")
(read-passwd "Password: " t)))
- (message (shell-command-to-string (format "echo %s | %s insert -m -f %s"
+ (message "%s" (shell-command-to-string (format "echo %s | %s insert -m -f %s"
(shell-quote-argument password)
password-store-executable
(shell-quote-argument entry)))))
@@ -234,20 +234,20 @@ Default PASSWORD-LENGTH is `password-store-password-length'."
(defun password-store-remove (entry)
"Remove existing password for ENTRY."
(interactive (list (password-store--completing-read)))
- (message (password-store--run-remove entry t)))
+ (message "%s" (password-store--run-remove entry t)))
;;;###autoload
(defun password-store-rename (entry new-entry)
"Rename ENTRY to NEW-ENTRY."
(interactive (list (password-store--completing-read)
(read-string "Rename entry to: ")))
- (message (password-store--run-rename entry new-entry t)))
+ (message "%s" (password-store--run-rename entry new-entry t)))
;;;###autoload
(defun password-store-version ()
"Show version of pass executable."
(interactive)
- (message (password-store--run-version)))
+ (message "%s" (password-store--run-version)))
;;;###autoload
(defun password-store-url (entry)