Skip to content

Commit

Permalink
Merge pull request #10 from alan-w-255/not_sorting_history
Browse files Browse the repository at this point in the history
stop completing-read sorting atuin history.
  • Loading branch information
SqrtMinusOne authored Mar 1, 2025
2 parents 1bffa5e + c408d07 commit 1ac4895
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion eshell-atuin.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
Expand Down

0 comments on commit 1ac4895

Please sign in to comment.