-
Effekt Library
- tty
- Color
- ANSI
- ANSI256
- NoColor
- BLACK
- RED
- GREEN
- YELLOW
- BLUE
- MAGENTA
- CYAN
- WHITE
- BRIGHT_BLACK
- BRIGHT_RED
- BRIGHT_GREEN
- BRIGHT_YELLOW
- BRIGHT_BLUE
- BRIGHT_MAGENTA
- BRIGHT_CYAN
- BRIGHT_WHITE
- ansi
- toEscapeSeq
- CSI
- OSC
- RESET
- BOLD
- FAINT
- ITALIC
- UNDERLINE
- BLINK
- REVERSE
- CROSSOUT
- OVERLINE
- escape
- escapeOSC
- cursorUp
- cursorDown
- cursorForward
- cursorBack
- cursorNextLine
- cursorPreviousLine
- cursorHorizontal
- cursorPosition
- eraseDisplay
- eraseLine
- scrollUp
- scrollDown
- saveCursorPosition
- restoreCursorPosition
- changeScrollingRegion
- insertLine
- deleteLine
- eraseLineRight
- eraseLineLeft
- eraseEntireLine
- enableMousePress
- disableMousePress
- enableMouse
- disableMouse
- enableMouseHighlight
- disableMouseHighlight
- enableMouseCellMotion
- disableMouseCellMotion
- enableMouseAllMotion
- disableMouseAllMotion
- enableMouseExtendedMode
- disableMouseExtendedMode
- enableMousePixelsMode
- disableMousePixelsMode
- restoreScreen
- saveScreen
- altScreen
- exitAltScreen
- enableBracketedPaste
- disableBracketedPaste
- startBracketedPaste
- endBracketedPaste
- setWindowTitle
- setForegroundColor
- setBackgroundColor
- setCursorColor
- showCursor
- hideCursor
- applyForegroundColor
- applyBackgroundColor
- inlineImage
- hyperlink
- attention
- clear
- clearLine
- red
- green
- yellow
- blue
- magenta
- cyan
- white
- dim
- bold
- underline
- italic
- Formatted
- supportsEscape
- formatting
- noFormatting
- tryEmit
- colored
- colored
- tty Jump to source: libraries/common/tty.effekt
- Color
- ANSI
(code: Int)
- ANSI256
(code: Int)
- NoColor
- BLACK
- RED
- GREEN
- YELLOW
- BLUE
- MAGENTA
- CYAN
- WHITE
- BRIGHT_BLACK
- BRIGHT_RED
- BRIGHT_GREEN
- BRIGHT_YELLOW
- BRIGHT_BLUE
- BRIGHT_MAGENTA
- BRIGHT_CYAN
- BRIGHT_WHITE
- ansi
(code: Int): Color / {}
- toEscapeSeq
(color: Color): String / {}
- CSI
- OSC
- RESET
- BOLD
- FAINT
- ITALIC
- UNDERLINE
- BLINK
- REVERSE
- CROSSOUT
- OVERLINE
- escape
(code: String): String / {}
- escapeOSC
(code: String): String / {}
- cursorUp
(x: Int): String / {}
- cursorDown
(x: Int): String / {}
- cursorForward
(x: Int): String / {}
- cursorBack
(x: Int): String / {}
- cursorNextLine
(x: Int): String / {}
- cursorPreviousLine
(x: Int): String / {}
- cursorHorizontal
(x: Int): String / {}
- cursorPosition
(x: Int, y: Int): String / {}
- eraseDisplay
(x: Int): String / {}
- eraseLine
(x: Int): String / {}
- scrollUp
(x: Int): String / {}
- scrollDown
(x: Int): String / {}
- saveCursorPosition
: String / {}
- restoreCursorPosition
: String / {}
- changeScrollingRegion
(x: Int, y: Int): String / {}
- insertLine
(x: Int): String / {}
- deleteLine
(x: Int): String / {}
- eraseLineRight
: String / {}
- eraseLineLeft
: String / {}
- eraseEntireLine
: String / {}
- enableMousePress
: String / {}
- disableMousePress
: String / {}
- enableMouse
: String / {}
- disableMouse
: String / {}
- enableMouseHighlight
: String / {}
- disableMouseHighlight
: String / {}
- enableMouseCellMotion
: String / {}
- disableMouseCellMotion
: String / {}
- enableMouseAllMotion
: String / {}
- disableMouseAllMotion
: String / {}
- enableMouseExtendedMode
: String / {}
- disableMouseExtendedMode
: String / {}
- enableMousePixelsMode
: String / {}
- disableMousePixelsMode
: String / {}
- restoreScreen
: String / {}
- saveScreen
: String / {}
- altScreen
: String / {}
- exitAltScreen
: String / {}
- enableBracketedPaste
: String / {}
- disableBracketedPaste
: String / {}
- startBracketedPaste
: String / {}
- endBracketedPaste
: String / {}
- setWindowTitle
(s: String): String / {}
- setForegroundColor
(s: String): String / {}
- setBackgroundColor
(s: String): String / {}
- setCursorColor
(s: String): String / {}
- showCursor
: String / {}
- hideCursor
: String / {}
- applyForegroundColor
(color: Color): String / {}
- applyBackgroundColor
(color: Color): String / {}
- inlineImage
(size: Int, base64Image: String)
- hyperlink
(text: String, url: String): String / {}
- attention
(value: String)
- clear
: String / {}
- clearLine
: String / {}
- red
(text: String)
- green
(text: String)
- yellow
(text: String)
- blue
(text: String)
- magenta
(text: String)
- cyan
(text: String)
- white
(text: String)
- dim
(text: String)
- bold
(text: String)
- underline
(text: String)
- italic
(text: String)
- Formatted
- supportsEscape
(escape: String): Bool / {}
- formatting
[R] { prog: => R / {Formatted} }: R / {}
- noFormatting
[R] { prog: => R / {Formatted} }: R / {}
- tryEmit
(escape: String): String / {Formatted}
- colored
(text: String, escape: String): String / {Formatted}
- colored
(text: String, color: Color): String / {Formatted}
Example usage: examples/stdlib/tty
Represents a TTY color. - ANSI for the standard 16 terminal colors - ANSI256 for standard 256 terminal colors - NoColor for explicit "this doesn't have a set color"
Create an ANSI color from a code
Converts a color to its escape code
Inline images See https://iterm2.com/documentation-images.html for protocol description See [imgcat](https://iterm2.com/utilities/imgcat) for more usage details
Hyperlinks https://iterm2.com/documentation-escape-codes.html
Run given block of code, allowing all formatting
Run given block of code, ignoring all formatting