add options
This commit is contained in:
parent
a535f4eb03
commit
5add145cef
@ -1,4 +1,25 @@
|
|||||||
require "colorize"
|
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"
|
CONFIG_PATH = "#{ENV["HOME"]}/.config/emilecok/git-ahead-check"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user