Reputation: 7729
I need function that opens terminal emulator buffer if none exists, in that case it switches to that buffer.
Does anyone know how to do this?
Upvotes: 1
Views: 483
Reputation: 8357
M-x ansi-term is more... Well, Ansi. Allow for nifty pretty prompts (BTW take care of not making tramp trip over your fancy color prompt, this bit me just today when a C-x C-f /sudo::root@localhost:/someRootOnlyFile got stuck)
Upvotes: 0
Reputation: 66059
M-x term does exactly that. Use M-u M-x term if you want to force a new terminal buffer.
From elisp:
(term "/bin/bash")
Upvotes: 7