Trim excess blank lines before feeding to indent

This commit is contained in:
Bruce Hill 2024-09-05 12:51:53 -04:00
parent e1d0927744
commit 443af763f4

2
tomo.c
View File

@ -92,7 +92,7 @@ int main(int argc, char *argv[])
CORD home = ENV_CORD("HOME");
autofmt = ENV_CORD("AUTOFMT");
if (!autofmt) autofmt = "indent -kr -l100 -nbbo -nut -sob";
if (!autofmt) autofmt = "sed '/^\\s*$/d' | indent -kr -l100 -nbbo -nut -sob";
if (!autofmt[0]) autofmt = "cat";
verbose = (getenv("VERBOSE") && (streq(getenv("VERBOSE"), "1") || streq(getenv("VERBOSE"), "2")));