Reputation: 67
I am using cygwin on windows 7. I have a question regarding the Emacs shell.
Whenever I use the shell inside of the Emacs(M-x shell) It echo pwd directory after prints out the result. I found it very annoying since it distracts me.
e.g.
$ ls
workspace
^[]0;~/cs61bl^G
myname@pc ~/cs61bl
Is there any way to remove these lines?
^[]0;~/cs61bl^G
myname@pc ~/cs61bl
Upvotes: 0
Views: 161
Reputation: 4359
There is this file http://www.emacswiki.org/emacs/setup-cygwin.el that simplifies setup of various packages in Emacs (including shell) to use cygwin. Also try not to use ANSI sequences in your PS1 prompt because Emacs shell mode wouldn't interpret them, something like
export PS1="\h \W\$ "
should do.
Upvotes: 1
Reputation: 27802
When using Emacs, try using the eshell: M-x eshell
. The eshell does not suffer from this problem.
Upvotes: 1
Reputation: 5835
You might be looking for "shell-dirtrack-mode". You can either do an M-x shell-dirtrack-toggle
or (shell-dirtrack-mode 1)
in your init file. Recent emacs versions seem to disable it by default.
Upvotes: 1