Re: "ifthen" for more "dynamic" argv manipulation

2016-05-24 Thread Max Ivanov
Thanks for crystal clear response and for keeping design clean, while not forgetting about practical aspects of real-life use-cases. `-s` switch is what I wanted indeed. Strangely, despite writing in execline more or less for a week, concept that "nothing leaks from a block" never crossed my

Re: "ifthen" for more "dynamic" argv manipulation

2016-05-24 Thread Laurent Bercot
ifthen { s6-test -n ${DISCARD_ENV} } { exec -c } prog1 Ah, the lure of magic scoping. I know. I felt it too. If you want to experiment with it, try with the undocumented -s option to ifthenelse: it's exactly what it does. ifthenelse -s { testprog } { trueprog } { falseprog } args... will

"ifthen" for more "dynamic" argv manipulation

2016-05-24 Thread Max Ivanov
Hi, I'd like to discuss an idea of more dynamic argv manipulation. Since execline heavily relies on chain loading it becomes very important whether block is executed directly or via fork; add to that extreme importance of ENV vars as a way to carry state through chain loading and it becomes