From 69f4f415e7a9f41b65ee3e0bea47cdcf0c051b54 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Tue, 17 Oct 2023 11:25:33 +0200 Subject: [PATCH] Remove useless `password-store` custom wrappers --- init.el | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/init.el b/init.el index 34fc95f..98a4825 100644 --- a/init.el +++ b/init.el @@ -622,18 +622,8 @@ (advice-add 'eshell-write-history :around #'ccr/wrap-eshell-write-history) - (defun ccr/consult-pass (&optional otp) - "Interactive search password" - (interactive) - (let* ((entries (password-store-list)) - (fun (if otp 'password-store-otp-token-copy 'password-store-copy)) - (prompt (if otp "Password: " "OTP: ")) - (selected (completing-read prompt entries))) - (apply fun `(,selected)))) - (add-to-list 'eshell-modules-list 'eshell-tramp) ;; to use sudo in eshell - ;; :hook ((eshell-load . eat-eshell-mode) - ;; (eshell-load . eat-eshell-visual-command-mode)) + ;; (add-to-list 'eshell-modules-list 'eshell-smart) ;; plan 9 style :bind (("C-c o e" . project-eshell) :map eshell-mode-map ("C-r" . ccr/eshell-history))) ;; i.e. just C-r in semi-char-mode @@ -736,6 +726,18 @@ :hook (prog-mode org-mode) :bind (("C-" . copilot-accept-completion))) +(use-package pass + :config + (require 'password-store-otp) + + :bind (("C-c p p" . password-store-copy) + ("C-c p o" . password-store-otp-token-copy) + ("C-c p e" . password-store-edit) + ("C-c p i" . password-store-insert))) + +(use-package with-editor + :init (shell-command-with-editor-mode +1)) + (provide 'init) ;;; init.el ends here ;; Local Variables: