improve 256-color support handling in colorls shell scripts + color tunning
This commit is contained in:
parent
6ee11ab3f6
commit
55707b64ee
@ -67,19 +67,19 @@ OTHER_WRITABLE 48;5;10;38;5;21 # dir that is other-writable (o+w) and not sticky
|
||||
STICKY 48;5;21;38;5;15 # dir with the sticky bit set (+t) and not other-writable
|
||||
|
||||
# This is for files with execute permission:
|
||||
EXEC 01;38;5;10
|
||||
EXEC 01;38;5;34
|
||||
|
||||
# List any file extensions like '.gz' or '.tar' that you would like ls
|
||||
# to colorize below. Put the extension, a space, and the color init string.
|
||||
# (and any comments you want to add after a '#')
|
||||
# executables (bright green)
|
||||
.cmd 01;38;5;10
|
||||
.exe 01;38;5;10
|
||||
.com 01;38;5;10
|
||||
.btm 01;38;5;10
|
||||
.bat 01;38;5;10
|
||||
.sh 01;38;5;10
|
||||
.csh 01;38;5;10
|
||||
.cmd 01;38;5;34
|
||||
.exe 01;38;5;34
|
||||
.com 01;38;5;34
|
||||
.btm 01;38;5;34
|
||||
.bat 01;38;5;34
|
||||
.sh 01;38;5;34
|
||||
.csh 01;38;5;34
|
||||
# archives or compressed (bright red)
|
||||
.tar 01;38;5;9
|
||||
.tgz 01;38;5;9
|
||||
@ -148,14 +148,14 @@ EXEC 01;38;5;10
|
||||
.yuv 01;38;5;13
|
||||
.svg 01;38;5;13
|
||||
# audio formats (cyan)
|
||||
.aac 00;38;5;14
|
||||
.au 00;38;5;14
|
||||
.flac 00;38;5;14
|
||||
.mid 00;38;5;14
|
||||
.midi 00;38;5;14
|
||||
.mka 00;38;5;14
|
||||
.mp3 00;38;5;14
|
||||
.mpc 00;38;5;14
|
||||
.ogg 00;38;5;14
|
||||
.ra 00;38;5;14
|
||||
.wav 00;38;5;14
|
||||
.aac 00;38;5;45
|
||||
.au 00;38;5;45
|
||||
.flac 00;38;5;45
|
||||
.mid 00;38;5;45
|
||||
.midi 00;38;5;45
|
||||
.mka 00;38;5;45
|
||||
.mp3 00;38;5;45
|
||||
.mpc 00;38;5;45
|
||||
.ogg 00;38;5;45
|
||||
.ra 00;38;5;45
|
||||
.wav 00;38;5;45
|
||||
|
@ -16,7 +16,7 @@ if ($?TERM) then
|
||||
endif
|
||||
endif
|
||||
if ( -e "/etc/DIR_COLORS.256color" ) then
|
||||
if ( "`infocmp $TERM | sed -n 's/.*colors#\([0-9]\+\).*/\1/p'`" == "256" ) then
|
||||
if ( "`tput colors 2>/dev/null`" == "256" ) then
|
||||
set COLORS=/etc/DIR_COLORS.256color
|
||||
endif
|
||||
endif
|
||||
|
@ -7,7 +7,7 @@ if [ -z "$LS_COLORS" ]; then
|
||||
COLORS=/etc/DIR_COLORS
|
||||
[ -e "/etc/DIR_COLORS.$TERM" ] && COLORS="/etc/DIR_COLORS.$TERM"
|
||||
[ -e "/etc/DIR_COLORS.256color" ] && \
|
||||
[ "`infocmp $TERM | sed -n 's/.*colors#\([0-9]\+\).*/\1/p'`" -eq 256 ] && \
|
||||
[ "`tput colors 2>/dev/null`" = "256" ] && \
|
||||
COLORS="/etc/DIR_COLORS.256color"
|
||||
[ -e "$HOME/.dircolors" ] && COLORS="$HOME/.dircolors"
|
||||
[ -e "$HOME/.dir_colors" ] && COLORS="$HOME/.dir_colors"
|
||||
|
@ -508,6 +508,14 @@ diff -urp coreutils-6.10-orig/src/install.c coreutils-6.10/src/install.c
|
||||
x.preserve_security_context = true;
|
||||
use_default_selinux_context = false;
|
||||
break;
|
||||
@@ -432,6 +432,7 @@ main (int argc, char **argv)
|
||||
break;
|
||||
}
|
||||
scontext = optarg;
|
||||
+ x.set_security_context = true;
|
||||
use_default_selinux_context = false;
|
||||
break;
|
||||
case_GETOPT_HELP_CHAR;
|
||||
@@ -825,8 +831,8 @@ Mandatory arguments to long options are
|
||||
-v, --verbose print the name of each directory as it is created\n\
|
||||
"), stdout);
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: The GNU core utilities: a set of tools commonly used in shell scripts
|
||||
Name: coreutils
|
||||
Version: 6.10
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: GPLv3+
|
||||
Group: System Environment/Base
|
||||
Url: http://www.gnu.org/software/coreutils/
|
||||
@ -291,6 +291,10 @@ fi
|
||||
/sbin/runuser
|
||||
|
||||
%changelog
|
||||
* Thu Feb 7 2008 Ondrej Vasik <ovasik@redhat.com> - 6.10-6
|
||||
- better 256-color support in colorls shell scripts
|
||||
- color tuning(based on feedback in #429121)
|
||||
|
||||
* Mon Feb 4 2008 Ondrej Vasik <ovasik@redhat.com> - 6.10-5
|
||||
- enabled 256-color support in colorls shell scripts(#429121)
|
||||
- fixed syntax error in csh script(#431315)
|
||||
|
Loading…
Reference in New Issue
Block a user