diff options
Diffstat (limited to 'contrib/emacs/password-store.el')
-rw-r--r-- | contrib/emacs/password-store.el | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el index 1d23090..6561eb1 100644 --- a/contrib/emacs/password-store.el +++ b/contrib/emacs/password-store.el @@ -342,12 +342,31 @@ Separate multiple IDs with spaces." Default PASSWORD-LENGTH is `password-store-password-length'." (interactive (list (password-store--completing-read) - (when current-prefix-arg - (abs (prefix-numeric-value current-prefix-arg))))) - (unless password-length (setq password-length password-store-password-length)) + (and current-prefix-arg + (abs (prefix-numeric-value current-prefix-arg))))) ;; A message with the output of the command is not printed because ;; the output contains the password. - (password-store--run-generate entry password-length t) + (password-store--run-generate + entry + (or password-length password-store-password-length) + 'force) + nil) + +;;;###autoload +(defun password-store-generate-no-symbols (entry &optional password-length) + "Generate a new password without symbols for ENTRY with PASSWORD-LENGTH. + +Default PASSWORD-LENGTH is `password-store-password-length'." + (interactive (list (password-store--completing-read) + (and current-prefix-arg + (abs (prefix-numeric-value current-prefix-arg))))) + + ;; A message with the output of the command is not printed because + ;; the output contains the password. + (password-store--run-generate + entry + (or password-length password-store-password-length) + 'force 'no-symbols) nil) ;;;###autoload |