Eshell: Move fish-completion setup to init-eshell
parent
29bbe92f08
commit
f0c6aeab00
|
@ -148,15 +148,6 @@
|
|||
(nconc package-selected-packages '(fish-completion bash-completion
|
||||
pcomplete-extension pcmpl-args pcmpl-git))
|
||||
(nconc package-selected-packages '(esh-autosuggest))
|
||||
(with-eval-after-load 'bash-completion
|
||||
;; REVIEW: Upstream should set path dynamically.
|
||||
;; https://github.com/szermatt/emacs-bash-completion/issues/33
|
||||
;; Done. Need to update Guix package.
|
||||
(setq bash-completion-prog (executable-find "bash")))
|
||||
(when (and (executable-find "fish")
|
||||
(require 'fish-completion nil t))
|
||||
(setq fish-completion-fallback-on-bash-p t)
|
||||
(global-fish-completion-mode))
|
||||
(with-eval-after-load 'eshell (require 'init-eshell))
|
||||
(autoload 'ambrevar/eshell-or-new-session "eshell")
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ See `eshell' for the numeric prefix ARG."
|
|||
(define-key eshell-mode-map (kbd "C-<return>") 'eshell-detach-attach))
|
||||
(add-hook 'eshell-mode-hook 'ambrevar/eshell-detach-set-keys))
|
||||
|
||||
|
||||
;; Man
|
||||
(when (string= (file-symlink-p (executable-find "man")) "mandoc")
|
||||
;; Some systems like Void Linux use mandoc instead of man and do not know the
|
||||
;; --nj, --nh flags.
|
||||
|
@ -287,4 +287,13 @@ See `eshell' for the numeric prefix ARG."
|
|||
(pcmpl-args-process-file "man" "--" name)))
|
||||
(setq pcmpl-args-man-function 'ambrevar/pcmpl-args-mandoc-man-function))
|
||||
|
||||
;; Completion
|
||||
(when (require 'bash-completion nil t)
|
||||
(when (and (or (executable-find "fish")
|
||||
;; "fish" needs not be in PATH with guix.
|
||||
(executable-find "guix"))
|
||||
(require 'fish-completion nil t))
|
||||
(setq fish-completion-fallback-on-bash-p t)
|
||||
(global-fish-completion-mode)))
|
||||
|
||||
(provide 'init-eshell)
|
||||
|
|
Loading…
Reference in New Issue