Skip to content

bash-bastion/bash-term

Repository files navigation

bash-term

Bash library for terminal escape sequences

Summary

Includes functions to print standard ANSI escape sequences

Installation

Use Basalt, a Bash package manager, to add this project as a dependency

basalt add hyperupcall/bash-term

Usage

See Tweet

# -d means 'done'; that is, reset the style at the end of the string (same as `term.style_reset`)
# -p means 'print'; that is, print the value of "$REPLY" that it sets
# -P is similar to -p, but print with an appended newline
term.color_light_purple 'four'
term.style_strikethrough "$REPLY"
term.style_inverse "$REPLY"
term.style_underline -dp "$REPLY"

References