On 12/26/23 21:47, Chet Ramey wrote:
On 12/22/23 2:25 AM, em...@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