test for BASH_VERSION to avoid running for other shells (#2279643)
This commit is contained in:
parent
2773bff058
commit
5d2c1f68eb
@ -4,7 +4,7 @@
|
||||
# PROMPT_DIRTRIM=3
|
||||
|
||||
# only set for color terminals and if PS1 unchanged from bash or fedora defaults
|
||||
if [ '(' "$PS1" = "[\u@\h \W]\\$ " -o "$PS1" = "\\s-\\v\\\$ " ')' -a '(' "${TERM: -5}" = "color" -o "${TERM}" = "linux" ')' -o -n "${bash_prompt_color_force}" ]; then
|
||||
if [ -n "${BASH_VERSION}" -a '(' "$PS1" = "[\u@\h \W]\\$ " -o "$PS1" = "\\s-\\v\\\$ " ')' -a '(' "${TERM: -5}" = "color" -o "${TERM}" = "linux" ')' -o -n "${bash_prompt_color_force}" ]; then
|
||||
|
||||
PROMPT_COLOR="${PROMPT_COLOR:-32}"
|
||||
PROMPT_USERHOST="${PROMPT_USERHOST:-\u@\h}"
|
||||
|
@ -1,5 +1,5 @@
|
||||
Name: shell-color-prompt
|
||||
Version: 0.4.1
|
||||
Version: 0.4.2
|
||||
Release: 1%{?dist}
|
||||
Summary: Color prompt for bash shell
|
||||
|
||||
@ -41,6 +41,12 @@ install -m 644 -D -t %{buildroot}%{profiledir} bash-color-prompt.sh
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jun 7 2024 Jens Petersen <petersen@redhat.com> - 0.4.2-1
|
||||
- test for BASH_VERSION to avoid running for other shells
|
||||
(#2279643, Nathan Grennan)
|
||||
- fix condition regression introduced by previous linux console change
|
||||
- rename prompt_color_force variable to bash_prompt_color_force
|
||||
|
||||
* Thu Jan 25 2024 Jens Petersen <petersen@redhat.com> - 0.4.1-1
|
||||
- also enable for Linux console (TERM=linux)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user