docopt-compgen 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 103012accedc24a80a1e2b0eb8ac00fdb3658fb0fd494003229c7bb25e64f06a
4
- data.tar.gz: b0870a87c8857e56593758bd08ef202c60432992fba0227839f8a9f0af7350f5
3
+ metadata.gz: 44bcf88d3208f5870a54bd566bddbdbf010a6be6a9d656c9875b36301714b519
4
+ data.tar.gz: af8eefcae73223d825ab8cb2ca2e8db2312912f4f4bac89bac047ddcd477b131
5
5
  SHA512:
6
- metadata.gz: badc6aa911b06d735aeacc1003c7993b44307662896c74db3a9bb12e2b9357b18914934468a844c6740703b9bced7a14dea48dca2c92500065ee43f1563ab024
7
- data.tar.gz: f4f8247ebd0f8ef109717e3cb7350762d7ef43d45fd8bf287974ab829943c02c6c6b03b338bb03c861efec6e5f585d02aca6f4a243d33a54f8fd84a3a9012886
6
+ metadata.gz: 59c215aaaf9033dad335fd5965caa7320d6dd0e59d2cc3716d34e0c8c2da31315d9f40c359194da5f58987f4b8b42f4b88b15a7ccbf9423b0e02d07f73ccc4cb
7
+ data.tar.gz: 8a3d52b71f8e1ddf062d2097ae2d7ad9e4f360e7a7d239ba7e1ffe7b561891df490c1545b9c71bc20872cdafd51b04b859594a92ed378cb308d5c165404b6e5f
data/bin/docopt-compgen CHANGED
@@ -12,6 +12,7 @@ usage = <<~EOF
12
12
  --command-name NAME Command name
13
13
  If not specified then the slugified basename of <command> will be used
14
14
  --namespace NAME Prefix for generated bash functions [default: cmd]
15
+ -v, --version Show version
15
16
  -h, --help Show help
16
17
  EOF
17
18
 
@@ -22,6 +23,13 @@ rescue Docopt::Exit
22
23
  exit 2
23
24
  end
24
25
 
26
+ require_relative '../lib/docopt_compgen'
27
+
28
+ if opts['--version']
29
+ puts DocoptCompgen::VERSION
30
+ exit
31
+ end
32
+
25
33
  require 'colorize'
26
34
 
27
35
  def extract_command_name(usage)
@@ -60,8 +68,6 @@ if usage.nil? || usage.lines.first !~ /Usage:/
60
68
  exit 1
61
69
  end
62
70
 
63
- require_relative '../lib/docopt_compgen'
64
-
65
71
  parser = DocoptCompgen::Parser.new(usage, complete_short: opts['--complete-short'])
66
72
  generator = DocoptCompgen::Generator.new(
67
73
  command,
@@ -1,3 +1,3 @@
1
1
  module DocoptCompgen
2
- VERSION = '1.2.1'
2
+ VERSION = '1.3.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docopt-compgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - crdx