mirror of
https://github.com/SqrtMinusOne/eshell-atuin.git
synced 2025-12-10 12:23:03 +03:00
eshell-atuin: add flag to turn off --duration (#3)
This commit is contained in:
parent
5d206c3192
commit
8415f1a5aa
2 changed files with 14 additions and 1 deletions
|
|
@ -19,6 +19,11 @@ The package isn't yet available anywhere but in this repository. My preferred wa
|
|||
|
||||
Alternatively, clone the repository, add it to the =load-path=, and =require= the package.
|
||||
|
||||
If your version of =atuin= is less than 18, turn off saving command durations:
|
||||
#+begin_src emacs-lisp
|
||||
(setq eshell-atuin-save-duration nil)
|
||||
#+end_src
|
||||
|
||||
* Configuration
|
||||
If your =atuin= binary is located in a place unknown to =executable-find=, set the =atuin-executable= variable.
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,13 @@ will not work.
|
|||
(when (fboundp #'eshell-atuin--history-reset)
|
||||
(eshell-atuin--history-reset))))
|
||||
|
||||
(defcustom eshell-atuin-save-duration t
|
||||
"Whether to save command duration.
|
||||
|
||||
Set to nil if your atuin version is less than 18."
|
||||
:group 'eshell-atuin
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom eshell-atuin-history-format "%c"
|
||||
"How to format history items.
|
||||
|
||||
|
|
@ -154,7 +161,8 @@ of the command."
|
|||
`(,eshell-atuin-executable
|
||||
"history" "end"
|
||||
"--exit" ,(number-to-string eshell-last-command-status)
|
||||
,@(when eshell-atuin--last-command-start
|
||||
,@(when (and eshell-atuin--last-command-start
|
||||
eshell-atuin-save-duration)
|
||||
(list
|
||||
"--duration"
|
||||
(prog1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue