Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11305

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

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: Ctrl-U doesn't clear read -ep prompt input properly
Date 2015-08-07 18:37 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.7964.1438987057.904.bug-bash@gnu.org> (permalink)
References <0D835E9B9CD07F40A48423F80D3B5A702E90C868@USA7109MB022.na.xerox.net> <55C5007B.2030005@case.edu> <0D835E9B9CD07F40A48423F80D3B5A702E90C9A7@USA7109MB022.na.xerox.net>

Show all headers | View raw


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/

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Ctrl-U doesn't clear read -ep prompt input properly Chet Ramey <chet.ramey@case.edu> - 2015-08-07 18:37 -0400

csiph-web