Summary: | weird line wrapping with bash 3.0x with two-line prompt | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Botykai Zsolt <zsolt.botykai> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED INVALID | ||
Severity: | minor | CC: | ka0ttic |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Botykai Zsolt
2004-12-07 21:48:41 UTC
I'm glad you submitted this bug, because I've been meaning too. This bug has partially been fixed (see bug 65410), but it seems to only work if the color escapes are formatted a certain way.. For example, I am successfully running a multi line prompt in bash3 by using escape sequences like "\[\033[01;32m\]". It doesn't like your escape sequences nor ones like "\033[01;32m" however. Maybe it's overcompensating because of missing chars it thinks are there and thus going to the next line before 80 chars? base-system, wasn't sure whether to close this and reopen 65410 or keep it as is, so I'll let you guys decide. Thanks Aaron for this fast answer, I tried to apply that patch, as I found it in bugzilla, but I wasn' successed - maybe I'm not that good at patching, 'cause I'm kinda' noob. Now trying to figure out which escape sequences to use... if you guys re-emerge bash does the bug 'go away' ? Re-emerged bash (yesterday), and from the same xterm I issued: 'bash' && set my prompt but still bed. Botykai, didnt you read the comments of the other bug? According to agriffis, the patch was added for bash-3.0-r6 quite a while ago. Sorry, then I didn't figured it out from the ebuild (and the 'files' dir' of the ebuild (there wern't any patch named like in 65410). So I rebuilt again my bash-3.0-r7 which should have been patched, logged out, logged in, and still no good. IMHO not because I tried the reproduce steps http://bugs.gentoo.org/show_bug.cgi?id=69407 with LANG=hu_HU.UTF-8 and it did work for me with characters like this: echo "ab IMHO not because I tried the reproduce steps http://bugs.gentoo.org/show_bug.cgi?id=69407 with LANG=hu_HU.UTF-8 and it did work for me with characters like this: echo "ab÷פß$˘°ˇ˙őűúíc" ab÷פß$˘°ˇ˙őűúíc In your report, you say: export PS1="[\e[31m\$(pwd)\e[0m :: \e[32m\@\e[0m :: e[33m\l\e[0m]\n[\e[32m\u\e[0m@\e[34m\H\e[0m] \$ " This is incorrect. The escape sequences that don't move the cursor need to be marked with \[ and \], as explained in the bash man-page under PROMPTING. If you don't do that, then bash (as you've found) gets confused regarding the width of the terminal. This appears to be pilot error. |