bug-bash
[Top][All Lists]
Advanced

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

Re: PS0 issue with escape sequence


From: Chet Ramey
Subject: Re: PS0 issue with escape sequence
Date: Sat, 17 Sep 2016 13:12:24 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 9/16/16 9:25 PM, Ben wrote:
> Hello,
> 
> using bash-4.4, setting PS0 to '\[\033[1;36m\]started at
> \t\[\033[0m\]\n' makes it output PS0 with a non-printable \x01\x02
> prefix and suffix.

Yes, those are the expansions of the \[ and \] escape sequences.  Since
$PS0 is not being passed to readline for display, you probably don't need
to include those escape sequences at all.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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