Use default completion in eshell to mimic standard shell behavior

Using vertico to complete file names feels irritating – I just want to have completion automatically
until a common prefix and will navigate from there with additional input or wildcards.
This commit is contained in:
Daniel Borchmann 2025-09-12 20:19:33 +02:00
parent 0b80424a6d
commit 1da79e1ac4
No known key found for this signature in database
GPG Key ID: 50EA937BF472ADD1

View File

@ -2787,6 +2787,8 @@ Note that this workaround is incomplete, as explained in this comment."
(require 'em-hist)
(require 'em-glob))
(require 'db-eshell)
(setenv "PAGER" "cat")
(add-to-list 'eshell-command-completions-alist
@ -2842,7 +2844,12 @@ Note that this workaround is incomplete, as explained in this comment."
#'(lambda ()
(setq-local pcomplete-termination-string "")))
(require 'db-eshell)))
;; Use default completion functions to allow partial completion of candidates that can
;; then be extended with wildcards and the like. This is what I am used to in shells
;; outside of Emacs.
(add-hook 'eshell-mode-hook
#'(lambda ()
(setq-local completion-in-region-function #'completion--in-region)))))
(use-package em-prompt
:commands (eshell-previous-prompt