1

I am new to Spacemacs and eshell.

I try to open eshell via the default shortcut key SPC ' but it opens the bash shell:

[wolfv@localhost ~]
$ message "hello"
bash: message: command not found...

I was expecting the eshell.

However, SPC a s e opens eshell as expected:

~ λ message "hello"
hello

I followed the install instructions on https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Btools/shell#default-shell

My ~/.spacemacs file has the following lines in dotspacemacs-configuration-layers:

 shell
 (shell :variables
        shell-default-height 30
        shell-default-position 'bottom)

and the following lines in defun dotspacemacs/user-config ():

(setq-default dotspacemacs-configuration-layers
          '((shell :variables shell-default-shell 'eshell)))

UPDATE

I found the problem by trouble shooting, but don't know how to fix it.

After restarting Spacemacs, shell-default-shell help says:

shell-default-shell is a variable defined in ‘config.el’. Its value is ‘ansi-term’

I was expecting its value to be ‘eshell’.

Apparently the above mentioned defun dotspacemacs/user-config () entry did not work.

How to make shell-default-shell value be ‘eshell’?

1 Answer 1

2

option 1: (better)
edit .spacemacs:
inside:
(defun dotspacemacs/user-load ())
and:
(setq shell-default-shell 'eshell)

option 2:

You can try go directly into $HOME/.emacs.d/layers/+tools/shell/config.el and edit last points:

(defvar shell-default-shell (if (eq window-system 'w32)
                                'eshell
                              'ansi-term)

into:

'eshell
'eshell)

and after this, add into .gitignore: ./layers/+tools/shell/config.el

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.