[x] Print output during execution of the bash program, not after
[x] Allow the bash program to prompt for and receive input
All I did was run the program normally, outside of a subshell. Then it can just do its thing as it would without fenv. Then the only trick is how to pick up the changes to env?
The only way I can think of is to dump env to a file from bash -c, then read the file back in from fenv. This is working for me in my tests. If you want me to include a test I'll add it--I didn't see any so I didn't want to pollute the pull request.
I briefly thought about using a fifo to avoid a possible disk read/write but then bash -c and fenv have to run in parallel so that seems too fancy for this situation.
Features required:
All I did was run the program normally, outside of a subshell. Then it can just do its thing as it would without fenv. Then the only trick is how to pick up the changes to
env
?The only way I can think of is to dump env to a file from
bash -c
, then read the file back in from fenv. This is working for me in my tests. If you want me to include a test I'll add it--I didn't see any so I didn't want to pollute the pull request.I briefly thought about using a fifo to avoid a possible disk read/write but then
bash -c
and fenv have to run in parallel so that seems too fancy for this situation.I'm very open to suggestions/criticism/berating.