bug-bash
[Top][All Lists]
Advanced

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

Re: Ctrl-U doesn't clear read -ep prompt input properly


From: Chet Ramey
Subject: Re: Ctrl-U doesn't clear read -ep prompt input properly
Date: Fri, 7 Aug 2015 18:37:23 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 8/7/15 3:21 PM, Nellis, Kenneth wrote:

>> Since you're adding the non-visible characters to the prompt, you can
>> try bracketing them with \001 and \002, but you have to do that yourself.
>>
> Hey, that works! Thanx! Didn't see it in the documentation. My bad?

It's in the readline documentation.  The \[ and \] prompt string escapes
are translated into RL_PROMPT_START_IGNORE (\001) and RL_PROMPT_END_IGNORE
(\002) as part of prompt expansion.

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



reply via email to

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