I have defined some aliases and function snippets int some of my profile files, say, ~/.zprofile
. But Emacs never reads them. There is already a topic about it. However, it's not enough:
source
completely .zshrc
and would emit errors for
compinit
and the like. So in shell-mode
or run command in Emacs(Alt-!) the effect is still different with that in terminal(emulators).
So is there any way to deal with the problem? Thanks.
You can create a file ~/.emacs_zsh (or .emacs_bash, emacs_sh, ...) that shell-mode will use on startup. My .emacs_bash is simply:
. ~/.profile
Just be sure to put a newline at the end of the sourcing line or it won't get executed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With