bug-bash
[Top][All Lists]
Advanced

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

Re: Bug in Prompthandling


From: Chet Ramey
Subject: Re: Bug in Prompthandling
Date: Tue, 7 Sep 2004 15:50:04 -0400

> I have encounterd some strange behaviour ob bash3 with multiline prompts.=
> 
> i have=20
> PS1=3D"\\n<------ \\D{%a %e. %b %Y %H:%M:%S} ------> address@hidden:\\# -=
> > "
> 
> The stange thing is that, when I type a longer command the line gets wraped=
> =20
> long befor the end of the Terminal. But only the first wrap, further wraps
> are at the end of the line.=20
> 
> I Think there is a problem with the length calculation of the prompt.=20

Try this:

*** ../bash-3.0/lib/readline/display.c  Thu May 27 22:57:51 2004
--- lib/readline/display.c      Wed Jul 28 13:48:04 2004
***************
*** 352,356 ****
                                       &prompt_last_invisible,
                                       (int *)NULL,
!                                      (int *)NULL);
        c = *t; *t = '\0';
        /* The portion of the prompt string up to and including the
--- 352,356 ----
                                       &prompt_last_invisible,
                                       (int *)NULL,
!                                      &prompt_physical_chars);
        c = *t; *t = '\0';
        /* The portion of the prompt string up to and including the
***************
*** 359,363 ****
                                                   (int *)NULL,
                                                   
&prompt_invis_chars_first_line,
!                                                  &prompt_physical_chars);
        *t = c;
        return (prompt_prefix_length);
--- 359,363 ----
                                                   (int *)NULL,
                                                   
&prompt_invis_chars_first_line,
!                                                  (int *)NULL);
        *t = c;
        return (prompt_prefix_length);


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live...Laugh...Love
Chet Ramey, ITS, CWRU    address@hidden    http://tiswww.tis.cwru.edu/~chet/




reply via email to

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