local/bin/homeinit, homesync: Init and synchronize Eshell history
parent
537626d63c
commit
f3820091f0
|
@ -276,6 +276,16 @@ 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)
|
||||
|
||||
|
|
|
@ -297,6 +297,12 @@ if [ -x ~/.local/bin/updatedb-local ]; then
|
|||
~/.local/bin/updatedb-local
|
||||
fi
|
||||
|
||||
if [ -f ~/personal/history/eshell.gpg ]; then
|
||||
section "Shell history"
|
||||
mkdir -pv ~/.cache/emacs/eshell/
|
||||
gpg --output ~/.cache/emacs/eshell/history --decrypt ~/personal/history/eshell.gpg
|
||||
fi
|
||||
|
||||
section "Mail"
|
||||
lnn "$SOURCEDIR/mail/mbsyncrc" "$HOME/.mbsyncrc"
|
||||
lnn "$SOURCEDIR/mail/authinfo.gpg" "$HOME/.authinfo.gpg"
|
||||
|
|
|
@ -97,6 +97,12 @@ fi
|
|||
section "$HOME/.package-lists"
|
||||
package-lister
|
||||
|
||||
if [ -f ~/.cache/emacs/eshell/history ]; then
|
||||
section "Shell history"
|
||||
mkdir -pv ~/personal/history/
|
||||
gpg --output ~/personal/history/eshell.gpg --repicient mail@ambrevar.xyz --encrypt ~/.cache/emacs/eshell/history
|
||||
fi
|
||||
|
||||
project_status() {
|
||||
local path=$1
|
||||
local title=$2
|
||||
|
|
Loading…
Reference in New Issue