On macOS, using iTerm2. It looks like

enter image description here

In Emacs For Mac OS X, it looks like

enter image description here

I copied system's ~/.zshrc file to ~/.profile and ~/.bash_profile, but doesn't they read configrations when start emacs?

  • 5
    The question is unclear. "the same as system terminal experience" is undefined. Try to pose a specific how-to question, clearly stating what you're looking for. – Drew Mar 5 at 17:23
  • M-x shell is not a terminal emulator (or rather, it's just a 'dumb' terminal emulator). If you're running something which requires a fully-featured terminal, then you need to use one of those. M-x term is the standard option. – phils Mar 6 at 0:28

One possibility is to use term.el

M-x term

term is a full-featured terminal emulator, within which you can run your OS preferred shell, meaning that terminal escape characters will be handled in input and output generally (including your prompt).

The main complication is that some keybindings conflict with emacs bindings, and so there are two modes of input depending on whether you want keys to behave more like a terminal ("char mode") or more like Emacs ("line mode"). See the manual for more about this:

  • C-hig (emacs)Terminal emulator
  • C-hig (emacs)Term Mode
  • Please improve your answer to explain how it answers the question. – Drew Mar 5 at 17:20

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.