DIR_COLORS.xterm should have higher priority than DIR_COLORS.256color (#921651)
This commit is contained in:
parent
1ad51b6276
commit
c7a1b74c04
@ -13,14 +13,14 @@ set COLORS=/etc/DIR_COLORS
|
||||
set TMP="`mktemp .colorlsXXX`"
|
||||
|
||||
if ($?TERM) then
|
||||
if ( -e "/etc/DIR_COLORS.$TERM" ) then
|
||||
set COLORS="/etc/DIR_COLORS.$TERM"
|
||||
endif
|
||||
if ( -e "/etc/DIR_COLORS.256color" ) then
|
||||
if ( "`tput colors`" == "256" ) then
|
||||
set COLORS=/etc/DIR_COLORS.256color
|
||||
endif
|
||||
endif
|
||||
if ( -e "/etc/DIR_COLORS.$TERM" ) then
|
||||
set COLORS="/etc/DIR_COLORS.$TERM"
|
||||
endif
|
||||
endif
|
||||
if ( -f ~/.dircolors ) set COLORS=~/.dircolors
|
||||
if ( -f ~/.dir_colors ) set COLORS=~/.dir_colors
|
||||
|
@ -21,15 +21,15 @@ if [ -z "$USER_LS_COLORS" ]; then
|
||||
break
|
||||
done
|
||||
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.256color" ] && \
|
||||
[ "x`tty -s && tput colors 2>/dev/null`" = "x256" ] && \
|
||||
COLORS="/etc/DIR_COLORS.256color"
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.$TERM" ] && \
|
||||
COLORS="/etc/DIR_COLORS.$TERM"
|
||||
|
||||
if [ -z "$COLORS" ]; then
|
||||
for colors in "/etc/DIR_COLORS.$TERM" "/etc/DIR_COLORS" ; do
|
||||
[ -e "$colors" ] && COLORS="$colors" && break
|
||||
done
|
||||
fi
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.256color" ] && \
|
||||
[ "x`tty -s && tput colors 2>/dev/null`" = "x256" ] && \
|
||||
COLORS="/etc/DIR_COLORS.256color"
|
||||
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS" ] && \
|
||||
COLORS="/etc/DIR_COLORS"
|
||||
|
||||
# Existence of $COLORS already checked above.
|
||||
[ -n "$COLORS" ] || return
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: A set of basic GNU tools commonly used in shell scripts
|
||||
Name: coreutils
|
||||
Version: 8.21
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
License: GPLv3+
|
||||
Group: System Environment/Base
|
||||
Url: http://www.gnu.org/software/coreutils/
|
||||
@ -375,6 +375,10 @@ fi
|
||||
%{_sbindir}/chroot
|
||||
|
||||
%changelog
|
||||
* Thu Mar 14 2013 Ondrej Vasik <ovasik@redhat.com> 8.21-10
|
||||
- DIR_COLORS.$TERM should have higher priority than
|
||||
DIR_COLORS.256color (#921651)
|
||||
|
||||
* Mon Mar 11 2013 Ondrej Oprala <ooprala@redhat.com> 8.21-9
|
||||
- add support for INCLUDE in colorls scripts (#818069)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user