11 lines
No EOL
255 B
Bash
Executable file
11 lines
No EOL
255 B
Bash
Executable file
#! /usr/bin/env bash
|
|
|
|
if [[ "$#" -lt 2 ]]; then
|
|
printf "<code>$(cat)</code>"
|
|
fi
|
|
|
|
if grep -qw ${name:-} <<< $(pygmentize -L lexers); then
|
|
pygmentize -l $1 -f html | head -c -13 | awk -F '<pre>' '{print $NF}'
|
|
else
|
|
printf "<code>$(cat)</code>"
|
|
fi |