cache supported lexers for pygments

This commit is contained in:
Alexander 2025-06-24 14:29:38 -04:00
parent af97adacbe
commit fba9f88956
6 changed files with 10 additions and 5 deletions

View file

@ -1,6 +1,6 @@
#! /usr/bin/env sh
if [ $# -lt 1 ] || ! pygmentize -L lexers | grep -qw "$1"; then
if [ $# -lt 1 ] || ! grep -qw "$1" lexers.out; then
recode utf8..html
else
pygmentize -l $1 -f html | head -c -13 | awk -F '<pre>' '{print $NF}'