diff options
author | Philip Wittamore <philip@wittamore.com> | 2025-05-16 18:15:46 +0200 |
---|---|---|
committer | Philip Wittamore <philip@wittamore.com> | 2025-05-16 18:15:46 +0200 |
commit | 211ce7e891a137000ab930d2fcdd64132b0951d2 (patch) | |
tree | e9aeca07b75473f9f90cc2acb0f506ff22d217ee | |
parent | a3c77a9b450ddc760c3e763d8124c68c4b0b4a3a (diff) | |
download | bashlib-211ce7e891a137000ab930d2fcdd64132b0951d2.tar.gz bashlib-211ce7e891a137000ab930d2fcdd64132b0951d2.tar.bz2 bashlib-211ce7e891a137000ab930d2fcdd64132b0951d2.zip |
update
-rwxr-xr-x | pb | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1,15 +1,16 @@ #!/usr/bin/env bash -# 256 colour functions usage -# source ./pb -# printf %b "$(bg 196)$(fg 254) RED $(nc)\n" +# 256 colour functions +# usage: +# source ./pb +# printf %b "$(pb_bg 196)$(pb_fg 254) RED $(pb_nc)\n" -nc () { +pb_nc () { printf '\033[0;0m'; exit; } -fg () { +pb_fg () { if [ -z "$1" ] || [ "$1" -eq "$1" ] >/dev/null 2>&1; then true @@ -27,7 +28,7 @@ fg () { } -bg () { +pb_bg () { if [ -z "$1" ] || [ "$1" -eq "$1" ] >/dev/null 2>&1; then true |