help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chdir output incorrect for prompt


From: Peter Dyballa
Subject: Re: chdir output incorrect for prompt
Date: Tue, 25 Apr 2006 18:01:37 +0200


Am 25.04.2006 um 16:28 schrieb Jim:

I have export PS1='($PWD)> ' for my prompt on linux and it works fine in
my shell displaying
the path after a 'cd' command. However in emacs after a 'cd' command the
output has junk
in the path:  ^[]1:Test^G^[]2;Test      ???@cc99^G^[]3:/r/...

Emacs' shell buffer does not expect these ANSI codes. Maybe this code for your .emacs corrects the shell buffer's behaviour:

(add-hook 'shell-mode-hook (lambda ()
;          (make-local-variable 'ansi-color-for-comint-mode)
          (ansi-color-for-comint-mode-on)))

If this fails you can set in ~/.emacs_bash a different value for PS1 in Emacs' shell buffer, one that does not generate ANSI codes.

--
Greetings

  Pete

A lot of us are working harder than we want, at things we don't like to
do. Why? ...In order to afford the sort of existence we don't care to live.
-- Bradford Angier






reply via email to

[Prev in Thread] Current Thread [Next in Thread]