aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Wittamore <philip@wittamore.com>2025-05-16 17:23:21 +0200
committerPhilip Wittamore <philip@wittamore.com>2025-05-16 17:23:21 +0200
commita3c77a9b450ddc760c3e763d8124c68c4b0b4a3a (patch)
treee449bb2194eea13290ab0cbdbb29c4127e785f76
parent533815eb4aadabca6fe643ed1257488ba52dee15 (diff)
downloadbashlib-a3c77a9b450ddc760c3e763d8124c68c4b0b4a3a.tar.gz
bashlib-a3c77a9b450ddc760c3e763d8124c68c4b0b4a3a.tar.bz2
bashlib-a3c77a9b450ddc760c3e763d8124c68c4b0b4a3a.zip
update
-rwxr-xr-xpb48
1 files changed, 24 insertions, 24 deletions
diff --git a/pb b/pb
index d3eba2a..86e7278 100755
--- a/pb
+++ b/pb
@@ -5,43 +5,43 @@
# printf %b "$(bg 196)$(fg 254) RED $(nc)\n"
nc () {
- printf '\033[0;0m';
- exit;
+ printf '\033[0;0m';
+ exit;
}
fg () {
- if [ -z "$1" ] || [ "$1" -eq "$1" ] >/dev/null 2>&1; then
- true
- else
- echo "bad parameter";
- exit;
- fi
+ if [ -z "$1" ] || [ "$1" -eq "$1" ] >/dev/null 2>&1; then
+ true
+ else
+ echo "bad parameter";
+ exit;
+ fi
- local x
- x=$(tput colors)
+ local x
+ x=$(tput colors)
- if (("$1" < 256)) && (("$x" > 255)); then
- printf %s "\033[38;5;$1m"
- fi
+ if (("$1" < 256)) && (("$x" > 255)); then
+ printf %s "\033[38;5;$1m"
+ fi
}
bg () {
- if [ -z "$1" ] || [ "$1" -eq "$1" ] >/dev/null 2>&1; then
- true
- else
- echo "bad parameter";
- exit;
- fi
+ if [ -z "$1" ] || [ "$1" -eq "$1" ] >/dev/null 2>&1; then
+ true
+ else
+ echo "bad parameter";
+ exit;
+ fi
- local x
- x=$(tput colors)
+ local x
+ x=$(tput colors)
- if (("$1" < 256)) && (("$x" > 255)); then
- printf %s "\033[48;5;$1m"
- fi
+ if (("$1" < 256)) && (("$x" > 255)); then
+ printf %s "\033[48;5;$1m"
+ fi
}