summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--contrib/emacs/password-store.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el
index d0c5dcd..4b85995 100644
--- a/contrib/emacs/password-store.el
+++ b/contrib/emacs/password-store.el
@@ -132,6 +132,10 @@ outputs error message on failure."
"Return entry name corresponding to FILE."
(f-no-ext (f-relative file (password-store-dir))))
+(defun password-store--completing-read ()
+ "Read a password entry in the minibuffer, with completion."
+ (completing-read "Password entry: " (password-store-list)))
+
(defun password-store-list (&optional subdir)
"List password entries under SUBDIR."
(unless subdir (setq subdir ""))
@@ -146,7 +150,7 @@ outputs error message on failure."
This edits the password file directly in Emacs, so changes will
need to be commited manually if git is being used."
- (interactive (list (completing-read "Password entry: " (password-store-list))))
+ (interactive (list (password-store--completing-read)))
(find-file (password-store--entry-to-file entry)))
;;;###autoload
@@ -173,7 +177,7 @@ Returns the first line of the password data."
Clear previous password from kill ring. Pointer to kill ring is
stored in `password-store-kill-ring-pointer'. Password is cleared
after `password-store-timeout' seconds."
- (interactive (list (completing-read "Password entry: " (password-store-list))))
+ (interactive (list (password-store--completing-read)))
(let ((password (password-store-get entry)))
(password-store-clear)
(kill-new password)
@@ -205,7 +209,7 @@ Default PASSWORD-LENGTH is `password-store-password-length'."
;;;###autoload
(defun password-store-remove (entry)
"Remove existing password for ENTRY."
- (interactive (list (completing-read "Password entry: " (password-store-list))))
+ (interactive (list (password-store--completing-read)))
(message (password-store--run-remove entry t)))
;;;###autoload
@@ -214,7 +218,7 @@ Default PASSWORD-LENGTH is `password-store-password-length'."
This will only browse URLs that start with http:// or http:// to
avoid sending a password to the browser."
- (interactive (list (completing-read "Password entry: " (password-store-list))))
+ (interactive (list (password-store--completing-read)))
(let ((url (password-store-get entry)))
(if (or (string-prefix-p "http://" url)
(string-prefix-p "https://" url))
b0f88b9ac30120162&follow=1'>Check sneaky paths.Jason A. Donenfeld1-0/+15 2014-04-18Pruning: turns out rmdir does it for us with -p.Jason A. Donenfeld1-9/+3 2014-04-18Abstract remove empty directories into function.Jason A. Donenfeld1-14/+11 2014-04-18Remember to prune empty folders.Jason A. Donenfeld1-0/+8 2014-04-18init: allow deinitializationJason A. Donenfeld2-2/+18 2014-04-18bash-completion: filter dot files from resultsJason A. Donenfeld1-3/+8 2014-04-18reencrypt: remove option, do automaticallyJason A. Donenfeld5-39/+25 2014-04-18reencryption: add to completion filesJason A. Donenfeld3-1/+5 2014-04-18Specify variable gpg.Jason A. Donenfeld1-1/+1 2014-04-18style: don't escape new line on &&Jason A. Donenfeld1-2/+2 2014-04-18reencryption: remove temporary file on failureJason A. Donenfeld1-1/+1 2014-04-18reencryption: only reencrypt files when requiredJason A. Donenfeld2-16/+37 2014-04-17cp: typo as cvJason A. Donenfeld1-1/+1 2014-04-17bash: gpg_id is localJason A. Donenfeld1-0/+1 2014-04-17move/copy: always reencrypt passwords at destinationJason A. Donenfeld5-25/+56 2014-04-17makefile: allow platform files with gnu sedJason A. Donenfeld1-7/+8 2014-04-17mv: Add pass mv/rename supportJason A. Donenfeld5-3/+78 2014-04-17revelation2pass: add plain XML importJavali1-11/+15 2014-04-17platform: add cygwin supportJason A. Donenfeld2-1/+17