Terminal

sbt.internal.util.Terminal
See theTerminal companion object
trait Terminal extends AutoCloseable

Attributes

Companion
object
Graph
Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def errorStream: OutputStream

Gets the error stream for this Terminal.

Gets the error stream for this Terminal.

Attributes

Returns

the error stream.

def getHeight: Int

Gets the current height of the terminal. The implementation reads a property from the jline config which is updated if it has been more than a second since the last update. It is thus possible for this value to be stale.

Gets the current height of the terminal. The implementation reads a property from the jline config which is updated if it has been more than a second since the last update. It is thus possible for this value to be stale.

Attributes

Returns

the terminal height.

def getLineHeightAndWidth(line: String): (Int, Int)

Returns the height and width of the current line that is displayed on the terminal. If the most recently flushed byte is a newline, this will be (0, 0).

Returns the height and width of the current line that is displayed on the terminal. If the most recently flushed byte is a newline, this will be (0, 0).

Attributes

Returns

the (height, width) pair

def getWidth: Int

Gets the current width of the terminal. The implementation reads a property from the jline config which is updated if it has been more than a second since the last update. It is thus possible for this value to be stale.

Gets the current width of the terminal. The implementation reads a property from the jline config which is updated if it has been more than a second since the last update. It is thus possible for this value to be stale.

Attributes

Returns

the terminal width.

def inputStream: InputStream

Gets the input stream for this Terminal. This could be a wrapper around System.in for the process or it could be a remote input stream for a network channel.

Gets the input stream for this Terminal. This could be a wrapper around System.in for the process or it could be a remote input stream for a network channel.

Attributes

Returns

the input stream.

def isAnsiSupported: Boolean

Returns true if the terminal supports ansi characters.

Returns true if the terminal supports ansi characters.

Attributes

Returns

true if the terminal supports ansi escape codes.

def isColorEnabled: Boolean

Returns true if color is enabled for this terminal.

Returns true if color is enabled for this terminal.

Attributes

Returns

true if color is enabled for this terminal.

def isEchoEnabled: Boolean

Returns true if the terminal has echo enabled.

Returns true if the terminal has echo enabled.

Attributes

Returns

true if the terminal has echo enabled.

def isSuccessEnabled: Boolean

Returns true if the terminal has success enabled, which it may not if it is for batch commands because the client will print the success results when received from the server.

Returns true if the terminal has success enabled, which it may not if it is for batch commands because the client will print the success results when received from the server.

Attributes

Returns

true if the terminal has success enabled

def isSupershellEnabled: Boolean

Returns true if the terminal has supershell enabled.

Returns true if the terminal has supershell enabled.

Attributes

Returns

true if the terminal has supershell enabled.

def outputStream: OutputStream

Gets the output stream for this Terminal.

Gets the output stream for this Terminal.

Attributes

Returns

the output stream.

def setEchoEnabled(toggle: Boolean): Unit

Toggles whether or not the terminal should echo characters back to stdout

Toggles whether or not the terminal should echo characters back to stdout

Attributes

Returns

the previous value of the toggle

Concrete methods

def ansi(richString: => String, string: => String): String
Implicitly added by TerminalOps

Inherited methods

def close(): Unit

Attributes

Inherited from:
AutoCloseable