Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 219169 Details for
Bug 304359
sys-apps/less: lesspipe.sh should color all file types
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
quick patch to color everything
lesspipe-color-everything.patch (text/plain), 2.05 KB, created by
Dror Levin (RETIRED)
on 2010-02-10 23:21:25 UTC
(
hide
)
Description:
quick patch to color everything
Filename:
MIME Type:
Creator:
Dror Levin (RETIRED)
Created:
2010-02-10 23:21:25 UTC
Size:
2.05 KB
patch
obsolete
>--- lesspipe-old.sh 2010-02-05 22:23:09.999047344 +0200 >+++ lesspipe.sh 2010-02-11 01:17:59.325669163 +0200 >@@ -175,34 +175,6 @@ > isoinfo -l ${iso_opts} -i "$1" > ;; > >- ### Source code ### >- *.awk|*.groff|*.java|*.js|*.m4|*.php|*.pl|*.pm|*.pod|*.sh|\ >- *.ad[asb]|*.asm|*.inc|*.[ch]|*.[ch]pp|*.[ch]xx|*.cc|*.hh|\ >- *.lsp|*.l|*.pas|*.p|*.xml|*.xps|*.xsl|*.axp|*.ppd|*.pov|\ >- *.diff|*.patch|*.py|*.rb|*.sql|*.ebuild|*.eclass) >- >- # 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=0;; # default to no color #188835 >- esac >- [[ ${LESSCOLORIZER+set} != "set" ]] && LESSCOLORIZER=code2color >- if [[ ${LESSCOLOR} == "0" ]] || [[ -z ${LESSCOLORIZER} ]] ; then >- # let less itself handle these files >- exit 0 >- fi >- >- # 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 >- ;; >- > # May not be such a good idea :) > # ### Device nodes ### > # /dev/[hs]d[a-z]*) >@@ -226,7 +198,26 @@ > lesspipe_file "$1" > fi > >- exit 0 >+ # 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=0;; # default to no color #188835 >+ esac >+ [[ ${LESSCOLORIZER+set} != "set" ]] && LESSCOLORIZER=code2color >+ if [[ ${LESSCOLOR} == "0" ]] || [[ -z ${LESSCOLORIZER} ]] ; then >+ # let less itself handle these files >+ exit 0 >+ fi >+ >+ # 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 > ;; > esac > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 304359
: 219169