diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-11-27 00:33:09 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-11-27 00:33:09 +0000 |
commit | 1a1a4d57a19336ebe3bf0712faff9228ba390b4d (patch) | |
tree | 8b90ee574974de3b36b82ab2b5a7661a60235086 /sys-apps/less | |
parent | drop autoconf dep since it is only needed for test failures (diff) | |
download | historical-1a1a4d57a19336ebe3bf0712faff9228ba390b4d.tar.gz historical-1a1a4d57a19336ebe3bf0712faff9228ba390b4d.tar.bz2 historical-1a1a4d57a19336ebe3bf0712faff9228ba390b4d.zip |
allow people to always force colorization #156362 by Benno Schulenberg
Package-Manager: portage-2.1.2_rc2-r2
Diffstat (limited to 'sys-apps/less')
-rw-r--r-- | sys-apps/less/Manifest | 14 | ||||
-rw-r--r-- | sys-apps/less/files/lesspipe.sh | 12 |
2 files changed, 16 insertions, 10 deletions
diff --git a/sys-apps/less/Manifest b/sys-apps/less/Manifest index cf87d7f869bc..611baf303b22 100644 --- a/sys-apps/less/Manifest +++ b/sys-apps/less/Manifest @@ -9,10 +9,10 @@ AUX code2color.patch 1110 RMD160 712f7b79c94f92ee62825d5f53627f18fae693d2 SHA1 a MD5 40be3763d55fd69bb37d85c22f4192a4 files/code2color.patch 1110 RMD160 712f7b79c94f92ee62825d5f53627f18fae693d2 files/code2color.patch 1110 SHA256 a3887126826ef0b4b821bd97cf4e7abfc8b1c9280bf2bb18a2a4cec9a2973936 files/code2color.patch 1110 -AUX lesspipe.sh 5512 RMD160 56870bd22ad3d1a7315d08cabd0740babb5bb7e1 SHA1 132e710de2ddd34f617580d8116de9fb5acf6272 SHA256 9bf4cf8cc2ee3b5d7c78aa662d844839e86cc0ca1ccaf501627f1c01a3c1529c -MD5 b5f12736188db8ce5b2890eb34577f19 files/lesspipe.sh 5512 -RMD160 56870bd22ad3d1a7315d08cabd0740babb5bb7e1 files/lesspipe.sh 5512 -SHA256 9bf4cf8cc2ee3b5d7c78aa662d844839e86cc0ca1ccaf501627f1c01a3c1529c files/lesspipe.sh 5512 +AUX lesspipe.sh 5657 RMD160 2cf4d3f6a3e0eaef3d3319943714d3b1b8ee9699 SHA1 22bfa5dcbebefb28f288fb7b2999ccf7f2da2c04 SHA256 fa2bc6716b78bddd35c6e64993f04f734832baf5b88b00b689b57be272e39b0e +MD5 e8614f0901b7f826590042eb8bbf9963 files/lesspipe.sh 5657 +RMD160 2cf4d3f6a3e0eaef3d3319943714d3b1b8ee9699 files/lesspipe.sh 5657 +SHA256 fa2bc6716b78bddd35c6e64993f04f734832baf5b88b00b689b57be272e39b0e files/lesspipe.sh 5657 DIST code2color 199875 RMD160 378d340a20c3fe500f19116220d54816fe279225 SHA1 b30526dd52c747b8bd6dcf53cf5cc94824c47feb SHA256 ce63f148293a81b0fe5e072f33285f9bf4f1d832f64b23a2220519674a47091d DIST less-394.tar.gz 292585 RMD160 a0ab2583a38a1c6dcfe6ee23f535f7f341742116 SHA1 fa0d9aa30ec461866786c4080bb594fc3337bb02 SHA256 24fc383723c73857ac01179364bacdd64c5b8dfe83afce9a665de8cc52ffa90b EBUILD less-394.ebuild 1296 RMD160 b32775d07630d4e0747ad6db3b0ebae6c6813109 SHA1 6e64852e0d4e84b272aaf5597f51ccd7f6189d37 SHA256 912ea242b85b16510b28860217b04a12c876ef6190e15a430f06b6e928126b13 @@ -33,7 +33,7 @@ SHA256 1a925cad31887d274131dce69c406db3476d0edc1c51b155a0df10d8c147e620 files/di -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) -iD8DBQFFTl68amhnQswr0vIRAjdRAJ47tSFTEIzTjnUR8UosQPKjDtPOnwCgsTve -p+XFWVrmgJivPqXHkp653us= -=15Fr +iD8DBQFFajKaamhnQswr0vIRAgOvAJ9md7H0dAS2EB0ASkj+oIuIO8siiQCeNNe5 +z1YMjrxGYy2TjP6swU+qD2w= +=5l1F -----END PGP SIGNATURE----- diff --git a/sys-apps/less/files/lesspipe.sh b/sys-apps/less/files/lesspipe.sh index d1dae0dc2ea9..de11dc5e2c8e 100644 --- a/sys-apps/less/files/lesspipe.sh +++ b/sys-apps/less/files/lesspipe.sh @@ -136,6 +136,7 @@ lesspipe() { # Allow people to flip color off if they dont want it case ${LESSCOLOR} in + always) LESSCOLOR=2;; [yY][eE][sS]|1|true) LESSCOLOR=1;; [nN][oO]|0|false) LESSCOLOR=0;; *) LESSCOLOR=1;; # default to colorize @@ -146,7 +147,12 @@ lesspipe() { exit 0 fi - # Only colorize if we know less will handle raw codes + # Only colorize if user forces it ... + if [[ ${LESSCOLOR} == "2" ]]; then + ${LESSCOLORIZER} "$1" + exit 0 + fi + # ... or we know less will handle raw codes for opt in ${LESS} ; do if [[ ${opt} == "-r" || ${opt} == "-R" ]] ; then ${LESSCOLORIZER} "$1" @@ -187,10 +193,10 @@ if [[ -z $1 ]] ; then echo "Usage: lesspipe.sh <file>" elif [[ $1 == "-V" ]] ; then Id="cvsid" - cvsid="$Id: lesspipe.sh,v 1.19 2006/11/05 21:58:50 vapier Exp $" + cvsid="$Id: lesspipe.sh,v 1.20 2006/11/27 00:33:09 vapier Exp $" cat <<-EOF $cvsid - Copyright 2001-2005 Gentoo Foundation + Copyright 2001-2006 Gentoo Foundation Mike Frysinger <vapier@gentoo.org> (with plenty of ideas stolen from other projects/distros) |