Open DaveBenham opened 4 years ago
It fails because it creates a new instance of cmd
to run the call
, that new instance does not have EB installed, thus @help
does not exist.
Doh! Of course. Thanks.
call echo Works | findstr "^"
works just fine. The pipe is processed in phase 5.3 before CALL in phase 6. In other words CALL never sees the pipe.
I was confusing myself with the fact that call echo Doesn't work ^| findstr "^"
does not work. In this case CALL does see the pipe, and aborts cleanly without error because it is too late to process the pipe.
This will be not fixed? Thus maybe can be closed with that label ?
It can only be fixed indirectly, by automatically loading EB into child CMDs (meaning EB would have to hook CreateProcess
and probably _popen
to inject itself, or use AutoRun).
@adoxa maybe now we can think on auto load of eb in the child process?, now that we are careful of not introduce features that break things.
I don't think there is anything we can do about this, but you cannot pipe the output of a CALLed extension. For example
call @help | more
does not work.It fails because CALL will abort with no error if it sees a pipe on the same line.
But you can pipe the output indirectly by using EB.CMD. The following works just fine: