From c408d07c5f8da0473e95bd9ada25b62c4c81b7af Mon Sep 17 00:00:00 2001 From: wangyuanmou Date: Thu, 27 Feb 2025 13:10:41 +0800 Subject: [PATCH] stop completing-read sorting atuin history. --- eshell-atuin.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eshell-atuin.el b/eshell-atuin.el index 004fdc3..3f380a9 100644 --- a/eshell-atuin.el +++ b/eshell-atuin.el @@ -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))))