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.

  • 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

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.

  • 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: github.com/jordonbiondo/.emacs.d/blob/master/jordon/… – 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: stackoverflow.com/questions/7733668/… – Jordon Biondo Feb 12 '16 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.