Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail From: Chet Ramey Newsgroups: gnu.bash.bug Subject: Re: Ctrl-U doesn't clear read -ep prompt input properly Date: Fri, 7 Aug 2015 18:37:23 -0400 Organization: ITS, Case Western Reserve University Lines: 16 Approved: bug-bash@gnu.org Message-ID: References: <0D835E9B9CD07F40A48423F80D3B5A702E90C868@USA7109MB022.na.xerox.net> <55C5007B.2030005@case.edu> <0D835E9B9CD07F40A48423F80D3B5A702E90C9A7@USA7109MB022.na.xerox.net> Reply-To: chet.ramey@case.edu NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: usenet.stanford.edu 1438987057 21564 208.118.235.17 (7 Aug 2015 22:37:37 GMT) X-Complaints-To: action@cs.stanford.edu Cc: chet.ramey@case.edu To: "Nellis, Kenneth" , "bug-bash@gnu.org" Envelope-to: bug-bash@gnu.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: <0D835E9B9CD07F40A48423F80D3B5A702E90C9A7@USA7109MB022.na.xerox.net> X-Junkmail-Whitelist: YES (by domain whitelist at mpv2.tis.cwru.edu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 129.22.105.37 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:11305 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/