Getting Emacs to respect my default shell + options

后端 未结 2 1789
执笔经年
执笔经年 2021-02-05 15:04

I\'m trying to get my Emacs shell to mimic that of my standard terminal sessions. Basically I would like it to respect the same PATH as well as the command prompt.

So f

2条回答
  •  伪装坚强ぢ
    2021-02-05 15:40

    I don't use zsh but I found this in the zsh FAQ and gave it a try. I got a colorful ls with no funky characters.

    3.10: Why does zsh not work in an Emacs shell mode any more?
    
    Read more: http://www.faqs.org/faqs/unix-faq/shell/zsh/#ixzz0TyTJsHMq
    

    Another method is to put

    #!/bin/sh 
    TERM=emacs exec zsh
    

    into a file ~/bin/eshell, then chmod +x ~/bin/eshell, and tell emacs to use that as the shell by adding

    (setenv "ESHELL" (expand-file-name "~/bin/eshell"))
    

    to ~/.emacs.

提交回复
热议问题