diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-03-13 06:06:29 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-03-13 06:06:29 +0000 |
commit | 5fbf5bf34b65a4a265dbdedc6d76e69a131a2b19 (patch) | |
tree | 58dc64ca9c0b3f2a0d2dd85dcdc4547523a7f417 /sys-apps/less | |
parent | fixup more test failures #259876 (diff) | |
download | historical-5fbf5bf34b65a4a265dbdedc6d76e69a131a2b19.tar.gz historical-5fbf5bf34b65a4a265dbdedc6d76e69a131a2b19.tar.bz2 historical-5fbf5bf34b65a4a265dbdedc6d76e69a131a2b19.zip |
simplify lesscolor code detection
Package-Manager: portage-2.2_rc25/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/less')
-rw-r--r-- | sys-apps/less/Manifest | 10 | ||||
-rw-r--r-- | sys-apps/less/files/lesspipe.sh | 15 |
2 files changed, 10 insertions, 15 deletions
diff --git a/sys-apps/less/Manifest b/sys-apps/less/Manifest index e542d49c8c2c..82dea7951700 100644 --- a/sys-apps/less/Manifest +++ b/sys-apps/less/Manifest @@ -4,7 +4,7 @@ Hash: SHA1 AUX README.Gentoo 823 RMD160 be59c37906fca17fa25f6781d3f5e7abc114dc57 SHA1 5a1f126af728f5220b97623050e2f9b1ea5ae58e SHA256 3985fd1810f660ea1c1f2732f719b069b6934d62d8d9e8a09287e63f049ba27d AUX code2color.patch 1110 RMD160 712f7b79c94f92ee62825d5f53627f18fae693d2 SHA1 a82f937f3a923b52adc4f14cfc9b641903884839 SHA256 a3887126826ef0b4b821bd97cf4e7abfc8b1c9280bf2bb18a2a4cec9a2973936 AUX less.envd 50 RMD160 e9d7b2497aa81e13b740dc765c0fc87d4f1f2f8e SHA1 f903d459e7f0b2c14009304bebb7a045a7cccf9d SHA256 1f186ac4f500c842a9016702b3d7e9d69fe161db23cf56c316ed7f5a51da6a4e -AUX lesspipe.sh 6963 RMD160 bdc14c2cfdf6133bbd5adcab6f68197536f94d9a SHA1 ea791f1dd9c24228687ec89ece8483e7acb41671 SHA256 ff7e735c3e39116b3f0912056ddfdd7eb4897145c7b7875c5f8c98f2087e76f3 +AUX lesspipe.sh 6950 RMD160 ce894b2204b2ede08814188cc452cf402225af5e SHA1 6173323a63bb79cd1ec63cf5eb7c1a3086120b12 SHA256 c2f5ce760f09e5dda96dca43a7c20aea789440d566c2b1ecbb48e259850dfefa DIST code2color 199875 RMD160 378d340a20c3fe500f19116220d54816fe279225 SHA1 b30526dd52c747b8bd6dcf53cf5cc94824c47feb SHA256 ce63f148293a81b0fe5e072f33285f9bf4f1d832f64b23a2220519674a47091d DIST less-418.tar.gz 299213 RMD160 a10402aa423e3d3c4d950735208991d7d4afb85d SHA1 ec4fb48680878a7ac3499c46564c47c448b0aa22 SHA256 f532fcd61b012379d3258196a8588fd9d51ecdfb5c795485ab2f78d439b103b4 DIST less-424.tar.gz 301027 RMD160 00e104a3ea04f6d7ba4d3a4fe9e4941ce52f897a SHA1 4072a7ff14deea15db9d177c781049ca9631a42d SHA256 30013dc34d37563e2d756fae6c6ff1009ea5af66d1b216d9906248073c02ea56 @@ -13,9 +13,9 @@ EBUILD less-424.ebuild 1193 RMD160 f432a437c83c31f8270ab6bee07151b821fcded2 SHA1 MISC ChangeLog 11554 RMD160 42929d17bfa37780dd3fce6da3117b197e8d4b10 SHA1 fb30e7b0a2eafa0806a576c389603b08808c9549 SHA256 94c57eee074218761cad4a9e6c851d4cad3fcf2184ed6a4c4b259d20dc98cadf MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.9 (GNU/Linux) +Version: GnuPG v2.0.10 (GNU/Linux) -iEYEARECAAYFAkmQfOAACgkQn/5bYzqsSmHKvwCfbyF6WEikMnDpFTh3Ut1M7ZjK -knMAn0906JUjC0s287mpQo5LQIwq4hmD -=6DJD +iEYEARECAAYFAkm59+sACgkQn/5bYzqsSmHIKgCgnL/+/TwV4XTuQtBuemFaVrik ++HIAmwW1nSGf0pwR4EPScgFLcMIKDS8g +=jZ9g -----END PGP SIGNATURE----- diff --git a/sys-apps/less/files/lesspipe.sh b/sys-apps/less/files/lesspipe.sh index 9d7b9c8c8105..dc378db53029 100644 --- a/sys-apps/less/files/lesspipe.sh +++ b/sys-apps/less/files/lesspipe.sh @@ -188,18 +188,13 @@ lesspipe() { exit 0 fi - # Only colorize if user forces it ... - if [[ ${LESSCOLOR} == "2" ]]; then + # 2: Only colorize if user forces it ... + # 1: ... or we know less will handle raw codes -- this will + # not detect -seiRM, so set LESSCOLORIZER yourself + if [[ ${LESSCOLOR} == "2" ]] || [[ " ${LESS} " == *" -"[rR]" "* ]] ; 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" - break - fi - done ;; # May not be such a good idea :) @@ -234,7 +229,7 @@ if [[ -z $1 ]] ; then echo "Usage: lesspipe.sh <file>" elif [[ $1 == "-V" || $1 == "--version" ]] ; then Id="cvsid" - cvsid="$Id: lesspipe.sh,v 1.33 2009/02/09 18:58:10 vapier Exp $" + cvsid="$Id: lesspipe.sh,v 1.34 2009/03/13 06:06:29 vapier Exp $" cat <<-EOF $cvsid Copyright 2001-2009 Gentoo Foundation |