From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jadamson@partners.org (Joel J. Adamson) Newsgroups: gmane.emacs.help Subject: Re: changing the shell prompt Date: Mon, 30 Jul 2007 11:08:51 -0400 Organization: Harvard University Message-ID: <87myxeorng.fsf@W0053328.mgh.harvard.edu> References: <20070730104622.96BC59E82E0@ufc.univ-fcomte.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1185810038 27751 80.91.229.12 (30 Jul 2007 15:40:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 Jul 2007 15:40:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 30 17:40:30 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IFXMA-000364-NZ for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jul 2007 17:40:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IFXM9-0003nq-W0 for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jul 2007 11:40:26 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!news.germany.com!news.belwue.de!LF.net!quimby.gnus.org!news.ccs.neu.edu!news.dfci.harvard.edu!news.harvard.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 68 Original-NNTP-Posting-Host: w0053328.mgh.harvard.edu Original-X-Trace: plato.harvard.edu 1185808193 11561 132.183.29.121 (30 Jul 2007 15:09:53 GMT) Original-X-Complaints-To: news@plato.harvard.edu Original-NNTP-Posting-Date: Mon, 30 Jul 2007 15:09:53 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:dUaJjgwuGUTJkhqE9qcX7l3Zzsk= Original-Xref: shelby.stanford.edu gnu.emacs.help:150619 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:46198 Archived-At: 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 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