bug-bash
[Top][All Lists]
Advanced

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

Re: Multi-line PS1 color disappearance problem


From: Miro Palmu
Subject: Re: Multi-line PS1 color disappearance problem
Date: Fri, 29 Dec 2023 11:28:41 +0200
User-agent: Mozilla Thunderbird

On 12/26/23 21:47, Chet Ramey wrote:
On 12/22/23 2:25 AM, email@miropalmu.cc wrote:

But I did not know that '\e' is valid
ANSI escape sequence prefix.

It's not in the ISO C definition of a character constant or string
literal. It's a common extension that bash and other shells implement --
common enough that it's in the POSIX specification of $'...' quoting, which
will be in the next version of the standard.

https://www.austingroupbugs.net/view.php?id=249


On 12/22/2023 07:21, Greg Wooledge wrote:
> It's not ANSI.  It's bash.  Specifically, bash allows \e as a synonym
> for \033 when expanding PS1, and inside $'...' quotes, and in readline
> key sequence definitions, and in arguments to echo with the -e option.
> It also allows \e in the printf format argument, though I don't see
> this mentioned in the documentation.

Thank you both for the additional information.

--
Miro Palmu




reply via email to

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