From d8ff6bcc1c8bd4efa440c6d91cc10e94b6f8027c Mon Sep 17 00:00:00 2001 From: Svend Sorensen Date: Wed, 7 May 2014 14:42:01 -0700 Subject: Factor out password completing-read function --- contrib/emacs/password-store.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'contrib') 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)) -- cgit v1.2.3-70-g09d2 =1'>util (unfollow)
Commit message (Expand)AuthorFilesLines
2020-05-04Fix for go-imap-uidplus has gone upstream, delete replace.René 'Necoro' Neumann2-7/+3
2020-05-04when tls verification is disabled for the feed, we should also disable this f...René 'Necoro' Neumann1-3/+4
2020-05-03Better handling of embedded images with relative urlsRené 'Necoro' Neumann1-13/+27
2020-05-03Slightly enhance loggingRené 'Necoro' Neumann1-4/+4
2020-05-03Explicit version infoRené 'Necoro' Neumann4-12/+15
2020-05-03--version flagRené 'Necoro' Neumann1-0/+6
2020-05-03Rename from 'client' to 'cl'René 'Necoro' Neumann5-26/+26
2020-05-03Use UIDPLUS Imap extensionRené 'Necoro' Neumann4-11/+33
2020-05-03Fix update in IMAPRené 'Necoro' Neumann1-2/+12
2020-05-03Update support for IMAPRené 'Necoro' Neumann5-17/+205
2020-05-03Option "reupload-if-updated"René 'Necoro' Neumann2-0/+4
2020-05-03Fix typoRené 'Necoro' Neumann1-2/+2
2020-05-02Use uuid library directly and encode to base64.René 'Necoro' Neumann6-10/+16
2020-05-02RestructureRené 'Necoro' Neumann8-95/+111
2020-05-02WIP: Message-IdsRené 'Necoro' Neumann8-5/+40
2020-05-02Typo and mention config example in READMERené 'Necoro' Neumann2-1/+3