Re: rxvt problem: Prompt doesn't look very nice
Brian Dessent wrote: Mikael wrote: Thanks Michael. I am using the CVS-version (dated early febraury) of Emacs. I removed the lines I added to my .bashrc and added what you showed to my .emacs. Now my bash shell inside emacs looks nice (and in color), but it's not perfect. Here it is: ]0;c:/cygwin/home/mikael/coding/Win32/show_styles/src [EMAIL PROTECTED] c:/cygwin/home/mikael/coding/Win32/show_styles/src $ The first line doesn't look so good and it's basically repeating what's in the second line (the path). The first line above of PS1 is an escape sequence that tells the terminal to change the window title to the given string. Emacs apparently does not support that escape sequence, so you'll have to modify your prompt. The Cygwin default is PS1='\[\033]0;[EMAIL PROTECTED] \[\033[33m\w\033[0m\]\n$ ' The part that sets the window title is \033]0;\w\007, so you would want PS1='[EMAIL PROTECTED] \[\033[33m\w\033[0m\]\n$ ' Note that '\[' and '\]' are pseudo-escape sequences that tell bash that the enclosed characters represent an escape sequence that the terminal will interpret and not print. They are used so that bash will know to not include those characters in calculating the cursor position. If you want to change the colors, the number N in \033[Nm is what to modify. See google or http://www.dee.ufcg.edu.br/~rrbrandt/tools/ansi.html for more details. Brian Very nice Brian! Now it looks great! Thanks alot everyone for helping me out...now my list of outstanding issues, related or semi-related, to Cygwin got shorter! / M -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Brian Dessent on 3/25/2005 1:00 AM: The first line above of PS1 is an escape sequence that tells the terminal to change the window title to the given string. Emacs apparently does not support that escape sequence, so you'll have to modify your prompt. The Cygwin default is PS1='\[\033]0;[EMAIL PROTECTED] \[\033[33m\w\033[0m\]\n$ ' And this is an evil default in /etc/profile, because it does not correctly delineate printing vs non-printing characters, and hence messes up bash in computing prompt width. Can we please get base-files updated, to actually use \[ and \] only around non-printing characters? Also, bash supports \e for \033, and \a for \007, and uses \$ to print $ for normal users vs # for root (man bash, search for PROMPTING for other cool escape sequences). I would prefer the cygwin default for bash to be: PS1='\[\e]0;[EMAIL PROTECTED] \[\e[33m\]\w\[\e[0m\]\n\$ ' See google or http://www.dee.ufcg.edu.br/~rrbrandt/tools/ansi.html for more details. That page only covered ANSI sequences, or \e[ It did not cover xterm sequences, or \e]... See http://networking.ringofsaturn.com/Unix/Bash-prompts.php for details on setting the xterm title and icon using \e]0;...\a, \e]1;...\a, and \e]2;...\a. This page also recommends examining $TERM before setting PS1 to use \e]..., since it those escapes work when TERM is cygwin or xterm, but don't work when it is emacs or vt100. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCRBm984KuGfSFAYARAud7AJ9bgnHlTxmLgKIyXq/PRLHZuV89kQCgp3Ro fs9h4RYoIRUes1Ks054C1HE= =ETk0 -END PGP SIGNATURE- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice
Eric Blake wrote: According to Brian Dessent on 3/25/2005 1:00 AM: The first line above of PS1 is an escape sequence that tells the terminal to change the window title to the given string. Emacs apparently does not support that escape sequence, so you'll have to modify your prompt. The Cygwin default is PS1='\[\033]0;[EMAIL PROTECTED] \[\033[33m\w\033[0m\]\n$ ' And this is an evil default in /etc/profile, because it does not correctly delineate printing vs non-printing characters, and hence messes up bash in computing prompt width. Can we please get base-files updated, to actually use \[ and \] only around non-printing characters? Also, bash supports \e for \033, and \a for \007, and uses \$ to print $ for normal users vs # for root (man bash, search for PROMPTING for other cool escape sequences). I would prefer the cygwin default for bash to be: PS1='\[\e]0;[EMAIL PROTECTED] \[\e[33m\]\w\[\e[0m\]\n\$ ' Well, I'm hoping I can find the time to propose a bash update this weekend to the official packages. I finally found a reference to a nice recipe for building a package, as the Cygwin package web page is a little overwhelming. But via the FAQ, there's a pointer to a very concise posting by Charles Wilson on how to do it, and I'm going to try and get to this weekend. If it is under control of the bash package, then I will add this in. But it may not be. See google or http://www.dee.ufcg.edu.br/~rrbrandt/tools/ansi.html for more details. That page only covered ANSI sequences, or \e[ It did not cover xterm sequences, or \e]... See http://networking.ringofsaturn.com/Unix/Bash-prompts.php for details on setting the xterm title and icon using \e]0;...\a, \e]1;...\a, and \e]2;...\a. This page also recommends examining $TERM before setting PS1 to use \e]..., since it those escapes work when TERM is cygwin or xterm, but don't work when it is emacs or vt100. Someone either posted here, or I found a link to, a nice .bashrc. In it, there was: # Setup color variables BLACK=\[\033[0;30m\] DGRAY=\[\033[1;30m\] RED=\[\033[0;31m\] LRED=\[\033[1;31m\] GREEN=\[\033[0;32m\] LGREEN=\[\033[1;32m\] BROWN=\[\033[0;33m\] YELLOW=\[\033[1;33m\] BLUE=\[\033[0;34m\] LBLUE=\[\033[1;34m\] PURPLE=\[\033[0;35m\] LPURPLE=\[\033[1;35m\] CYAN=\[\033[0;36m\] LCYAN=\[\033[1;36m\] LGRAY=\[\033[0;37m\] WHITE=\[\033[1;37m\] NEUTRAL=\[\033[0m\] export BLACK DGRAY RED LRED GREEN LGREEN BROWN YELLOW BLUE export LBLUE PURPLE LPURPLE CYAN LCYAN LGRAY WHITE NEUTRAL which is kinda nice. So that means my PS1 is: export PS1=*** [EMAIL PROTECTED] *** $YELLOW\w$NEUTRAL ***\n\r$NEUTRAL There's a bunch of nice .bashrc examples, as a quick Google scan found. -- Jonathan Arnold (mailto:[EMAIL PROTECTED]) Amazing Developments http://www.buddydog.org I feel like a fugitive from the law of averages. - William H. Mauldin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice
On Fri, 25 Mar 2005, Jonathan Arnold wrote: Eric Blake wrote: And this is an evil default in /etc/profile, [snip] I would prefer the cygwin default for bash to be: PS1='\[\e]0;[EMAIL PROTECTED] \[\e[33m\]\w\[\e[0m\]\n\$ ' Well, I'm hoping I can find the time to propose a bash update this weekend to the official packages. ... If it is under control of the bash package, then I will add this in. But it may not be. [snip] /etc/profile is a user-controlled. The default /etc/profile is in /etc/defaults/etc/profile, and, as cygcheck -f /etc/defaults/etc/profile shows, this is distributed as part of the base-files package. cygcheck -l base-files should list all of the files in base-files. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice [FAQ alert]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jonathan Arnold on 3/25/2005 7:16 AM: I would prefer the cygwin default for bash to be: PS1='\[\e]0;[EMAIL PROTECTED] \[\e[33m\]\w\[\e[0m\]\n\$ ' Well, I'm hoping I can find the time to propose a bash update this weekend to the official packages. I finally found a reference to a nice recipe for building a package, as the Cygwin package web page is a little overwhelming. But via the FAQ, there's a pointer to a very concise posting by Charles Wilson on how to do it, and I'm going to try and get to this weekend. If it is under control of the bash package, then I will add this in. But it may not be. Nope, /etc/profile is under the control of base-files, not bash, so you don't have to worry about it when trying to package bash. And the people on cygwin-apps will help you with suggestions if you need them for packaging bash (thanks for volunteering by the way) - I still remember the learning curve to get diffstat prepared as the first package I maintain. Also, check out the generic build script, it automates several of the steps in Chuck's email as listed in the FAQ (can we get FAQ 88 updated to add a link to the latest version of the GBS?). It is covered in more detail near the end of http://cygwin.com/setup.html. Bash is particularly annoying to build, since Chet Ramey does not publish new tarballs with the 16 official patches against 3.0 already applied, and since he does not make his development repository public. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCRCFS84KuGfSFAYARAoLRAKDNKl+PB06e46Wd7DVZHh0YTLhiOQCgu/zj 5+5FhCAVjNxpydG43hMNnmY= =JXVO -END PGP SIGNATURE- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice [FAQ alert]
On Fri, 25 Mar 2005 07:33:54 -0700, Eric Blake wrote: Also, check out the generic build script, it automates several of the steps in Chuck's email as listed in the FAQ (can we get FAQ 88 updated to add a link to the latest version of the GBS?). It is covered in more detail near the end of http://cygwin.com/setup.html. Updated. http://www.cygwin.com/faq/faq_3.html#SEC88 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice
Mikael wrote: Hello, I just tried rxvt because I wanted to replace the hopeless cmd window. However, the prompt (not sure that is the correct word) doesn't look very nice, here it is copied and pasted: \[\033]0;\w\007 [EMAIL PROTECTED] \[\033[33m\w\033[0m\] $ It looks similar, if not the same, as the result when I tried to set bash as the default shell for a native Windows Emacs cvs version. I guess the \[\033]0;\w\007 [EMAIL PROTECTED] \[\033[33m\w\033[0m\] should display the cwd if it was working correctly, yes? These are ansi escape sequences, which won't work inside emacs, because it isn't an ANSI terminal. As for rxvt, those should work just fine. See this FAQ for a little bit more info and a pointer to the rxvt docs: http://cygwin.com/faq/faq_3.html#SEC65 -- Jonathan Arnold (mailto:[EMAIL PROTECTED]) Amazing Developments http://www.buddydog.org I feel like a fugitive from the law of averages. - William H. Mauldin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice
Jonathan Arnold wrote: Mikael wrote: Hello, I just tried rxvt because I wanted to replace the hopeless cmd window. However, the prompt (not sure that is the correct word) doesn't look very nice, here it is copied and pasted: \[\033]0;\w\007 [EMAIL PROTECTED] \[\033[33m\w\033[0m\] $ It looks similar, if not the same, as the result when I tried to set bash as the default shell for a native Windows Emacs cvs version. I guess the \[\033]0;\w\007 [EMAIL PROTECTED] \[\033[33m\w\033[0m\] should display the cwd if it was working correctly, yes? These are ansi escape sequences, which won't work inside emacs, because it isn't an ANSI terminal. I really really hope that someone makes it work some day (I wish I had the knowledge to contribute), because it's on my top-three list of outstanding issues I have with Cygwin (admittedly indirectly in this case because I use a native Emacs version). My other issues mostly revolve around being unable to build certain program ootb on cygwin. As for rxvt, those should work just fine. See this FAQ for a little bit more info and a pointer to the rxvt docs: http://cygwin.com/faq/faq_3.html#SEC65 -- Thanks for the link, now it looks much better. Now I just need to find a font I like. Thanks for replying so quickly Jonathan with such excellent help, it helps make this world a kinder place. Jonathan Arnold (mailto:jdarnold at buddydog dot org) Amazing Developments http://www.buddydog.org I feel like a fugitive from the law of averages. - William H. Mauldin / M PS. I edited your signature because I was afraid to quote raw email addresses when replying. Please forgive me. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Re: rxvt problem: Prompt doesn't look very nice
Thanks for the link, now it looks much better. Now I just need to find a font I like. Thanks for replying so quickly Jonathan with such excellent help, it helps make this world a kinder place. Jonathan Arnold (mailto:jdarnold at buddydog dot org) Amazing Developments http://www.buddydog.org I feel like a fugitive from the law of averages. - William H. Mauldin / M PS. I edited your signature because I was afraid to quote raw email addresses when replying. Please forgive me. i use -fn lucida console-13-bold -- works pretty well reid -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice
Mikael wrote: Jonathan Arnold wrote: Mikael wrote: It looks similar, if not the same, as the result when I tried to set bash as the default shell for a native Windows Emacs cvs version. I guess the \[\033]0;\w\007 [EMAIL PROTECTED] \[\033[33m\w\033[0m\] should display the cwd if it was working correctly, yes? These are ansi escape sequences, which won't work inside emacs, because it isn't an ANSI terminal. I really really hope that someone makes it work some day (I wish I had the knowledge to contribute), because it's on my top-three list of outstanding Well, you aren't going to get a colored prompt from within Emacs, but you can set it up in your .bashrc so it is usable. I have this code in my .bashrc: if [ $EMACS == t ] then export PS1=*** \@ *** \w ***\n\r else export PS1=*** [EMAIL PROTECTED] *** $YELLOW\w$WHITE ***\n\r$NEUTRAL fi So while it isn't colored, it gives me the info anyway. Thanks for the link, now it looks much better. Now I just need to find a font I like. Thanks for replying so quickly Jonathan with such excellent I checked the man page just sent out, and noticed the Shift-Keyboard-+ and - shortcut that steps through the various possible fonts. I'm not sure how you find out *what* font is selected, but it seems to work. -- Jonathan Arnold (mailto:[EMAIL PROTECTED]) Amazing Developments http://www.buddydog.org I feel like a fugitive from the law of averages. - William H. Mauldin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice
Jonathan Arnold wrote: Mikael wrote: Jonathan Arnold wrote: Mikael wrote: It looks similar, if not the same, as the result when I tried to set bash as the default shell for a native Windows Emacs cvs version. I guess the \[\033]0;\w\007 [EMAIL PROTECTED] \[\033[33m\w\033[0m\] should display the cwd if it was working correctly, yes? These are ansi escape sequences, which won't work inside emacs, because it isn't an ANSI terminal. I really really hope that someone makes it work some day (I wish I had the knowledge to contribute), because it's on my top-three list of outstanding Well, you aren't going to get a colored prompt from within Emacs, but you can set it up in your .bashrc so it is usable. I have this code in my .bashrc: if [ $EMACS == t ] then export PS1=*** \@ *** \w ***\n\r else export PS1=*** [EMAIL PROTECTED] *** $YELLOW\w$WHITE ***\n\r$NEUTRAL fi So while it isn't colored, it gives me the info anyway. Thanks, I will try that. Colors would be nice but I can live without them from inside emacs, I just want the path displayed correctly. Thanks for the link, now it looks much better. Now I just need to find a font I like. Thanks for replying so quickly Jonathan with such excellent I checked the man page just sent out, and noticed the Shift-Keyboard-+ and - shortcut that steps through the various possible fonts. I'm not sure how you find out *what* font is selected, but it seems to work. -- Jonathan Arnold (mailto:jdarnold at buddydog dot org) Amazing Developments http://www.buddydog.org I feel like a fugitive from the law of averages. - William H. Mauldin / M -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice
On Thu, 24 Mar 2005 14:53:45 -0500, Jonathan Arnold [EMAIL PROTECTED] wrote: Well, you aren't going to get a colored prompt from within Emacs, but you can set it up in your .bashrc so it is usable. I have this code in my .bashrc: if [ $EMACS == t ] then export PS1=*** \@ *** \w ***\n\r else export PS1=*** [EMAIL PROTECTED] *** $YELLOW\w$WHITE ***\n\r$NEUTRAL fi So while it isn't colored, it gives me the info anyway. I do the terminal checking the other way, because many terminals can not display colors. Like this: if [ $TERM = xterm -o\ $TERM = cygwin ] ; then (set PS with colors) else (set PS with NO colors) fi Ehud. -- Ehud Karni Tel: +972-3-7966-561 /\ Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign Insurance agencies (USA) voice mail and X Against HTML Mail http://www.mvs.co.il FAX: 1-815-5509341 / \ GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice
Mikael writes: Jonathan Arnold wrote: Mikael wrote: Hello, I just tried rxvt because I wanted to replace the hopeless cmd window. However, the prompt (not sure that is the correct word) doesn't look very nice, here it is copied and pasted: \[\033]0;\w\007 \033[32m\]\u at \h \[\033[33m\w\033[0m\] $ It looks similar, if not the same, as the result when I tried to set bash as the default shell for a native Windows Emacs cvs version. I guess the \[\033]0;\w\007 \033[32m\]\u at \h \[\033[33m\w\033[0m\] should display the cwd if it was working correctly, yes? These are ansi escape sequences, which won't work inside emacs, because it isn't an ANSI terminal. I really really hope that someone makes it work some day (I wish I had the knowledge to contribute), because it's on my top-three list of outstanding issues I have with Cygwin (admittedly indirectly in this case because I use a native Emacs version). My other issues mostly revolve around being unable to build certain program ootb on cygwin. If you are using Emacs =21.1; try the following elisp (add-hook 'comint-mode-hook 'ansi-color-for-comint-mode-on) You should see the colors properly in emacs. (Essentially Emacs interprets the escape sequences and emulates them with the appropriate emacs features.) As for rxvt, those should work just fine. See this FAQ for a little bit more info and a pointer to the rxvt docs: http://cygwin.com/faq/faq_3.html#SEC65 -- Thanks for the link, now it looks much better. Now I just need to find a font I like. Thanks for replying so quickly Jonathan with such excellent help, it helps make this world a kinder place. Are you sure you are using `bash' as your shell? The ability to use visible escape sequences for colors et al. rather than the actual control characters in the prompt variables is a `bash' feature. I see what you are seeing when I use `sh' or `ksh' and have the `bash'-style prompt settings. The reason I think this is that `bash' would not write out the \[ and \] sequences as part of the prompt. These are fenceposts used to identify portions of the prompt string that take up no physical space on the output line. This permits `bash' to calculate how long the prompt string actually is so that wrapping and editting look correct. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice
Michael Mauger wrote: If you are using Emacs =21.1; try the following elisp (add-hook 'comint-mode-hook 'ansi-color-for-comint-mode-on) You should see the colors properly in emacs. (Essentially Emacs interprets the escape sequences and emulates them with the appropriate emacs features.) How silly of me, to imagine there was something that couldn't be done in Emacs:-) Duly noted and entered into my .emacs. Thanks! -- Jonathan Arnold (mailto:[EMAIL PROTECTED]) Amazing Developments http://www.buddydog.org I feel like a fugitive from the law of averages. - William H. Mauldin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice
Michael Mauger wrote: Mikael writes: Jonathan Arnold wrote: Mikael wrote: Hello, I just tried rxvt because I wanted to replace the hopeless cmd window. However, the prompt (not sure that is the correct word) doesn't look very nice, here it is copied and pasted: \[\033]0;\w\007 \033[32m\]\u at \h \[\033[33m\w\033[0m\] $ It looks similar, if not the same, as the result when I tried to set bash as the default shell for a native Windows Emacs cvs version. I guess the \[\033]0;\w\007 \033[32m\]\u at \h \[\033[33m\w\033[0m\] should display the cwd if it was working correctly, yes? These are ansi escape sequences, which won't work inside emacs, because it isn't an ANSI terminal. I really really hope that someone makes it work some day (I wish I had the knowledge to contribute), because it's on my top-three list of outstanding issues I have with Cygwin (admittedly indirectly in this case because I use a native Emacs version). My other issues mostly revolve around being unable to build certain program ootb on cygwin. If you are using Emacs =21.1; try the following elisp (add-hook 'comint-mode-hook 'ansi-color-for-comint-mode-on) You should see the colors properly in emacs. (Essentially Emacs interprets the escape sequences and emulates them with the appropriate emacs features.) Thanks Michael. I am using the CVS-version (dated early febraury) of Emacs. I removed the lines I added to my .bashrc and added what you showed to my .emacs. Now my bash shell inside emacs looks nice (and in color), but it's not perfect. Here it is: ]0;c:/cygwin/home/mikael/coding/Win32/show_styles/src [EMAIL PROTECTED] c:/cygwin/home/mikael/coding/Win32/show_styles/src $ The first line doesn't look so good and it's basically repeating what's in the second line (the path). How do I make it perfect? As for rxvt, those should work just fine. See this FAQ for a little bit more info and a pointer to the rxvt docs: http://cygwin.com/faq/faq_3.html#SEC65 -- Thanks for the link, now it looks much better. Now I just need to find a font I like. Thanks for replying so quickly Jonathan with such excellent help, it helps make this world a kinder place. Are you sure you are using `bash' as your shell? The ability to use visible escape sequences for colors et al. rather than the actual control characters in the prompt variables is a `bash' feature. I see what you are seeing when I use `sh' or `ksh' and have the `bash'-style prompt settings. The reason I think this is that `bash' would not write out the \[ and \] sequences as part of the prompt. These are fenceposts used to identify portions of the prompt string that take up no physical space on the output line. This permits `bash' to calculate how long the prompt string actually is so that wrapping and editting look correct. / M -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt problem: Prompt doesn't look very nice
Mikael wrote: Thanks Michael. I am using the CVS-version (dated early febraury) of Emacs. I removed the lines I added to my .bashrc and added what you showed to my .emacs. Now my bash shell inside emacs looks nice (and in color), but it's not perfect. Here it is: ]0;c:/cygwin/home/mikael/coding/Win32/show_styles/src [EMAIL PROTECTED] c:/cygwin/home/mikael/coding/Win32/show_styles/src $ The first line doesn't look so good and it's basically repeating what's in the second line (the path). The first line above of PS1 is an escape sequence that tells the terminal to change the window title to the given string. Emacs apparently does not support that escape sequence, so you'll have to modify your prompt. The Cygwin default is PS1='\[\033]0;[EMAIL PROTECTED] \[\033[33m\w\033[0m\]\n$ ' The part that sets the window title is \033]0;\w\007, so you would want PS1='[EMAIL PROTECTED] \[\033[33m\w\033[0m\]\n$ ' Note that '\[' and '\]' are pseudo-escape sequences that tell bash that the enclosed characters represent an escape sequence that the terminal will interpret and not print. They are used so that bash will know to not include those characters in calculating the cursor position. If you want to change the colors, the number N in \033[Nm is what to modify. See google or http://www.dee.ufcg.edu.br/~rrbrandt/tools/ansi.html for more details. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/