bat: specify syntax highlighting language

This commit is contained in:
Oystein Kristoffer Tveit 2022-11-29 15:49:27 +01:00
parent e17274e94d
commit 5ba23966e1
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
2 changed files with 4 additions and 4 deletions

View File

@ -60,9 +60,9 @@ let
if [ $? != 0 ]; then
EXAMPLE_DATA=$(echo $JSON_DATA | ${jq} -r ".example" | ${json2nix}/bin/json2nix)
fi
export EXAMPLE=$(echo $EXAMPLE_DATA | ${bat} ${batColorArg}--style=numbers)
export EXAMPLE=$(echo $EXAMPLE_DATA | ${bat} ${batColorArg}--style=numbers -lnix)
export DEFAULT=$(echo $JSON_DATA | ${jq} -r ".default" | ${json2nix}/bin/json2nix | ${bat} ${batColorArg}--style=numbers)
export DEFAULT=$(echo $JSON_DATA | ${jq} -r ".default" | ${json2nix}/bin/json2nix | ${bat} ${batColorArg}--style=numbers -lnix)
echo $JSON_DATA | ${gomplate} --datasource opt=stdin:?type=application/json --file ${template}
'';

View File

@ -60,9 +60,9 @@ let
if [ $? != 0 ]; then
EXAMPLE_DATA=$(echo $JSON_DATA | ${jq} -r ".example" | ${json2nix}/bin/json2nix)
fi
export EXAMPLE=$(echo $EXAMPLE_DATA | ${nixfmt} | ${bat} ${batColorArg}--style=numbers)
export EXAMPLE=$(echo $EXAMPLE_DATA | ${nixfmt} | ${bat} ${batColorArg}--style=numbers -lnix)
export DEFAULT=$(echo $JSON_DATA | ${jq} -r ".default" | ${json2nix}/bin/json2nix | ${nixfmt} | ${bat} ${batColorArg}--style=numbers)
export DEFAULT=$(echo $JSON_DATA | ${jq} -r ".default" | ${json2nix}/bin/json2nix | ${nixfmt} | ${bat} ${batColorArg}--style=numbers -lnix)
echo $JSON_DATA | ${gomplate} --datasource opt=stdin:?type=application/json --file ${template}
'';