User needs to specify $(pwd) to let the command execute as expected.
The above example code is added by Peter in PG14. So I think we need to apply this fix at PG14/master.
I proposed this fix at pgsql-docs@lists.postgresql.org at [1]. But no reply except Craig. So I please allow me to post the patch at Hackers’ mail list again in case the fix is missed.