Dear All,

 one thing I missed for some time now, is the ability to access the
argument passed to test, or any argument on the right hand side.
 I needed it so I made a quick hack, which I attach as a reference.
 It allows to access arg in the the -f $arg easily, e.g.:

[ -f /tmp/myfile ] && { echo "$^ is here"; head -1 "$^"; }

 I would be glad for some feedback. What I have in mind is: make $^ a
special all-purpose variable, something in the lines of perls $_ .
 The name '^' is just a first pick, and the implementation is a proof
of concept more than complete patch, which I would like to make
complete, if you find this of any interest .

cheers,
pg

Attachment: 0001-special-s6-variable.patch
Description: Binary data

Reply via email to