12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #!/bin/bash
-
- #
- # Context symbol used in title and prompt
- #
- BASHUM_CTXSYM=${BASHUM_CTXSYM:-}
-
- # get some fancy colorz
- BASHUM_COLOR_BLACK=$'\033[0;30m'
- BASHUM_COLOR_RED=$'\033[0;31m'
- BASHUM_COLOR_GREEN=$'\033[0;32m'
- BASHUM_COLOR_YELLOW=$'\033[0;33m'
- BASHUM_COLOR_BLUE=$'\033[0;34m'
- BASHUM_COLOR_MAGENTA=$'\033[0;35m'
- BASHUM_COLOR_CYAN=$'\033[0;36m'
- BASHUM_COLOR_WHITE=$'\033[0;37m'
- BASHUM_COLOR_LBLACK=$'\033[1;30m'
- BASHUM_COLOR_LRED=$'\033[1;31m'
- BASHUM_COLOR_LGREEN=$'\033[1;32m'
- BASHUM_COLOR_LYELLOW=$'\033[1;33m'
- BASHUM_COLOR_LBLUE=$'\033[1;34m'
- BASHUM_COLOR_LMAGENTA=$'\033[1;35m'
- BASHUM_COLOR_LCYAN=$'\033[1;36m'
- BASHUM_COLOR_LWHITE=$'\033[1;37m'
- BASHUM_COLOR_NORMAL=$'\033[1;0m'
-
- # get some fancy colorz
- BASHUM_PS_COLOR_BLACK=$'\[\033[0;30m\]'
- BASHUM_PS_COLOR_RED=$'\[\033[0;31m\]'
- BASHUM_PS_COLOR_GREEN=$'\[\033[0;32m\]'
- BASHUM_PS_COLOR_YELLOW=$'\[\033[0;33m\]'
- BASHUM_PS_COLOR_BLUE=$'\[\033[0;34m\]'
- BASHUM_PS_COLOR_MAGENTA=$'\[\033[0;35m\]'
- BASHUM_PS_COLOR_CYAN=$'\[\033[0;36m\]'
- BASHUM_PS_COLOR_WHITE=$'\[\033[0;37m\]'
- BASHUM_PS_COLOR_LBLACK=$'\[\033[1;30m\]'
- BASHUM_PS_COLOR_LRED=$'\[\033[1;31m\]'
- BASHUM_PS_COLOR_LGREEN=$'\[\033[1;32m\]'
- BASHUM_PS_COLOR_LYELLOW=$'\[\033[1;33m\]'
- BASHUM_PS_COLOR_LBLUE=$'\[\033[1;34m\]'
- BASHUM_PS_COLOR_LMAGENTA=$'\[\033[1;35m\]'
- BASHUM_PS_COLOR_LCYAN=$'\[\033[1;36m\]'
- BASHUM_PS_COLOR_LWHITE=$'\[\033[1;37m\]'
- BASHUM_PS_COLOR_NORMAL=$'\[\033[1;0m\]'
-
- #shellcheck disable=SC1087
- bashum__colordemo() {
- local bla=$BASHUM_COLOR_BLACK
- local red=$BASHUM_COLOR_RED
- local gre=$BASHUM_COLOR_GREEN
- local yel=$BASHUM_COLOR_YELLOW
- local blu=$BASHUM_COLOR_BLUE
- local mag=$BASHUM_COLOR_MAGENTA
- local cya=$BASHUM_COLOR_CYAN
- local whi=$BASHUM_COLOR_WHITE
- local lbla=$BASHUM_COLOR_LBLACK
- local lred=$BASHUM_COLOR_LRED
- local lgre=$BASHUM_COLOR_LGREEN
- local lyel=$BASHUM_COLOR_LYELLOW
- local lblu=$BASHUM_COLOR_LBLUE
- local lmag=$BASHUM_COLOR_LMAGENTA
- local lcya=$BASHUM_COLOR_LCYAN
- local lwhi=$BASHUM_COLOR_LWHITE
- local n=$BASHUM_COLOR_NORMAL
- echo "black: $bla[abc123]$n lblack: $lbla[abc123]$n"
- echo "red: $red[abc123]$n lred: $lred[abc123]$n"
- echo "yellow: $yel[abc123]$n lyellow: $lyel[abc123]$n"
- echo "green: $gre[abc123]$n lgreen: $lgre[abc123]$n"
- echo "cyan: $cya[abc123]$n lcyan: $lcya[abc123]$n"
- echo "blue: $blu[abc123]$n lblue: $lblu[abc123]$n"
- echo "magenta: $mag[abc123]$n lmagenta: $lmag[abc123]$n"
- echo "white: $whi[abc123]$n lwhite: $lwhi[abc123]$n"
- }
|