On 2006-12-22 08:40:21 -0600, dearvoid <[EMAIL PROTECTED]> said:

On 12/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

On 2006-12-22 04:34:22 -0600, dearvoid <[EMAIL PROTECTED]> said:

I will need to "close" each prompt line with an end-hilight
code, do the \n, then begin the next line with a start-hilight
code, such as:
PS1='\[\e[0;7m\]\h[\w]\[\e[0m\]\n\[\e[0;7m\]\u\$\[\e[0m\] '
.                     ^^^^^^^^^  ^^^^^^^^^^^

But do I put \[ \] around a \n (or include it there-in) ?


Bash knows exactly what \n means in PS1 and can handle it well so we need
not put \[ \] around \n .

BTW: I also use MacOSX on my iBook G4.

It started sinking in that \n does affect the cursor position so it
should not be put in the brackets.  'Twas late and the bash man-page
just wasn't hitting any neurons in my old grey matter.  Thank you for
clarifying this, now I see what they mean.

Things do "feel" better now.  I've renamed Apple's /bin/bash and /bin/sh
as a backup, then put symlinks to /usr/local/bin/bash, in effect this
OSX box is now up on the latest & greatest bash for all uses.  :)  oh
I've already tested it in single-user mode this way, works fine.  Let's
hope Apple uses this and other updated projects in Leopard, I wonder if
it's too late to open bugreports requesting such, but I'd be running
blind since I can't afford a $paid$ ADC membership to see what they're
actually doing in the meantime.

Thanks again.


--





_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to