How to make Emacs use my .bashrc file?

前端 未结 7 999
轻奢々
轻奢々 2020-12-29 06:00

I need to use my $PATH in Emacs to run some commands. How can I make Emacs use it? I installed Emacs from Ubuntu repositories.

相关标签:
7条回答
  • 2020-12-29 06:31

    A more general solution (to set all variables and aliases, not just PATH) is given in https://stackoverflow.com/a/12229404/1190077 -- the key is to set:

    (setq shell-command-switch "-ic")
    

    which overrides the default "-c" (execute the following command). The addition of "-i" forces the bash shell into interactive mode, which leads to the sourcing of ~/.bashrc.

    0 讨论(0)
提交回复
热议问题