Default to builtin region completion for shell mode

As for eshell, path completion in shell mode erroneously adds extra spaces when
using ivy.  Since the builtin completion is good enough for shell mode anyway,
let's stick to that.  No bad surprises.
This commit is contained in:
dbo 2021-04-16 15:18:03 +02:00
parent fa2dfed55c
commit 0a317afc29
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 13 additions and 1 deletions

14
init.el
View File

@ -2537,8 +2537,20 @@ With given ARG, display files in `db/important-document-path."
;; We may want to use readline support in bash, don't inhibit this
;; with explicit command line arguments;
;; cf. https://coredumped.dev/2020/01/04/native-shell-completion-in-emacs/
(setq explicit-bash-args
(delete "--noediting" explicit-bash-args))))
(delete "--noediting" explicit-bash-args))
;; When doing completion, ivy seems to add an extra space, much like
;; in the case for eshell. However, here the space seems to come
;; out of nowhere. Since the builtin completion using
;; `completion--in-region' is good enough for the shell mode, let's
;; stick to that.
(add-hook 'shell-mode-hook
(lambda ()
(setq-local completion-in-region-function
#'completion--in-region)))))
(use-package db-eshell
:commands (db/run-or-hide-eshell