This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Shell 3.3.3!spring-doc.cn

Shell Context

The ShellContext interface gives access to a currently running shell context. You can use it to get access to a generic shell options.spring-doc.cn

InteractionMode is telling if shell is running on a non-interactive or interactive mode.spring-doc.cn

InteractionMode interactionMode = ctx.getInteractionMode();

Pty is telling if current terminal has a pty features which not a case when output is piped into file or if terminal is run in a ci system.spring-doc.cn

boolean hasPty = ctx.hasPty();