From 49f29a53c05bac3835ecfdd0e9c768f7fc0258a3 Mon Sep 17 00:00:00 2001 From: Ted Nyman Date: Sun, 29 Dec 2013 23:56:13 -0800 Subject: [PATCH] Nicer breakdown output --- README.md | 18 ++++++++++++++---- bin/linguist | 6 +++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 56ba5192..667dafa1 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,21 @@ These stats are also printed out by the `linguist` binary. You can use the You can try running `linguist` on the `lib/` directory in this repository itself: $ bundle exec linguist lib/ --breakdown - 100% Ruby - Ruby: ["linguist/blob_helper.rb", "linguist/classifier.rb", "linguist/file_blob.rb", "linguist/generated.rb", - "linguist/heuristics.rb", "linguist/language.rb", "linguist/md5.rb", "linguist/repository.rb", - "linguist/samples.rb", "linguist/tokenizer.rb", "linguist.rb"] + 100.00% Ruby + + Ruby: + linguist/blob_helper.rb + linguist/classifier.rb + linguist/file_blob.rb + linguist/generated.rb + linguist/heuristics.rb + linguist/language.rb + linguist/md5.rb + linguist/repository.rb + linguist/samples.rb + linguist/tokenizer.rb + linguist.rb #### Ignore vendored files diff --git a/bin/linguist b/bin/linguist index 382e43e8..2cfa8064 100755 --- a/bin/linguist +++ b/bin/linguist @@ -28,7 +28,11 @@ if File.directory?(path) puts file_breakdown = repo.breakdown_by_file file_breakdown.each do |lang, files| - puts "#{lang}: #{files}" + puts "#{lang}:" + files.each do |file| + puts file + end + puts end end elsif File.file?(path)