tail after tab completion in prompt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Here is another case of a complaint about prompt display bugs when the prompt occupies a single line and contains invisible characters. I was able to repeat the original poster's display bugs on cygwin when using rxvt, bash 3.1.14, readline 5.1 compiled with multibyte support using the ncurses 5.5 library. I had to undo the line wraps from the PS1 in the OP's email (use space instead of newline). - Original Message Subject: tail after tab completion in prompt Date: Thu, 30 Mar 2006 14:06:46 +0800 From: William Xue To: cygwin AT cygwin DOT com Hi, Please let me describe the issue for you: After set the PS1 in .bashrc to : - ---8<->8--- PS1="\[\e]2;\w -- [EMAIL PROTECTED]@\H hangsps:\j\d \t\a\]\[\e[31;1m\][\[\e[36;[EMAIL PROTECTED] \[\e[33;1m\]\W\[\e[31;1m\]]\[\e[34;1m\]\[\e[32;1m\]\$ \[\e[37;1m\]" - ---8<->8--- If type "ls /usr/src" twice, it will show "ls /usr/src/usr/src". Is there something wrong in the PS1? And how can I fix this issue? Advance Thanks! - -- William - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFELUiy84KuGfSFAYARAuM1AJ9FoUUXBIwFRlvQkRRoDxcmdjXw/QCfQF2M NnwsM0XBHTwBzOgh8s/7Uy8= =GfX1 -END PGP SIGNATURE- ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Bash-3.1 Official Patch 15
BASH PATCH REPORT = Bash-Release: 3.1 Patch-ID: bash31-015 Bug-Reported-by: Benoit Vila Bug-Reference-ID: <[EMAIL PROTECTED]> Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-02/msg00058.html Bug-Description: A problem with the extended globbing code prevented dots from matching filenames when used in some extended matching patterns. Patch: *** ../bash-3.1-patched/lib/glob/sm_loop.c Sun Oct 16 21:21:04 2005 --- lib/glob/sm_loop.c Mon Feb 27 17:18:43 2006 *** *** 639,643 CHAR *pnext;/* pointer to next sub-pattern */ CHAR *srest;/* pointer to rest of string */ ! int m1, m2; #if DEBUG_MATCHING --- 638,642 CHAR *pnext;/* pointer to next sub-pattern */ CHAR *srest;/* pointer to rest of string */ ! int m1, m2, xflags; /* xflags = flags passed to recursive matches */ #if DEBUG_MATCHING *** *** 645,648 --- 644,648 fprintf(stderr, "extmatch: s = %s; se = %s\n", s, se); fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe); + fprintf(stderr, "extmatch: flags = %d\n", flags); #endif *** *** 678,683 multiple matches of the pattern. */ if (m1) ! m2 = (GMATCH (srest, se, prest, pe, flags) == 0) || ! (s != srest && GMATCH (srest, se, p - 1, pe, flags) == 0); if (m1 && m2) return (0); --- 678,687 multiple matches of the pattern. */ if (m1) ! { ! /* if srest > s, we are not at start of string */ ! xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; ! m2 = (GMATCH (srest, se, prest, pe, xflags) == 0) || ! (s != srest && GMATCH (srest, se, p - 1, pe, xflags) == 0); ! } if (m1 && m2) return (0); *** *** 705,710 for ( ; srest <= se; srest++) { if (GMATCH (s, srest, psub, pnext - 1, flags) == 0 && ! GMATCH (srest, se, prest, pe, flags) == 0) return (0); } --- 709,716 for ( ; srest <= se; srest++) { + /* if srest > s, we are not at start of string */ + xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; if (GMATCH (s, srest, psub, pnext - 1, flags) == 0 && ! GMATCH (srest, se, prest, pe, xflags) == 0) return (0); } *** *** 727,731 break; } ! if (m1 == 0 && GMATCH (srest, se, prest, pe, flags) == 0) return (0); } --- 733,739 break; } ! /* if srest > s, we are not at start of string */ ! xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; ! if (m1 == 0 && GMATCH (srest, se, prest, pe, xflags) == 0) return (0); } *** ../bash-3.1/patchlevel.hWed Jul 20 13:58:20 2005 --- patchlevel.hWed Dec 7 13:48:42 2005 *** *** 26,30 looks for to find the patch level (for the sccs version string). */ ! #define PATCHLEVEL 14 #endif /* _PATCHLEVEL_H_ */ --- 26,30 looks for to find the patch level (for the sccs version string). */ ! #define PATCHLEVEL 15 #endif /* _PATCHLEVEL_H_ */ -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet ) Live Strong. No day but today. Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/ ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Bash-3.1 Official Patch 16
BASH PATCH REPORT = Bash-Release: 3.1 Patch-ID: bash31-016 Bug-Reported-by: Nikita Danilov <[EMAIL PROTECTED]> Bug-Reference-ID: <[EMAIL PROTECTED]> Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-02/msg00064.html Bug-Description: Bash will dump core when attempting to perform globbing in directories with very large numbers of files. Patch: *** ../bash-3.1-patched/lib/glob/glob.c Thu Mar 24 12:42:27 2005 --- lib/glob/glob.c Fri Mar 3 16:54:12 2006 *** *** 361,364 --- 361,365 firstmalloc = 0; + nalloca = 0; /* If PAT is empty, skip the loop, but return one (empty) filename. */ *** *** 547,550 --- 551,556 tmplink = lastlink; } + else + tmplink = 0; free (lastlink->name); lastlink = lastlink->next; *** ../bash-3.1/patchlevel.hWed Jul 20 13:58:20 2005 --- patchlevel.hWed Dec 7 13:48:42 2005 *** *** 26,30 looks for to find the patch level (for the sccs version string). */ ! #define PATCHLEVEL 15 #endif /* _PATCHLEVEL_H_ */ --- 26,30 looks for to find the patch level (for the sccs version string). */ ! #define PATCHLEVEL 16 #endif /* _PATCHLEVEL_H_ */ -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet ) Live Strong. No day but today. Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/ ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Re: echo "enhancement" leads to confused legacy script tools...
> I'm willing to try the CVS versions of autoconf later on, but > can't promise when I'll get to it. I can confirm, though, that > the bug I'm running into only happened when I rebuilt bash and > specified the --enable_xpg_default option. You would have seen the same results had you specified the `-e' option to echo. The behavior is consistent, and will remain so. > It might be "late" to change the requirement to "\0" is required as > the leading for all numeric constants, but as has been stated here, no > application should be relying on "\1" being interpreted as "^A" if it > is desired that it be portable. I don't believe it's "too late", considering that you had to compile bash with a non-default set of configuration options to encounter the problem. However, I like consistency, and I believe that it's important to have -e and the xpg_echo option produce identical output. I don't favor being deliberately incompatible, though, unless there's a compelling reason. This doesn't seem to measure up to that standard. The remaining consideration is whether or not there's a significant body of scripts out there that rely on the current behavior. If there isn't, I would strongly consider the change to require a leading `0' in octal constants. I don't think that \x introducing hex constants is as big a problem (it may not be a problem at all). Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet ) Live Strong. No day but today. Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/ ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Re: tail after tab completion in prompt
Eric Blake wrote: > Here is another case of a complaint about prompt display bugs when the > prompt occupies a single line and contains invisible characters. I was > able to repeat the original poster's display bugs on cygwin when using > rxvt, bash 3.1.14, readline 5.1 compiled with multibyte support using the > ncurses 5.5 library. I had to undo the line wraps from the PS1 in the > OP's email (use space instead of newline). I am unable to duplicate it on Mac OS X or Linux, using Terminal, aterm (0.4.2) and xterm. The OS X version links against ncurses 5.4; the Linux version uses only the termcap library. (Though I have to say that the color change makes the display almost unusable.) This is at least the second cygwin-only display problem, both (if I recall correctly) with that version of ncurses. I don't use cygwin, and have no plans to install it, so I will need the assistance of cygwin developers to track these down. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet ) Live Strong. No day but today. Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/ ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash