spring-projects / spring-shell

Spring based shell
http://projects.spring.io/spring-shell/
Apache License 2.0
733 stars 396 forks source link

Provide tty info #985

Closed jvalkeal closed 7 months ago

jvalkeal commented 9 months ago

Never jline versions has a rewritten terminal provider layer which gives more accurate info about presence of a tty. It would be good to extract this info and expose it to relevant places. While it's already possible to cast Terminal to TerminalExt and use its methods, this feels a little awkward.

ShellContext and/or CommandContext are places where this might get used manually. It probably needs a separate issue but having automatic way to convert command output to machine readable(i.e. json) format when pipe is used would be nice.