mirror of
https://github.com/CoeJoder/lessfilter-pygmentize.git
synced 2025-11-08 13:13:48 -05:00
Update .lessfilter to Pygments v2.10.0
This commit is contained in:
122
.lessfilter
122
.lessfilter
@@ -1,24 +1,27 @@
|
||||
#!/bin/bash
|
||||
# uses Pygments v2.9.0 for syntax highlighting on applicable file types
|
||||
# uses Pygments v2.10.0 for syntax highlighting on applicable file types
|
||||
for path in "$@"; do
|
||||
# match by known filenames
|
||||
filename=$(basename "$path")
|
||||
case "$filename" in
|
||||
.bash_aliases|.bash_environment|.bash_login|.bash_logout|\
|
||||
.bash_profile|.cshdirs|.cshrc|.kshrc|.profile|.tcshrc|.zlogin|\
|
||||
.zlogout|.zprofile|bash.bashrc|csh.cshrc|csh.login|csh.logout|\
|
||||
ksh.kshrc|zlogin|zlogout|zprofile)
|
||||
.bash_profile|.cshdirs|.cshrc|.profile|.tcshrc|.zlogin|.zlogout|\
|
||||
.zprofile|bash.bashrc|csh.cshrc|csh.login|csh.logout|ksh.kshrc|zlogin|\
|
||||
zlogout|zprofile)
|
||||
# shell lexer
|
||||
pygmentize -f 256 -O style="$PYGMENTIZE_STYLE" -l sh "$path"
|
||||
;;
|
||||
.Renviron|.Rhistory|.Rprofile|.bashrc|.exrc|.gvimrc|.htaccess|.vimrc|\
|
||||
.zshrc|BUCK|BUILD|BUILD.bazel|CMakeLists.txt|Dockerfile|GNUmakefile|\
|
||||
Gemfile|Kconfig*|Makefile|Makefile.*|PKGBUILD|Pipfile|Pipfile.lock|\
|
||||
Rakefile|SConscript|SConstruct|Singularity|WORKSPACE|apache.conf|\
|
||||
apache2.conf|autodelegate|autohandler|bashrc|control|dhandler|exrc|\
|
||||
external.in*|gvimrc|lighttpd.conf|makefile|nginx.conf|pacman.conf|\
|
||||
poetry.lock|sources.list|squid.conf|standard-modules.in|termcap|\
|
||||
termcap.src|terminfo|terminfo.src|todo.txt|vimrc|xorg.conf|zshrc)
|
||||
.Renviron|.Rhistory|.Rprofile|.SRCINFO|.bashrc|.editorconfig|.exrc|\
|
||||
.gvimrc|.htaccess|.kshrc|.vimrc|.zshrc|BUCK|BUILD|BUILD.bazel|\
|
||||
CMakeLists.txt|Dockerfile|GNUmakefile|Gemfile|Kconfig*|Makefile|\
|
||||
Makefile.*|PKGBUILD|Pipfile|Pipfile.lock|Procfile|Rakefile|SConscript|\
|
||||
SConstruct|Singularity|Vagrantfile|WORKSPACE|apache.conf|apache2.conf|\
|
||||
autodelegate|autohandler|bashrc|control|dhandler|exrc|external.in*|\
|
||||
gvimrc|iddsa|idecdsa|idecdsask|ided25519|ided25519sk|idrsa|kshrc|\
|
||||
lighttpd.conf|makefile|meson.build|mesonoptions.txt|nginx.conf|\
|
||||
pacman.conf|poetry.lock|sources.list|squid.conf|standard-modules.in|\
|
||||
termcap|termcap.src|terminfo|terminfo.src|todo.txt|vimrc|xorg.conf|\
|
||||
zshrc)
|
||||
# filename recognized
|
||||
pygmentize -f 256 -O style="$PYGMENTIZE_STYLE" "$path"
|
||||
;;
|
||||
@@ -26,59 +29,62 @@ for path in "$@"; do
|
||||
ext=$([[ "$filename" = *.* ]] && echo ".${filename##*.}" || echo '')
|
||||
case "$ext" in
|
||||
.6pl|.6pm|.ABAP|.ASM|.BAS|.C|.CBL|.COB|.CPP|.CPY|.F|.F03|.F90|\
|
||||
.G|.H|.ICON|.PRG|.R|.Rd|.Rout|.S|.SAS|.VBS|.[1234567]|.abap|\
|
||||
.abnf|.ada|.adb|.adl|.adlf|.adls|.adlx|.ado|.ads|.agda|.aheui|\
|
||||
.ahk|.ahkl|.aj|.als|.ans|.apl|.aplc|.aplf|.apli|.apln|.aplo|\
|
||||
.applescript|.arexx|.arw|.as|.asax|.ascx|.ashx|.asm|.asmx|\
|
||||
.aspx|.asy|.at|.au3|.aug|.aux|.awk|.axd|.b|.bare|.bas|.bash|\
|
||||
.bat|.bb|.bbc|.bc|.befunge|.bf|.bib|.bmx|.bnf|.boa|.boo|.bpl|\
|
||||
.bro|.bst|.bug|.bzl|.c|.c++|.c++-objdump|.c-objdump|.cadl|\
|
||||
.camkes|.capnp|.cbl|.cc|.cddl|.cdf|.cdl|.ceylon|.cf|.cfc|.cfg|\
|
||||
.cfm|.cfml|.chai|.chpl|.ci|.cirru|.cjs|.cl|.clay|.clj|.cljs|\
|
||||
.cls|.cmake|.cmd|.cob|.coffee|.cp|.cpp|.cpp-objdump|.cps|\
|
||||
.cpsa|.cpy|.cr|.crmsh|.croc|.cry|.cs|.csd|.csh|.css|.css.in|\
|
||||
.cu|.cuh|.cw|.cxx|.cxx-objdump|.cyp|.cypher|.d|.d-objdump|\
|
||||
.darcspatch|.dart|.dasm|.dasm16|.dcl|.decls|.def|.dg|.di|\
|
||||
.diff|.dmesg|.do|.docker|.dot|.dpatch|.dpr|.dtd|.dts|.dtsi|\
|
||||
.duby|.duel|.dyalog|.dyl|.dylan|.dylan-console|.e|.ebnf|\
|
||||
.ebuild|.ec|.ecl|.eclass|.edp|.eex|.eg|.eh|.el|.elm|.eml|.eps|\
|
||||
.erl|.erl-sh|.es|.escript|.evoque|.ex|.exec|.exheres-0|.exlib|\
|
||||
.exs|.ezt|.f|.f03|.f90|.factor|.fan|.fancypack|.feature|\
|
||||
.fhtml|.fish|.flo|.flx|.flxh|.fnl|.frag|.frt|.fs|.fsi|.fst|\
|
||||
.fsti|.fun|.fut|.fy|.g|.gap|.gcode|.gd|.gdc|.gemspec|.geo|.gi|\
|
||||
.go|.golo|.gradle|.graph|.groovy|.gs|.gsp|.gst|.gsx|.gv|.h|\
|
||||
.G|.H|.ICON|.PRG|.R|.Rd|.Rout|.S|.SAS|.VBS|.[1234567]|\
|
||||
.[gs]sed|.abap|.abnf|.ada|.adb|.adl|.adlf|.adls|.adlx|.ado|\
|
||||
.ads|.aes|.agda|.aheui|.ahk|.ahkl|.aj|.als|.ans|.apl|.aplc|\
|
||||
.aplf|.apli|.apln|.aplo|.applescript|.arexx|.arw|.as|.asax|\
|
||||
.asc|.ascx|.ashx|.asm|.asmx|.aspx|.asy|.at|.au3|.aug|\
|
||||
.automount|.aux|.awk|.axd|.b|.bare|.bas|.bash|.bat|.bb|.bbc|\
|
||||
.bc|.befunge|.bf|.bib|.bmx|.bnf|.boa|.boo|.bpl|.bro|.bst|.bug|\
|
||||
.bzl|.c|.c++|.c++-objdump|.c-objdump|.cadl|.camkes|.capnp|\
|
||||
.cbl|.cc|.cddl|.cdf|.cdl|.ceylon|.cf|.cfc|.cfg|.cfm|.cfml|\
|
||||
.chai|.chpl|.ci|.cirru|.cjs|.cl|.clay|.clj|.cljs|.cls|.cmake|\
|
||||
.cmd|.cob|.coffee|.cp|.cpp|.cpp-objdump|.cps|.cpsa|.cpy|.cr|\
|
||||
.crmsh|.croc|.cry|.cs|.csd|.csh|.css|.css.in|.cu|.cuh|.cw|\
|
||||
.cxx|.cxx-objdump|.cyp|.cypher|.d|.d-objdump|.darcspatch|\
|
||||
.dart|.dasm|.dasm16|.dcl|.decls|.def|.device|.dg|.di|.diff|\
|
||||
.dmesg|.do|.docker|.dot|.dpatch|.dpr|.dtd|.dts|.dtsi|.duby|\
|
||||
.duel|.dyalog|.dyl|.dylan|.dylan-console|.e|.ebnf|.ebuild|.ec|\
|
||||
.ecl|.eclass|.edp|.eex|.eg|.eh|.el|.elm|.eml|.eps|.erl|\
|
||||
.erl-sh|.es|.escript|.evoque|.ex|.exec|.exheres-0|.exlib|.exs|\
|
||||
.ezt|.f|.f03|.f90|.factor|.fan|.fancypack|.feature|.fhtml|\
|
||||
.fish|.flo|.flx|.flxh|.fnl|.frag|.frt|.fs|.fsi|.fst|.fsti|\
|
||||
.fun|.fut|.fy|.g|.gap|.gcode|.gd|.gdc|.gemspec|.geo|.gi|.go|\
|
||||
.golo|.gradle|.graph|.groovy|.gs|.gsp|.gsql|.gst|.gsx|.gv|.h|\
|
||||
.h++|.haml|.handlebars|.hbs|.hdp|.hh|.hlsl|.hlsli|.hpp|.hrl|\
|
||||
.hs|.hsail|.htm|.html|.hx|.hxml|.hxsl|.hxx|.hy|.hyb|.i|.i6t|\
|
||||
.i7x|.icl|.icn|.icon|.idc|.idl|.idl4|.idr|.ijs|.ik|.inc|.inf|\
|
||||
.ini|.ino|.instances|.intr|.io|.ipf|.isa|.j|.jade|.jag|.java|\
|
||||
.jbst|.jcl|.jl|.js|.js.in|.jsgf|.jsm|.json|.jsonld|.jsp|\
|
||||
.jbst|.jcl|.jl|.js|.js.in|.jsgf|.jslt|.jsm|.json|.jsonld|.jsp|\
|
||||
.juttle|.jy|.kal|.kid|.kif|.kk|.kki|.kmsg|.kn|.ksh|.kt|.kts|\
|
||||
.lagda|.lasso|.lasso[89]|.lcry|.lean|.leex|.less|.lgt|.lhs|\
|
||||
.lid|.lidr|.liquid|.lisp|.ll|.load|.logtalk|.ls|.lsl|.lsp|\
|
||||
.lua|.m|.ma|.mac|.mak|.man|.mao|.maql|.markdown|.mask|.mc|.md|\
|
||||
.mhtml|.mi|.mir|.mjs|.mk|.ml|.mli|.mll|.mly|.mm|.mo|.mod|\
|
||||
.monkey|.moo|.moon|.mos|.mq4|.mq5|.mqh|.ms|.msc|.mt|.mu|.mxml|\
|
||||
.myt|.n|.nb|.nbp|.nc|.ncl|.ng2|.ni|.nim|.nimrod|.nit|.nix|.nl|\
|
||||
.nqp|.ns2|.nsh|.nsi|.nt|.objdump|.objdump-intel|.odin|.ooc|\
|
||||
.opa|.orc|.p|.p6|.p6l|.p6m|.pan|.pas|.patch|.pc|.pcmk|.peg|\
|
||||
.perl|.php|.php[345]|.phtml|.pidl|.pig|.pike|.pl|.pl6|.plot|\
|
||||
.plt|.pm|.pm6|.pmod|.po|.pony|.pot|.pov|.pp|.praat|.prg|.pro|\
|
||||
.proc|.prolog|.promql|.properties|.proto|.ps|.ps1|.psc|.psi|\
|
||||
.psl|.psm1|.ptls|.pug|.pwn|.pxd|.pxi|.py|.py2tb|.py3tb|\
|
||||
.pypylog|.pytb|.pyw|.pyx|.qbs|.qml|.qvto|.r|.r3|.rake|.raku|\
|
||||
.rakudoc|.rakumod|.rakutest|.rb|.rbw|.rbx|.re|.reb|.red|.reds|\
|
||||
.reg|.rei|.rest|.rex|.rexx|.rhtml|.ride|.rkt|.rktd|.rktl|.rl|\
|
||||
.rnc|.robot|.rpf|.rq|.rql|.rs|.rs.in|.rsl|.rss|.rst|.rts|.run|\
|
||||
.rvt|.rx|.s|.sage|.sarl|.sas|.sass|.sbl|.sc|.scala|.scaml|\
|
||||
.scd|.scdoc|.sce|.sci|.scm|.sco|.scss|.sgf|.sh|.sh-session|\
|
||||
.shell-session|.shen|.shex|.sieve|.sig|.sil|.siv|.sl|.sla|\
|
||||
.slim|.sls|.smali|.sml|.smv|.snobol|.sol|.sp|.sparql|.spec|\
|
||||
.spt|.sql|.sqlite3-console|.ss|.ssp|.st|.stan|.sv|.svh|.swg|\
|
||||
.swift|.t|.tac|.tap|.tasm|.tcl|.tcsh|.tea|.teal|.tex|.tf|\
|
||||
.thrift|.thy|.ti|.tid|.tmpl|.tnt|.toc|.todotxt|.toml|.tpl|\
|
||||
.treetop|.ts|.tst|.tsx|.tt|.ttl|.twig|.txt|.typoscript|.u|.u1|\
|
||||
.u2|.udo|.usd|.usda|.v|.vala|.vapi|.vark|.vb|.vbs|.vcl|.vert|\
|
||||
.vhd|.vhdl|.vim|.vm|.vpr|.wast|.wat|.wdiff|.webidl|\
|
||||
.lua|.ly|.m|.ma|.mac|.mak|.man|.mao|.maql|.markdown|.mask|\
|
||||
.max|.mc|.md|.mhtml|.mi|.mir|.mjs|.mk|.ml|.mli|.mll|.mly|.mm|\
|
||||
.mo|.mod|.monkey|.moo|.moon|.mos|.mount|.mq4|.mq5|.mqh|.ms|\
|
||||
.msc|.mt|.mu|.mxml|.myt|.n|.nb|.nbp|.nc|.ncl|.ng2|.ni|.nim|\
|
||||
.nimrod|.nit|.nix|.nl|.nqp|.ns2|.nsh|.nsi|.nt|.objdump|\
|
||||
.objdump-intel|.odin|.ooc|.opa|.orc|.p|.p6|.p6l|.p6m|.pan|\
|
||||
.pas|.patch|.path|.pc|.pcmk|.peg|.pem|.perl|.php|.php[345]|\
|
||||
.phtml|.pidl|.pig|.pike|.pl|.pl6|.plot|.plt|.pm|.pm6|.pmod|\
|
||||
.po|.pony|.pot|.pov|.pp|.praat|.prg|.pro|.proc|.prolog|\
|
||||
.promql|.properties|.proto|.ps|.ps1|.psc|.psi|.psl|.psm1|\
|
||||
.ptls|.pug|.pwn|.pxd|.pxi|.py|.py2tb|.py3tb|.pypylog|.pytb|\
|
||||
.pyw|.pyx|.qbs|.qml|.qvto|.r|.r3|.rake|.raku|.rakudoc|\
|
||||
.rakumod|.rakutest|.rb|.rbw|.rbx|.re|.reb|.red|.reds|.reg|\
|
||||
.rei|.rest|.rex|.rexx|.rhtml|.ride|.rkt|.rktd|.rktl|.rl|.rnc|\
|
||||
.robot|.rpf|.rq|.rql|.rs|.rs.in|.rsl|.rss|.rst|.rts|.run|.rvt|\
|
||||
.rx|.s|.sage|.sarl|.sas|.sass|.savi|.sbl|.sc|.scala|.scaml|\
|
||||
.scd|.scdoc|.sce|.sci|.scm|.sco|.scope|.scss|.sed|.service|\
|
||||
.sgf|.sh|.sh-session|.shell-session|.shen|.shex|.sieve|.sig|\
|
||||
.sil|.siv|.sl|.sla|.slice|.slim|.sls|.smali|.smithy|.sml|.smv|\
|
||||
.snobol|.socket|.sol|.sp|.sparql|.spec|.spt|.sql|\
|
||||
.sqlite3-console|.ss|.ssp|.st|.stan|.sv|.svh|.swap|.swg|\
|
||||
.swift|.t|.tac|.tap|.target|.tasm|.tcl|.tcsh|.tea|.teal|.tex|\
|
||||
.tf|.thrift|.thy|.ti|.tid|.timer|.tmpl|.tnt|.toc|.todotxt|\
|
||||
.toml|.tpl|.treetop|.ts|.tst|.tt|.ttl|.twig|.txt|.typoscript|\
|
||||
.u|.u1|.u2|.udo|.usd|.usda|.v|.vala|.vapi|.vark|.vb|.vbs|.vcl|\
|
||||
.vert|.vhd|.vhdl|.vim|.vm|.vpr|.wast|.wat|.wdiff|.webidl|\
|
||||
.weechatlog|.whiley|.wlua|.wsdl|.wsf|.x|.x10|.xhtml|.xi|.xm|\
|
||||
.xmi|.xml|.xpl|.xq|.xql|.xqm|.xquery|.xqy|.xsd|.xsl|.xslt|\
|
||||
.xtend|.xtm|.xul.in|.yaml|.yang|.yml|.zeek|.zep|.zig|.zsh|\
|
||||
|
||||
@@ -49,7 +49,7 @@ export LESSOPEN='|~/.lessfilter %s'
|
||||
|
||||
### 4. Create ~/.lessfilter
|
||||
Run [main.py](main.py) to generate the latest `.lessfilter` file and place it in your home directory.
|
||||
Or you can download a pre-generated [.lessfilter](.lessfilter) which is currently at version `2.9.0`.
|
||||
Or you can download a pre-generated [.lessfilter](.lessfilter) which is currently at version `2.10.0`.
|
||||
Check your program version by running `pygmentize -V` to ensure that it is this version or newer.
|
||||
|
||||
### 5. Make ~/.lessfilter executable
|
||||
|
||||
Reference in New Issue
Block a user