m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/emacs/CHANGELOG.md4
-rw-r--r--contrib/emacs/password-store.el16
2 files changed, 14 insertions, 6 deletions
diff --git a/contrib/emacs/CHANGELOG.md b/contrib/emacs/CHANGELOG.md
index a22659c..7149ef6 100644
--- a/contrib/emacs/CHANGELOG.md
+++ b/contrib/emacs/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 2.0.5
+
+Improve password-store-insert message on success/failure
+
# 2.0.4
* Re add password-store-timeout function to preserve backward
diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el
index 7b20462..c4484d8 100644
--- a/contrib/emacs/password-store.el
+++ b/contrib/emacs/password-store.el
@@ -4,7 +4,7 @@
;; Author: Svend Sorensen <svend@svends.net>
;; Maintainer: Tino Calancha <tino.calancha@gmail.com>
-;; Version: 2.0.4
+;; Version: 2.0.5
;; URL: https://www.passwordstore.org/
;; Package-Requires: ((emacs "25") (f "0.11.0") (s "1.9.0") (with-editor "2.5.11"))
;; Keywords: tools pass password password-store
@@ -266,11 +266,15 @@ Separate multiple IDs with spaces."
"Insert a new ENTRY containing PASSWORD."
(interactive (list (read-string "Password entry: ")
(read-passwd "Password: " t)))
- (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)))))
+ (let* ((command (format "echo %s | %s insert -m -f %s"
+ (shell-quote-argument password)
+ password-store-executable
+ (shell-quote-argument entry)))
+ (ret (process-file-shell-command command)))
+ (if (zerop ret)
+ (message "Successfully inserted entry for %s" entry)
+ (message "Cannot insert entry for %s" entry))
+ nil))
;;;###autoload
(defun password-store-generate (entry &optional password-length)