aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-11 14:19:27 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-11 14:19:27 -0500
commitc6e7f7259670e680fb9604e7642d317b1d263956 (patch)
tree6ce6ea83850e7d74706b2229189e30ee3dedfc35
parent536c161b7489c7922eecd7c389db11383448dbee (diff)
Tweaks
-rw-r--r--nextlang.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nextlang.c b/nextlang.c
index e65c0f3f..b67360ac 100644
--- a/nextlang.c
+++ b/nextlang.c
@@ -20,7 +20,7 @@ int main(int argc, char *argv[])
errx(1, "Couldn't set printf specifier");
const char *autofmt = getenv("AUTOFMT");
- if (!autofmt) autofmt = "indent -kr -nut | bat --file-name=out.c";
+ if (!autofmt) autofmt = "indent -kr -nut";
setenv("SSSPATH", ".", 0);
@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
program = CORD_cat(program, "return 0;\n}\n");
if (verbose) {
- FILE *out = popen(autofmt, "w");
+ FILE *out = popen(heap_strf("%s | bat --file-name=program.c", autofmt), "w");
CORD_put(program, out);
fclose(out);
}