sily.bashfmt

Undocumented in source.

Members

Aliases

BG
alias BG = Background
Undocumented in source.
FG
alias FG = Foreground
Undocumented in source.
FM
alias FM = Formatting
Undocumented in source.
FR
alias FR = FormattingReset
Undocumented in source.

Enums

Background
enum Background
Undocumented in source.
Foreground
enum Foreground
Undocumented in source.
Formatting
enum Formatting
Undocumented in source.
FormattingReset
enum FormattingReset
Undocumented in source.

Functions

cleanTerminalState
void cleanTerminalState()

Intended to be used in SIGINT callback

clearScreen
void clearScreen()

Clears terminal screen and resets cursor position

clearScreenOnly
void clearScreenOnly()

Clears terminal screen

eraseCurrentLine
void eraseCurrentLine()

Fully erases current line

eraseLineLeft
void eraseLineLeft()

Erases text from start of current line to cursor

eraseLineRight
void eraseLineRight()

Erases text from cursor to end of current line

eraseLines
void eraseLines(int num)

Erases num lines in terminal starting with current.

fwrite
void fwrite(A args)

Casts args to string and writes to stdout

fwriteln
void fwriteln(A args)

Casts args to string and writes to stdout with \n at the end

hideCursor
void hideCursor()

Hides cursor. Does not reset position

moveCursorDown
void moveCursorDown(int lineAmount)

Moves cursor in terminal down by lineAmount

moveCursorLeft
void moveCursorLeft(int columnAmount)

Moves cursor in terminal left by columnAmount

moveCursorRight
void moveCursorRight(int columnAmount)

Moves cursor in terminal right by columnAmount

moveCursorTo
void moveCursorTo(int x, int y)

Moves cursor in terminal to {x, y}

moveCursorUp
void moveCursorUp(int lineAmount)

Moves cursor in terminal up by lineAmount

restoreCursorPosition
void restoreCursorPosition()

Restores saved cursor position (moves cursor to saved pos)

saveCursorPosition
void saveCursorPosition()

Saves cursor position to be restored later

showCursor
void showCursor()

Shows cursor. Does not reset position

Meta