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 +4 -4
- data/bin/docopt-compgen +8 -2
- data/lib/docopt_compgen/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44bcf88d3208f5870a54bd566bddbdbf010a6be6a9d656c9875b36301714b519
|
4
|
+
data.tar.gz: af8eefcae73223d825ab8cb2ca2e8db2312912f4f4bac89bac047ddcd477b131
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,
|