On Wed, May 19 2021, Felipe Contreras wrote:

> On Wed, May 19, 2021 at 12:34 PM Tomi Ollila <tomi.oll...@iki.fi> wrote:
>
>> Haha, as we do _libconfig_sanitize < OUTPUT > OUTPUT.clean
>> reading python script from stdin don't work (perl has __DATA__ ;).
>> (bitten again, I did and tested the change... :D).
>
> That can be fixed with:
>
>   python /dev/fd/3 3<<EOF
>   EOF

According to 

https://unix.stackexchange.com/questions/123602/portability-of-file-descriptor-links

that solution could be portable enough.

Another way still using -c ... I've played to look how it actually looks is
(diff since patch v3)

-        sq = chr(39) # single quote
-        l = l.replace(sq + name, sq + "USER_FULL_NAME", 1)
+        l = l.replace("'\''" + name, "'\''USER_FULL_NAME", 1)

Tested the above. That python /dev/fd/3 3<<EOF is so neat it at least
have to be tested to see how it looks like and behaves... :D

>
> -- 
> Felipe Contreras

Tomi
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org

Reply via email to