From ae4670bd8e0e45985e43402f246e4219cd29fcaa Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 21 Jul 2018 14:43:49 -0700 Subject: Improvements working towards better inline tests. Improved handling of file spoofing and adding -e command line flag for executing a string. --- tools/autoformat.nom | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/autoformat.nom') diff --git a/tools/autoformat.nom b/tools/autoformat.nom index acabefb..1c591a0 100755 --- a/tools/autoformat.nom +++ b/tools/autoformat.nom @@ -10,10 +10,11 @@ if (%args.1 is "-i"): for %path in %args: for file %filename in %path: + unless (%filename matches "%.nom$"): do next %filename %formatted = ".." #!/usr/bin/env nomsu -V\(Nomsu version) \((parse (read file %filename) from %filename) as nomsu) if %inplace: write %formatted to file %filename - ..else: say %formatted \ No newline at end of file + ..else: say %formatted -- cgit v1.2.3