2

I am currently using Zsh in my regular terminal app on my Mac OS X. However, it's heavily customized and colors don't appear properly inside Emacs. So I am thinking, I should probably use shell-mode with a different zshrc or use "Bash" as the default shell in shell-mode.

Is this possible?

Thanks in advance.

Constantine
  • 9,072
  • 1
  • 34
  • 49
  • Could you provide more details about what problems your zsh config actually causes? Descriptions or even screenshots would be helpful. I assume you are using `shell` right now, is that correct? – Jordon Biondo Feb 12 '16 at 16:33

1 Answers1

2

You can explicitly set which shell M-xshell uses by customizing explicit-shell-file-name

If your zsh config causes problems with shell you might try M-x term or ansi-term instead which may play better with your config.

If nothing quite works right, you could always use tmux or screen to flip between emacs and a real shell.

Jordon Biondo
  • 12,332
  • 2
  • 41
  • 62
  • Also, `C-z` is helpful under certain circumstances. – PythonNut Feb 12 '16 at 16:41
  • Thanks! that works. Is it possible to customize further? such as mapping Ctrl-L to clear instead of recenter window? – user3470707 Feb 12 '16 at 16:46
  • There may be better way to do it, but you can write a function that does `(progn (delete-region (point-min) (point-max)) (call-interactively 'comint-send-input)` which could be used to clear the shell. Then you could bind that to C-l. I have such a function here: https://github.com/jordonbiondo/.emacs.d/blob/master/jordon/jordon-fns.el#L197 – Jordon Biondo Feb 12 '16 at 16:51
  • @user3470707 yes, it's possible, map `Ctrl-L` to a defined function in `shell-mode` to clear. – ReneFroger Feb 12 '16 at 18:52
  • See also: http://stackoverflow.com/questions/7733668/command-to-clear-shell-while-using-emacs-shell – Jordon Biondo Feb 12 '16 at 18:54