* changing the shell prompt [not found] <20070730104622.96BC59E82E0@ufc.univ-fcomte.fr> @ 2007-07-30 12:43 ` David 2007-07-30 13:44 ` Peter Dyballa [not found] ` <mailman.4123.1185799387.32220.help-gnu-emacs@gnu.org> 1 sibling, 1 reply; 4+ messages in thread From: David @ 2007-07-30 12:43 UTC (permalink / raw) To: help-gnu-emacs 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: changing the shell prompt 2007-07-30 12:43 ` changing the shell prompt David @ 2007-07-30 13:44 ` Peter Dyballa 0 siblings, 0 replies; 4+ messages in thread From: Peter Dyballa @ 2007-07-30 13:44 UTC (permalink / raw) To: dpleydel; +Cc: help-gnu-emacs Am 30.07.2007 um 14:43 schrieb David: > My current shell prompt in emacs shows as... > > ^[[01;32mdave@dell-1^[[00m:^[[01;34m~^[[00m$ In GNU Emacs 22 you can invoke ansi-color-for-comint-mode-on to make *shell* buffer interpret certain ANSI Esc sequences (you can also put into an init file). You can use a file ~/.emacs_<shell interpreter's name> to adjust some settings for *shell* buffer. You would need to use that shell interpreter's syntax. For example, if your login shell is bash and you put PS1="$ " into ~/.emacs_bash than you'll have a much shorter and monochrome prompt ... -- Greetings Pete Increase the size of your bike by at least *five* inches! ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <mailman.4123.1185799387.32220.help-gnu-emacs@gnu.org>]
* Re: changing the shell prompt [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 0 siblings, 1 reply; 4+ messages in thread From: Joel J. Adamson @ 2007-07-30 15:08 UTC (permalink / raw) To: help-gnu-emacs 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: changing the shell prompt 2007-07-30 15:08 ` Joel J. Adamson @ 2007-07-30 15:40 ` Exal de Jesus Garcia Carrillo 0 siblings, 0 replies; 4+ messages in thread From: Exal de Jesus Garcia Carrillo @ 2007-07-30 15:40 UTC (permalink / raw) To: help-gnu-emacs -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 jadamson@partners.org (Joel J. Adamson) writes: [...] > Of course, if you want to run vi within Emacs... ;) lol - -- Spam protection: In my e-mail remplace the words `no-spam' with `exal'. . -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/> iD8DBQFGrgaBoZmxoVJRtGIRAs5iAJ9cgaM9h7U8Ped2KLgvXF+6b09+xACfcVhd 4BQdRikaccpPI0EwpLS+yuI= =+tpn -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-30 15:40 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20070730104622.96BC59E82E0@ufc.univ-fcomte.fr> 2007-07-30 12:43 ` changing the shell prompt David 2007-07-30 13:44 ` 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
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).