[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is it a bug that \e's dont get escaped in declare -p output
From: |
Eli Schwartz |
Subject: |
Re: is it a bug that \e's dont get escaped in declare -p output |
Date: |
Wed, 17 Mar 2021 13:55:56 -0400 |
On 3/17/21 12:43 PM, Alex fxmbsw7 Ratchev wrote:
> it makes the output no more possible if interpreted by tty
> the \e's get processed by terminal and no more .. just an example where it
> is so:
>
> var=$'1\e[G\e[K2' ; declare -p var
>
> if G was H for other line then it completly messes the terminal up
>
> isnt it better to escape by \e ? ..
Why is it the bash script interpreter's job to escape user-supplied
strings based on how a terminal emulator chooses to *visually* display
the results?
--
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User
OpenPGP_signature
Description: OpenPGP digital signature