Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs: Default binary to run with M-x ansi-term

Is there a way to have Emacs to prompt by default for a binary of my choice when running M-x ansi-term. It always asks me for /bin/zsh but I have a new installation of zsh in a different path.

Alternatively, it would be great to have Emacs to just run the binary I want when I type M-x my-ansi-term

like image 212
Amelio Vazquez-Reina Avatar asked Oct 01 '12 19:10

Amelio Vazquez-Reina


2 Answers

There are a number of ways to specify the default shell:

  • Set the variable explicit-shell-file-name. For example, in your .emacs: (setq explicit-shell-file-name "/bin/zsh")
  • Set the environment variable ESHELL
  • Set the environment variable SHELL
like image 170
ataylor Avatar answered Nov 14 '22 07:11

ataylor


Alternatively, it would be great to have Emacs to just run the binary I want when I type M-x my-ansi-term

See Remote ssh connection from within Emacs.

like image 29
phils Avatar answered Nov 14 '22 09:11

phils