Option select on tput working or use old fallback control codes
This commit is contained in:
parent
16545b322f
commit
bc00f7a310
24
bash/.bashrc
24
bash/.bashrc
@ -2,13 +2,23 @@
|
|||||||
|
|
||||||
#{- PROMPT -}#
|
#{- PROMPT -}#
|
||||||
|
|
||||||
red="\001$(tput bold)$(tput setaf 1)\002"
|
if which tput &> /dev/null && tput bold &> /dev/null; then
|
||||||
green="\001$(tput bold)$(tput setaf 2)\002"
|
red="\001$(tput bold)$(tput setaf 1)\002"
|
||||||
yellow="\001$(tput bold)$(tput setaf 3)\002"
|
green="\001$(tput bold)$(tput setaf 2)\002"
|
||||||
blue="\001$(tput bold)$(tput setaf 4)\002"
|
yellow="\001$(tput bold)$(tput setaf 3)\002"
|
||||||
magenta="\001$(tput bold)$(tput setaf 5)\002"
|
blue="\001$(tput bold)$(tput setaf 4)\002"
|
||||||
cyan="\001$(tput bold)$(tput setaf 6)\002"
|
magenta="\001$(tput bold)$(tput setaf 5)\002"
|
||||||
no_color="\001$(tput sgr0)\002"
|
cyan="\001$(tput bold)$(tput setaf 6)\002"
|
||||||
|
no_color="\001$(tput sgr0)\002"
|
||||||
|
else
|
||||||
|
red="\[\033[1;31m\]"
|
||||||
|
green="\[\033[1;32m\]"
|
||||||
|
yellow="\[\033[1;33m\]"
|
||||||
|
blue="\[\033[1;34m\]"
|
||||||
|
magenta="\[\033[1;35m\]"
|
||||||
|
cyan="\[\033[1;36m\]"
|
||||||
|
no_color="\[\033[0m\]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
export PS1="${green}\$${no_color} "
|
export PS1="${green}\$${no_color} "
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user