Merge pull request #10 from alan-w-255/not_sorting_history
Some checks failed
melpazoid / build (push) Has been cancelled

stop completing-read sorting atuin history.
This commit is contained in:
Pavel Korytov 2025-03-01 11:33:21 +03:00 committed by GitHub
commit 1ac4895529
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -492,7 +492,13 @@ Be sure to have the correct `eshell-prompt-regexp' set up!"
(eshell-atuin--history-update))
(let* ((commands (eshell-atuin--history-collection))
(input (eshell-atuin--get-input))
(compl (completing-read "History: " commands nil nil input))
(completion-table (lambda (string pred action)
(if (eq action 'metadata)
'(metadata (display-sort-function . identity)
(cycle-sort-function . identity))
(complete-with-action
action commands string pred))))
(compl (completing-read "History: " completion-table nil nil input))
(command
(alist-get 'command
(gethash compl eshell-atuin--history-cache-format-index))))