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


Groups > gnu.bash.bug > #11857 > unrolled thread

Re: ${var@P} expansion includes 0x01 and 0x02

Started byChet Ramey <chet.ramey@case.edu>
First post2015-11-10 08:56 -0500
Last post2015-11-10 08:56 -0500
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: ${var@P} expansion includes 0x01 and 0x02 Chet Ramey <chet.ramey@case.edu> - 2015-11-10 08:56 -0500

#11857 — Re: ${var@P} expansion includes 0x01 and 0x02

FromChet Ramey <chet.ramey@case.edu>
Date2015-11-10 08:56 -0500
SubjectRe: ${var@P} expansion includes 0x01 and 0x02
Message-ID<mailman.2059.1447163783.7904.bug-bash@gnu.org>
On 11/9/15 7:53 PM, Dennis Williamson wrote:

> 
> With editing off, I find that I must delimit variables with braces. Without
> the braces, only the second escape sequence is output. The \] isn't
> terminating the variable name when editing is off.

When line editing isn't enabled, the \[ and \] escapes have no meaning,
so they're removed.  In the example you give, removing them results in
the variable name including `Hello'.  If this is a problem for your prompt,
you should delimit variable names with braces.

-- 
``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/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web