mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
bashrc: Added color support for termux
Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
parent
4ffbe06990
commit
26893ea50f
1 changed files with 2 additions and 1 deletions
3
bashrc
3
bashrc
|
|
@ -35,6 +35,7 @@ fi
|
||||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
case "$TERM" in
|
case "$TERM" in
|
||||||
xterm-color) color_prompt=yes;;
|
xterm-color) color_prompt=yes;;
|
||||||
|
xterm-256color) color_prompt=yes;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
|
@ -43,7 +44,7 @@ esac
|
||||||
force_color_prompt=yes
|
force_color_prompt=yes
|
||||||
|
|
||||||
if [ -n "$force_color_prompt" ]; then
|
if [ -n "$force_color_prompt" ]; then
|
||||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
if [ -n $(which tput) ] && tput setaf 1 >&/dev/null; then
|
||||||
# We have color support; assume it's compliant with Ecma-48
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
# a case would tend to support setf rather than setaf.)
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue