Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguishing between :out and :err #14

Open
adamdavislee opened this issue Jan 17, 2023 · 1 comment
Open

Distinguishing between :out and :err #14

adamdavislee opened this issue Jan 17, 2023 · 1 comment

Comments

@adamdavislee
Copy link

adamdavislee commented Jan 17, 2023

Thank you for creating this project, I'm making great progress using it to plumb together some tools that wouldn't normally be able to easily talk to each other.

Unfortunately, I'm having a hard time programmatically distinguishing between normal println output and an exception or error. The only real indication that trenchman provides (as far as I can tell) is the color of the text.

Is it possible to either provide a flag that asks trenchman to output a piece of data with both stdout and stderr (e.g. trench --data -e '('{:out nil, :err "clojure.lang.ExceptionInfo: EOF while reading"}) and/or indicate the type of output via the exit code (e.g. trench -e '('; echo $?… 2).

Regardless, I really appreciate this tool and I'm sure I'll find a way to work around this if improving it is out-of-scope.

Thank you!

@athos
Copy link
Owner

athos commented Jan 29, 2023

Sorry for the late reply, and thank you for your suggestions for improvement!

I found both of the suggestions interesting. Especially I'm willing to implement the latter one, which is a simple and reasonable feature. As for the former one, I think it would take some time to work out the details both at the specification and implementation level (including whether EDN is the best format for this since Trenchman claims to be a language-agnostic nREPL client).

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

No branches or pull requests

2 participants