feat: add gpg-decrypt-buffer
function
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
8e3e9f7f55
commit
25ebb11f07
1 changed files with 11 additions and 0 deletions
|
@ -70,5 +70,16 @@
|
|||
(redraw-display)
|
||||
(term gpg-encrypt-command))))
|
||||
|
||||
(defun gpg-decrypt-buffer (&optional filename)
|
||||
"Decrypt the current file FILENAME with GPG."
|
||||
(interactive)
|
||||
|
||||
(let* ((filename (or filename
|
||||
buffer-file-name
|
||||
(read-string "Decrypt file: ")))
|
||||
(buf (get-buffer-create "*gpg-decrypt*")))
|
||||
(switch-to-buffer buf)
|
||||
(insert (shell-command-to-string (concat "gpg --decrypt " filename)))))
|
||||
|
||||
(provide 'gpgconfig)
|
||||
;;; gpgconfig.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue