Fix issue where super prompt would fail to delete text due to borked non-printing characters.
This commit is contained in:
parent
5297c7a7e9
commit
2fa5caec8a
2 changed files with 16 additions and 46 deletions
|
@ -1,26 +1,8 @@
|
|||
function colorize() {
|
||||
local TEXT=$2
|
||||
local NO_COLOR="\033[0m"
|
||||
case "$1" in
|
||||
red)
|
||||
local COLOR="\033[31m"
|
||||
;;
|
||||
green)
|
||||
local COLOR="\033[32m"
|
||||
;;
|
||||
yellow)
|
||||
local COLOR="\033[33m"
|
||||
;;
|
||||
blue)
|
||||
local COLOR="\033[34m"
|
||||
;;
|
||||
magenta)
|
||||
local COLOR="\033[35m"
|
||||
;;
|
||||
cyan)
|
||||
local COLOR="\033[36m"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -e "${COLOR}${TEXT}${NO_COLOR}"
|
||||
}
|
||||
# This file just contains some nice variable names for color codes.
|
||||
C_NO='\[\033[0m\]'
|
||||
C_RED='\[\033[1;31m\]'
|
||||
C_GREEN='\[\033[1;32m\]'
|
||||
C_YELLOW='\[\033[1;33m\]'
|
||||
C_BLUE='\[\033[1;34m\]'
|
||||
C_MAGENTA='\[\033[1;35m\]'
|
||||
C_CYAN='\[\033[1;36m\]'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue