summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob L. Kreuze2020-12-04 21:59:09 -0500
committerJakob L. Kreuze2020-12-04 21:59:09 -0500
commit6321baf35f3c106028fffeab599e508d0ab6fc6f (patch)
treec732eacfd88bf82d99cc327de8aa43dc50594b96
parent25636bc58f29c12a38f4ee265cdb715d6b835d8e (diff)
Use proper Bash completions for shell-mode.
-rw-r--r--lisp/shell.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 1b42c19..153b65e 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -203,3 +203,13 @@ Kills the buffer when the shell program quits."
#'shell-kill-buffer-on-quit))
(add-hook 'shell-mode-hook #'add-shell-sentinel)
+
+;; Use proper Bash completion.
+
+(use-package bash-completion
+ :hook
+ (shell-mode . (lambda ()
+ (company-mode)
+ (setq completion-at-point-functions
+ (list #'bash-completion-dynamic-complete))
+ (bind-key "TAB" #'company-complete shell-mode-map))))

© 2015 - 2026 Jakob L. Kreuze