I want my eshell
to use ~/.bash_aliases
. But it seems that it doesn't because my usual aliases do not work.
This is my full minimal config using use-package
:
;; === Package setup ===
(require 'package)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
("elpa" . "https://elpa.gnu.org/packages/")))
;; Initializes the package infrastructure
(package-initialize)
;; === use-package ==
;; use-package to simplify the config file
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure 't)
;; ================
;; Terminal / Shell
;; ================
(defun efs/configure-eshell ()
;; Save command history when commands are entered
(add-hook 'eshell-pre-command-hook 'eshell-save-some-history)
;; Disable highlite line mode
(add-hook 'eshell-mode-hook (lambda ()
(setq-local global-hl-line-mode nil)))
;; Truncate buffer for performance
(add-to-list 'eshell-output-filter-functions 'eshell-truncate-buffer)
(setq eshell-history-size 10000
eshell-buffer-maximum-lines 10000
eshell-hist-ignoredups t
eshell-scroll-to-bottom-on-input t))
(use-package eshell-git-prompt)
(use-package eshell
:config
(with-eval-after-load 'esh-opt
(setq eshell-destroy-buffer-when-process-dies t)
(setq eshell-visual-commands '("htop", "bmon", "zsh", "vim", "tmux", "less")))
(eshell-git-prompt-use-theme 'powerline)
;; This 5 lines are from another posting and should solve the problem
;; but they doesn't
(setq explicite-shell-file-name "/bin/bash")
(setq shell-file-name "bash")
(setq explicit-bash.exe-args '("--noediting" "--login" "-ic"))
(setq shell-command-switch "-ic")
(setenv "SHELL" shell-file-name)
:hook (eshell-first-time-mode . efs/configure-eshell)
)
There is a similar question. The answer from there is still in my MWE but does not work.