eshell-atuin: add default values for format-spec (#2)

This commit is contained in:
Pavel Korytov 2024-03-09 13:05:31 +03:00
parent 8415f1a5aa
commit a7ec9718b2

View file

@ -293,13 +293,13 @@ This only works for lines created with the value of the -f flag from
(when (alist-get 'command e) (when (alist-get 'command e)
(setf (alist-get 'formatted-value e) (setf (alist-get 'formatted-value e)
(format-spec eshell-atuin-history-format (format-spec eshell-atuin-history-format
`((?t . ,(alist-get 'time e)) `((?t . ,(alist-get 'time e ""))
(?e . ,(alist-get 'exit e)) (?e . ,(alist-get 'exit e ""))
(?d . ,(alist-get 'duration e)) (?d . ,(alist-get 'duration e ""))
(?c . ,(alist-get 'command e)) (?c . ,(alist-get 'command e ""))
(?i . ,(alist-get 'directory e)) (?i . ,(alist-get 'directory e ""))
(?h . ,(alist-get 'host e)) (?h . ,(alist-get 'host e ""))
(?r . ,(alist-get 'relativetime e)))))) (?r . ,(alist-get 'relativetime e ""))))))
e)) e))
(defun eshell-atuin--add-datum-to-cache (datum) (defun eshell-atuin--add-datum-to-cache (datum)