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

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

Re: changing the shell prompt


From: Joel J. Adamson
Subject: Re: changing the shell prompt
Date: Mon, 30 Jul 2007 11:08:51 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Peter made some good suggestions; in addition, you can use *ansi-term*
(M-x ansi-term RET).  This handles my zsh prompt theme just fine.
Also, look into Dired, I have stopped using the shell for a lot of
things since I'm now getting more out of Dired (read: using more of
its functions as a result of learning how to use it).  I spend very
little time in a terminal and much more time in Emacs, which I am of
course happy about.

Of course, if you want to run vi within Emacs... ;)

Joel

David <dpleydel@univ-fcomte.fr> writes:

> My current shell prompt in emacs shows as...
>
> ^[[01;32mdave@dell-1^[[00m:^[[01;34m~^[[00m$
>
> actually, reviewing this email in a terminal I don't see all that
> mess, instead I just see
>
> dave@dell-1:~$
>
> If I change directory the directory path gets included, e.g. in emacs shell...
>
> ^[[01;32mdave@dell-1^[[00m:^[[01;34m~/programmingTutorials/kernighan_n_ritchie^[[00m$
>
> which in the terminal shows as ...
>
> dave@dell-1:~/programmingTutorials/kernighan_n_ritchie$
>
> I know I can change the shell prompt at the command line with 
>
> PS1="$ "
>
> I have three questions.
>
> 1) How can I configure the emacs shell with a simple default shell prompt?
>
> 2) The usefulness of inclussion / exclussion of path in the prompt is
> task and path dependant so is their an easy way to toggle this option on/off?
>
> 3) How can I stop emacs displaying rambling strings of code at the
> shell prompt and to show instead the information that the code is
> suposed to convey (as in the terminal).
>
> 4) If the path is very long and takes up a lot of space on a line can
> I just display the last two or three directories in the path or
> perhaps the first and last directories seperated by ... ?
>
> OK, not quite three, but anyway... ;o)
> peace
> Dave
>
>

-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109

"Today in the Western world only children argue this way,
and only children believe the earth is at rest."
         -Thomas S. Kuhn, _The Copernican Revolution_, pg 44


reply via email to

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