Closed whardier closed 2 years ago
| cat
would also mask the return code from the previous command. my 2c, I'm sure there would be a away around this, but I'm not sure if the use case is widespread enough
Good point Drew. You would need to declare the result and eval it through some wrapping. I've attempted to resolve the interactive delays using various techniques and have only had success by setting bash to bail on any error and using | cat
.
Hi @whardier! Thanks for your patience here. I'm investigating the use case here, and was wondering if you could shine some light on how you would benefit from this. I share the main concern with Drew that this might not be widespread enough. However, we could certainly find a middleground where we provide some extra parameters to concat a string to the end of the command.
I realized since my last comment that we do provide the args
parameter already, which can fulfill this request if it is set to | cat
.
Describe Request:
Running tools like pip/poetry in front of
| cat
to set stdout to a standard file descriptor rather than a tty/ptyExamples:
poetry --no-ansi ... | cat
will produce line by line streamed output since stdout is no longer considered a tty.pip ... | cat
will still simplify output and produce easier to view/parse output.Supporting Documentation Links:
clikit and pip both use os.isatty/file.isatty to determine output parameters.