cgag / loc

Count lines of code quickly.
MIT License
2.31k stars 126 forks source link

Allow multiple targets #12

Closed ghost closed 7 years ago

ghost commented 7 years ago

With cloc I can do the following: cloc $(git ls-files)

But loc expects only a single target:

$ loc $(git ls-files)
error: Found argument 'CHANGELOG' which wasn't expected, or isn't valid in this context

Also happens for wildcards:

$ loc *.php
error: Found argument 'export.php' which wasn't expected, or isn't valid in this context

Where export.php was the second file in the directory I ran the command in.

cgag commented 7 years ago

Everything internally is coded assuming that I have an array of targets. I was sure this worked. I must have misconfigured the argument parsing, will definitely take a look tonight.

cgag commented 7 years ago

Fixed here: https://github.com/cgag/loc/commit/13159bfbe82af4ad901943b048d3cf11404359e5

I must have accidentally deleted that line at some point.