Is there a way to get my emacs to recognize my bash aliases and custom functions when I run a shell command?

前端 未结 5 1335
南笙
南笙 2020-12-02 20:30

In my shell environment I have aliases and custom functions. When I am in an instance of emacs (I always use emacs -nw) and I execute a shell command (M-!

5条回答
  •  半阙折子戏
    2020-12-02 21:15

    Have a read through http://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files

    For non-interactive shells, the only file that is sourced is the value of the BASH_ENV environment variable. You invoke emacs like BASH_ENV=~/.bashrc emacs if emacs will use bash for shell commands -- some programs specifically use "/bin/sh"

提交回复
热议问题