Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Limitation - Cannot pipe the output of CALL @extension #47

Open
DaveBenham opened this issue Jan 17, 2020 · 5 comments
Open

Limitation - Cannot pipe the output of CALL @extension #47

DaveBenham opened this issue Jan 17, 2020 · 5 comments

Comments

@DaveBenham
Copy link
Collaborator

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:

eb @help | more
@adoxa
Copy link
Collaborator

adoxa commented Jan 17, 2020

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.

@DaveBenham
Copy link
Collaborator Author

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.

@carlos-montiers
Copy link
Owner

This will be not fixed? Thus maybe can be closed with that label ?

@adoxa
Copy link
Collaborator

adoxa commented Jan 28, 2020

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).

@carlos-montiers
Copy link
Owner

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants