bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash 3.0 wraps command-line incorrectly with multiline PS1


From: haroon . rafique
Subject: bash 3.0 wraps command-line incorrectly with multiline PS1
Date: Tue, 3 Aug 2004 12:39:02 -0400 (EDT)

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib   -march=pentium4 -O3 -pipe -s 
-fomit-frame-pointer -fforce-addr -falign-functions=4 -fprefetch-loop-arrays 
-ffast-math
uname output: Linux haroon.sis.utoronto.ca 2.6.7-ck5 #2 SMP Tue Jul 27 11:12:39 
EDT 2004 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz GenuineIntel GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 3.0
Patch Level: 0
Release Status: release

Description:
        This used to work fine in bash-2.05b. Now in bash-3.0, the command
    line gets wrapped too early if I have a multi-line PS1. E.g., my PS1
    is as follows:

~ 52MB in 151 file(s) 124 subdir(s)
address@hidden: pts/289: -> 

    If I try and write a long command it will wrap at the wrong
    character, e.g.,

~ 52MB in 151 file(s) 124 subdir(s)
address@hidden: pts/289: -> ls -al /home/haroon/tomcat/sis/src/ca/uto
ronto/
    
    See how it wrapped at uto even though there is some space available.
    My guess is that the wrap logic was looking at line 1 of my PS1 to
    calculate where to wrap. It should have instead looked at the line 2
    of PS1 (as was the case in bash-2.05b)

Repeat-By:
        export export PS1='\nSome thing to type here so that it is bigger than 
next line\nSomething smaller here> '

    Now try to type a really long command like:
        ls -al /home/haroon/tomcat/sis/src/ca/utoronto/blah/blah
    and see it wrap at the wrong spot.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]