]> git.donarmstrong.com Git - lib.git/commitdiff
add function to not require a password to exist before generating it
authorDon Armstrong <don@donarmstrong.com>
Sun, 1 Jan 2023 23:04:19 +0000 (15:04 -0800)
committerDon Armstrong <don@donarmstrong.com>
Sun, 1 Jan 2023 23:04:19 +0000 (15:04 -0800)
emacs_el/configuration/don-configuration.org

index 47207e2b46f11a88e2688fcab4823279b971ce58..527a657701ae943704a8a799e86f0ac25ed5a156 100644 (file)
@@ -1478,10 +1478,16 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
 #+END_SRC
 ** Password Store
 #+BEGIN_SRC emacs-lisp
-  (use-package password-store
-    :ensure t
-    :commands password-store-edit password-store-generate
-    )
+(use-package password-store
+  :ensure t
+  :commands password-store-edit password-store-generate
+  :config
+  (defun dla/password-store-edit (entry)
+    "Edit password for ENTRY which doesn't require it to already exist"
+    (interactive (list (password-store--completing-read nil)))
+    (password-store--run-edit entry))
+  (advice-add 'password-store-edit :override #'dla/password-store-edit)
+  )
 #+END_SRC
 ** CSS mode
 #+BEGIN_SRC emacs-lisp