Eshell: Put history-related parts together
parent
368d2e3d8e
commit
50b97ff67c
|
@ -239,6 +239,19 @@ This should be faster then `seq-uniq'."
|
|||
(setq index (1+ index))))))
|
||||
(add-hook 'eshell-pre-command-hook 'ambrevar/eshell-history-remove-duplicates)
|
||||
|
||||
;; Always save history
|
||||
(add-hook 'eshell-pre-command-hook 'eshell-save-some-history)
|
||||
|
||||
;;; Version and encrypt history.
|
||||
;; TODO: The following makes EPA always prompt for recipients for some reason. Bug?
|
||||
;; (make-directory "~/personal/history/" :parents)
|
||||
;; (setq eshell-history-file-name (expand-file-name "eshell.gpg" "~/personal/history"))
|
||||
;; (defun ambrevar/fix-local-epa-file-encrypt-to ()
|
||||
;; (unless (local-variable-p 'epa-file-encrypt-to (current-buffer))
|
||||
;; (make-local-variable 'epa-file-encrypt-to))
|
||||
;; (setq epa-file-encrypt-to "mail@ambrevar.xyz"))
|
||||
;; (add-hook 'eshell-mode-hook 'ambrevar/fix-local-epa-file-encrypt-to)
|
||||
|
||||
;;; Spawning
|
||||
(defun ambrevar/eshell-or-new-session (&optional arg)
|
||||
"Create an interactive Eshell buffer.
|
||||
|
@ -287,19 +300,6 @@ See `eshell' for the numeric prefix ARG."
|
|||
|
||||
(add-hook 'eshell-pre-command-hook 'ambrevar/eshell-status-record)
|
||||
|
||||
;;; Version and encrypt history.
|
||||
;; TODO: The following makes EPA always prompt for recipients for some reason. Bug?
|
||||
;; (make-directory "~/personal/history/" :parents)
|
||||
;; (setq eshell-history-file-name (expand-file-name "eshell.gpg" "~/personal/history"))
|
||||
;; (defun ambrevar/fix-local-epa-file-encrypt-to ()
|
||||
;; (unless (local-variable-p 'epa-file-encrypt-to (current-buffer))
|
||||
;; (make-local-variable 'epa-file-encrypt-to))
|
||||
;; (setq epa-file-encrypt-to "mail@ambrevar.xyz"))
|
||||
;; (add-hook 'eshell-mode-hook 'ambrevar/fix-local-epa-file-encrypt-to)
|
||||
|
||||
;; Always save history
|
||||
(add-hook 'eshell-pre-command-hook 'eshell-save-some-history)
|
||||
|
||||
;;; Detach
|
||||
(when (require 'package-eshell-detach nil t)
|
||||
(defun ambrevar/eshell-detach-set-keys ()
|
||||
|
|
Loading…
Reference in New Issue