aboutsummaryrefslogtreecommitdiff
path: root/tomo.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-05 12:51:53 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-05 12:51:53 -0400
commit443af763f4739c905c0b371691c3c5e71660252d (patch)
treec5bc676340916808e87901ef1e52f16729c164ed /tomo.c
parente1d0927744cb86ae3636dedc8473c405a0870ac4 (diff)
Trim excess blank lines before feeding to indent
Diffstat (limited to 'tomo.c')
-rw-r--r--tomo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tomo.c b/tomo.c
index 6371a25f..0bcdb29b 100644
--- a/tomo.c
+++ b/tomo.c
@@ -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")));