diff --git a/README.md b/README.md index 0134146..5d04a4d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,17 @@ -`qloc` does a quick line count ignoring binary file types. +`qloc` does a quick line count over files. + +Example output for this folder: + +``` +extension files binary blank code +---------------------------------------------------------------- +go 3 0 43 211 + 1 0 5 20 +gitignore 1 0 5 19 +md 1 0 1 5 +---------------------------------------------------------------- +summary 6 0 54 255 +``` To install: ``` diff --git a/main.go b/main.go index df6b6ea..fb3be02 100644 --- a/main.go +++ b/main.go @@ -117,7 +117,8 @@ func IterateDir(root string, work chan string) { return nil } - if strings.Contains(path, "~") { + // if a filename contains ~ we assume it's a temporary file + if strings.Contains(filepath.Base(path), "~") { return nil }