add options

This commit is contained in:
Alexander Popov 2022-08-13 16:16:01 +03:00
parent a535f4eb03
commit 5add145cef
Signed by: iiiypuk
GPG Key ID: D8C9B59A9F04A70C
1 changed files with 21 additions and 0 deletions

View File

@ -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"