[Top][All Lists]

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

Re: [Help-bash] read -ep and ANSI colour sequences

From: Chet Ramey
Subject: Re: [Help-bash] read -ep and ANSI colour sequences
Date: Wed, 20 Feb 2013 10:24:37 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

On 2/20/13 6:44 AM, Pierre Gaston wrote:

> I mean in PS1 you should surround the terminal codes with \[  \] so
> that readline can calculate the length of the prompt correctly.

read -ep $'\001\033[1m\002ABC\001\033[0m\002' value

will do the right thing on the particular terminal (emulator) the
original poster is using.


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden

reply via email to

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