Hello Stephen.

Stephen Isard wrote in
 <853-1663355387-506...@sneakemail.com>:
 |On Fri, 16 Sep 2022, Steffen Nurpmeso steffen-at-sdaoden.eu |s-nail| wrote:
 |...
 |> Well ok but the manual includes a fully spelled out example for
 |> on-compose-splice:
 |>
 |>   define ocs_signature {
 |>     read version
 |>     echo '~< ~/.mysig' # '~<! fortune pathtofortunefile'
 |>}
 |>   set on-compose-splice=ocs_signature
 |
 |This works, but I don't actually understand how.  The man page says that 
 |'read' reads a line from standard input and assigns it to the given 
 |variable.  What is standard input going to be in this case?  Is it the 
 |output of echo?[.]

Well the splice hooks run in a dedicated subprocess that can act
"as if it were a user", so you basically have to echo the commands
you want "the user" to run.  The process itself can only run
a restricted set of commands itself (it is a separate process,
say).

 |[.]The given variable is 'version', which is read-only, so 
 |can't get assigned to.  What causes the quoted string to get evaluated?

Oops.  Well i think bitrot hammered into this one.  I'll fix it in
a second, thanks for noticing!  (And as above.)

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Reply via email to