[Remind-Fans] New feature coming in Remind - looking for testers

Dianne Skoll dianne at skoll.ca
Sun Sep 5 09:58:04 EDT 2021


On Sun, 5 Sep 2021 08:38:25 -0500
Tim Chase <remind at tim.thechases.com> wrote:

> Is there documentation on how shell-escaping/quoting should be
> handled?  E.g.

Basically, everything after INCLUDECMD is passed to popen(3), which means
it's handed to the shell.  So looking at your example:

>   SET x "a b"
>   INCLUDECMD printf 'REM %s\n' [x]

Remind will first expand that out to be:

    INCLUDECMD printf 'REM %s\n' a b

and then the C code invokes: popen("printf 'REM %s\n' a b", "r");

and running that in the shell gives:

    $ printf 'REM %s\n' a b
    REM a
    REM b

So the result is two REM commands.

HOWEVER: It doesn't currently work because of a bug. :)  THe \n is not
properly passed along.  So I need to fix that.  Thanks for this
test case.

> Similarly, does one have to watch out for things like "%b" input
> expressions getting replaced by remind before getting sent to the
> script?

No; the %-substitution filter is not invoked because there's no
trigger context for it to work with.  However, [___] *is* done before
we pass the result to the shell.

Regards,

Dianne.


More information about the Remind-fans mailing list