From 5ba23966e1f74a57beb53c86c47bb47a070820a4 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 29 Nov 2022 15:49:27 +0100 Subject: [PATCH] bat: specify syntax highlighting language --- searchers/home-manager-search.nix | 4 ++-- searchers/nix-option-search.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/searchers/home-manager-search.nix b/searchers/home-manager-search.nix index fb77f07..0e7e3e6 100644 --- a/searchers/home-manager-search.nix +++ b/searchers/home-manager-search.nix @@ -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} ''; diff --git a/searchers/nix-option-search.nix b/searchers/nix-option-search.nix index 85bbb93..e644150 100644 --- a/searchers/nix-option-search.nix +++ b/searchers/nix-option-search.nix @@ -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} '';