unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David <dpleydel@univ-fcomte.fr>
To: help-gnu-emacs@gnu.org
Subject: changing the shell prompt
Date: Mon, 30 Jul 2007 14:43:24 +0200	[thread overview]
Message-ID: <20070730124324.GA6855@univ-fcomte.fr> (raw)
In-Reply-To: <20070730104622.96BC59E82E0@ufc.univ-fcomte.fr>

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

       reply	other threads:[~2007-07-30 12:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070730104622.96BC59E82E0@ufc.univ-fcomte.fr>
2007-07-30 12:43 ` David [this message]
2007-07-30 13:44   ` changing the shell prompt Peter Dyballa
     [not found] ` <mailman.4123.1185799387.32220.help-gnu-emacs@gnu.org>
2007-07-30 15:08   ` Joel J. Adamson
2007-07-30 15:40     ` Exal de Jesus Garcia Carrillo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070730124324.GA6855@univ-fcomte.fr \
    --to=dpleydel@univ-fcomte.fr \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).