bin help cleanup

This commit is contained in:
Brandon Black
2017-01-03 15:52:22 -08:00
parent e9ac71590f
commit f951ec07de
2 changed files with 26 additions and 7 deletions

View File

@@ -1,5 +1,7 @@
#!/usr/bin/env ruby
$LOAD_PATH[0, 0] = File.join(File.dirname(__FILE__), '..', 'lib')
require 'linguist'
require 'rugged'
require 'optparse'
@@ -102,10 +104,16 @@ def git_linguist(args)
commit = nil
parser = OptionParser.new do |opts|
opts.banner = "Usage: git-linguist [OPTIONS] stats|breakdown|dump-cache|clear|disable"
opts.banner = <<-HELP
Linguist v#{Linguist::VERSION}
Detect language type and determine language breakdown for a given Git repository.
Usage:
git-linguist [OPTIONS] stats|breakdown|dump-cache|clear|disable"
HELP
opts.on("-f", "--force", "Force a full rescan") { incremental = false }
opts.on("--commit=COMMIT", "Commit to index") { |v| commit = v}
opts.on("-c", "--commit=COMMIT", "Commit to index") { |v| commit = v}
end
parser.parse!(args)