diff --git a/src/git-ahead-check.cr b/src/git-ahead-check.cr index f3abe06..89137cf 100644 --- a/src/git-ahead-check.cr +++ b/src/git-ahead-check.cr @@ -1,4 +1,25 @@ require "colorize" +require "option_parser" + +VERSION = {{ `shards version "#{__DIR__}"`.chomp.stringify }} + +begin + OptionParser.parse do |parser| + parser.banner = "The very simple password manager for humans\n" + + parser.on "-h", "--help", "Show help" do + puts parser + exit(0) + end + + parser.on "-v", "Show version" do + puts VERSION + exit(0) + end + end +rescue ex + puts ex.message, "" +end CONFIG_PATH = "#{ENV["HOME"]}/.config/emilecok/git-ahead-check"