[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issues with multi-line prompts and width of shells.
From: |
Chet Ramey |
Subject: |
Re: Issues with multi-line prompts and width of shells. |
Date: |
Tue, 7 Sep 2004 15:47:10 -0400 |
> Machine Type: i686-pc-linux-gnu
>
> Bash Version: 3.0
> Patch Level: 0
> Release Status: release
>
> Description:
> It seems that when using multiline prompts in Bash 3.0 there is some sort of
> issue with the terminal starting to wrap characters earlier, the longer the
> previous lines of prompt the less width of terminal is available to type
> commands in.
>
> Repeat-By:
> export PS1='123456789 123456789 123456789 123456789 123456789 123456789\n\$ '
>
> Then just type, you should see it starting to wrap at about 20 cols in.
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 chet@po.cwru.edu http://tiswww.tis.cwru.edu/~chet/