From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Newsgroups: gmane.emacs.help Subject: changing the shell prompt Date: Mon, 30 Jul 2007 14:43:24 +0200 Message-ID: <20070730124324.GA6855@univ-fcomte.fr> References: <20070730104622.96BC59E82E0@ufc.univ-fcomte.fr> Reply-To: dpleydel@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 1185799458 19350 80.91.229.12 (30 Jul 2007 12:44:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 Jul 2007 12:44:18 +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 14:44:12 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 1IFUba-0008Fl-AJ for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jul 2007 14:44:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IFUbZ-0004kn-TZ for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jul 2007 08:44:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IFUaY-0004PY-0p for help-gnu-emacs@gnu.org; Mon, 30 Jul 2007 08:43:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IFUaW-0004Ou-B4 for help-gnu-emacs@gnu.org; Mon, 30 Jul 2007 08:43:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IFUaW-0004Oo-2X for help-gnu-emacs@gnu.org; Mon, 30 Jul 2007 08:43:04 -0400 Original-Received: from ufc.univ-fcomte.fr ([194.57.91.200]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IFUaV-0005lw-Kc for help-gnu-emacs@gnu.org; Mon, 30 Jul 2007 08:43:03 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ufc.univ-fcomte.fr (Postfix) with ESMTP id D72DC9E8BBB for ; Mon, 30 Jul 2007 14:43:00 +0200 (CEST) Original-Received: from ufc.univ-fcomte.fr ([127.0.0.1]) by localhost (ufc.univ-fcomte.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26471-05 for ; Mon, 30 Jul 2007 14:42:59 +0200 (CEST) Original-Received: from ufc204.univ-fcomte.fr (ufc204.univ-fcomte.fr [194.57.91.204]) by ufc.univ-fcomte.fr (Postfix) with ESMTP id 48231109C017 for ; Mon, 30 Jul 2007 14:42:58 +0200 (CEST) Original-Received: from dell-1 (localhost.localdomain [127.0.0.1]) by ufc204.univ-fcomte.fr (Postfix) with SMTP id 37FA83C28E4 for ; Mon, 30 Jul 2007 14:42:57 +0200 (CEST) Original-Received: by dell-1 (sSMTP sendmail emulation); Mon, 30 Jul 2007 14:43:24 +0200 Content-Disposition: inline In-Reply-To: <20070730104622.96BC59E82E0@ufc.univ-fcomte.fr> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: amavisd-new at univ-fcomte.fr X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:46193 Archived-At: 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