[Top][All Lists]

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

Cursor misplaced while iterating history

From: João Abecasis
Subject: Cursor misplaced while iterating history
Date: Fri, 11 Apr 2008 13:03:44 -0500

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: darwin9.2.2
Compiler: /usr/bin/gcc-4.0
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='darwin9.2.2' -DCONF_MACHTYPE='i386-apple-darwin9.2.2'
-DCONF_VENDOR='apple' -DLOCALEDIR='/opt/local/share/locale'
-I./include -I./lib  -I/opt/local/include -O2
uname output: Darwin biochimia.local 9.2.2 Darwin Kernel Version
9.2.2: Tue Mar  4 21:17:34 PST 2008; root:xnu-1228.4.31~1/RELEASE_I386
Machine Type: i386-apple-darwin9.2.2

Bash Version: 3.2
Patch Level: 33
Release Status: release


        When your prompt includes invisible characters, going through history
        entries leaves the shell confused. The cursor gets misplaced, junk is
        left on the screen and it also seems to affect line wrapping for really
        long lines or short screen widths.

        # Start with PS1='$ ', with no invisible characters
        # and define one that does have
        $ PS1='\e[0;address@hidden \W]$i\[\e[m\]'
        address@hidden ~]
        # Type lots of characters
        address@hidden ~]aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
        # Press Up to go through history
        address@hidden ~]aaaaaaaaPS1='\e[0;address@hidden \W]$i\[\e[m\]'
        # Magic! :-)

        I didn't look at the code, but this seems related to the issues in
patches bash32-17 and bash32-27.

reply via email to

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