all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* chdir output incorrect for prompt
@ 2006-04-25 14:28 Jim
  2006-04-25 16:01 ` Peter Dyballa
  2006-04-25 22:11 ` Tim X
  0 siblings, 2 replies; 4+ messages in thread
From: Jim @ 2006-04-25 14:28 UTC (permalink / raw)


Hello,

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/...

Thanks in advance for any advice,
Jim 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: chdir output incorrect for prompt
  2006-04-25 14:28 Jim
@ 2006-04-25 16:01 ` Peter Dyballa
  2006-04-25 22:11 ` Tim X
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2006-04-25 16:01 UTC (permalink / raw)
  Cc: help-gnu-emacs


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: chdir output incorrect for prompt
@ 2006-04-25 16:58 James Poli
  0 siblings, 0 replies; 4+ messages in thread
From: James Poli @ 2006-04-25 16:58 UTC (permalink / raw)
  Cc: help-gnu-emacs

 
Peter,

That didn't work but thanks, at least I know what's going on.

Jim
-----Original Message-----
From: Peter_Dyballa@Web.DE [mailto:Peter_Dyballa@Web.DE] 
Sent: Tuesday, April 25, 2006 12:02 PM
To: James Poli
Cc: help-gnu-emacs@gnu.org
Subject: Re: chdir output incorrect for prompt


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: chdir output incorrect for prompt
  2006-04-25 14:28 Jim
  2006-04-25 16:01 ` Peter Dyballa
@ 2006-04-25 22:11 ` Tim X
  1 sibling, 0 replies; 4+ messages in thread
From: Tim X @ 2006-04-25 22:11 UTC (permalink / raw)


"Jim" <James.Poli@sas.com> writes:

> Hello,
>
> 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/...
>
> Thanks in advance for any advice,
> Jim 
>
>

I suspect you are using ANSI escape characters to set the colour of
your prompt. Look for the ansi-color with apropos and you will find
some emacs modes for providing ansi color support within
terminal/shell modes.

Tim

-- 
tcross (at) rapttech dot com dot au

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-04-25 22:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-25 16:58 chdir output incorrect for prompt James Poli
  -- strict thread matches above, loose matches on Subject: below --
2006-04-25 14:28 Jim
2006-04-25 16:01 ` Peter Dyballa
2006-04-25 22:11 ` Tim X

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.