Hi! First timer here.

For your consideration, patch to add support for no-symbols password
generation to Emacs. This currently is supported, but is not reflected
in an interactive call, so I tended to do this through terminal.

>From e8562339d86455482b27964b97c38984fa945902 Mon Sep 17 00:00:00 2001
From: Aner Zakobar <[email protected]>
Date: Wed, 24 Aug 2022 08:25:48 +0300
Subject: [PATCH] Interactive function to generate w/o symbols

---
 contrib/emacs/password-store.el | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el
index 1d23090..8689db0 100644
--- a/contrib/emacs/password-store.el
+++ b/contrib/emacs/password-store.el
@@ -350,6 +350,20 @@ Default PASSWORD-LENGTH is `password-store-password-length'."
   (password-store--run-generate entry password-length t)
   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)
+                     (when current-prefix-arg
+                       (abs (prefix-numeric-value current-prefix-arg)))))
+  (unless password-length (setq password-length password-store-password-length))
+  ;; 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 t)
+  nil)
+
 ;;;###autoload
 (defun password-store-remove (entry)
   "Remove existing password for ENTRY."
-- 
2.37.0

If I sent this wrong, please tell me!

-Aner


Reply via email to