Re: s6-test -v does not work for variable "!"

From: Songbo Wang <songbo_at_wsb.onl>
Date: Mon, 5 Sep 2022 22:46:22 +0200

On 9/5/22 22:15, alice wrote:
> On Mon Sep 5, 2022 at 10:08 PM CEST, Songbo Wang wrote:
>>
>> #!/usr/bin/execlineb -P
>> export ! 0
>> s6-test -v '\!'
> changing this to
>
> s6-test -v \\\!
>
> works as expected.

Thanks for the reply. It indeed works. But there is one thing I find
counter-intuitive: s6-test expects to see an escaped ! while export
doesn't. For example this exits 1:

#!/usr/bin/execlineb -P
export \\\! 0
s6-test -v \\\!

> quoting is different in execline, i think there was
> more written in some documentation for the specifics, but i think it
> needs to both escape the ! and the \ , so it's three levels of >
> as a bonus, that also works in normal shell (no quoting in both places)
>
-- 
Songbo Wang (汪嵩博)
Received on Mon Sep 05 2022 - 22:46:22 CEST

This archive was generated by hypermail 2.4.0 : Mon Sep 05 2022 - 22:46:43 CEST