Skip to content

Commit 65c7b15

Browse files
committed
add --no-header option for moon-tags
1 parent fbd8ad4 commit 65c7b15

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/moon-tags

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ parser = argparse "moon-tags", "Generate ctags style tags file for MoonScript fi
1818
parser\argument("files", "MoonScript files to generate tags for")\args "+"
1919
parser\flag "--include-line", "Include line number field for each tag"
2020
parser\flag "--lapis", "Support extracting lapis routes"
21+
parser\flag "--no-header", "Don't print the header"
2122

2223
args = parser\parse [v for _, v in ipairs _G.arg]
2324

@@ -190,7 +191,9 @@ for fname in *args.files
190191
table.concat fields, " "
191192
}
192193

193-
print HEADER
194+
unless args.no_header
195+
print HEADER
196+
194197
tag_lines = [table.concat(t, "\t") for t in *TAGS]
195198
table.sort tag_lines
196199
print table.concat tag_lines, "\n"

0 commit comments

Comments
 (0)