🐛 fix in prompt
parent
7a88b6524e
commit
9576b878c8
|
|
@ -9,20 +9,20 @@ function parse_git_branch_no_color() {
|
|||
echo -e "$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/')"
|
||||
}
|
||||
|
||||
function promp() {
|
||||
function prompt() {
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
force_color_prompt=yes
|
||||
local force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
local color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
local color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -34,3 +34,4 @@ function promp() {
|
|||
fi
|
||||
}
|
||||
|
||||
safe_append_prompt_command prompt
|
||||
|
|
|
|||
Loading…
Reference in New Issue