docopt-compgen 1.3.1 → 1.4.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 +10 -2
- data/lib/docopt_compgen/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d80128550098ba94a9a1356e193321811a256fa4598af6e35ec352239a8ebae
|
4
|
+
data.tar.gz: 591f5fea08948f09ebe008d48e2efb05edf84659a9f51e413594ff1bca465bc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09ddc20292a5a3f9b6c047e41e35e63365dc80e5f4b077e8e85dc015520a72b222e3850dd1ca06b0865f68da2e8cea46127f1c70f95f4ddd7c7b4ba13609f8c6'
|
7
|
+
data.tar.gz: 8522dd62dd630bf968486038894061e3f151d0055ce6b5f81a781673bc8d7354688bcbb5b8b5e274d23bfa5d1a516dc4013e2bb235fa38d666993486bf632591
|
data/bin/docopt-compgen
CHANGED
@@ -2,12 +2,14 @@
|
|
2
2
|
trap(:SIGINT) { puts; exit 130 }
|
3
3
|
Signal.trap(:SIGPIPE, :SYSTEM_DEFAULT)
|
4
4
|
require 'docopt'
|
5
|
+
PROGRAM_NAME = File.basename($PROGRAM_NAME)
|
5
6
|
|
6
7
|
usage = <<~EOF
|
7
8
|
Usage:
|
8
|
-
#{
|
9
|
+
#{PROGRAM_NAME} [options] [<command>]
|
9
10
|
|
10
11
|
Options:
|
12
|
+
-o, --out PATH Output completion to PATH instead of stdout
|
11
13
|
--complete-short Complete short options (long options are always completed)
|
12
14
|
--command-name NAME Command name
|
13
15
|
If not specified then the slugified basename of <command> will be used
|
@@ -76,4 +78,10 @@ generator = DocoptCompgen::Generator.new(
|
|
76
78
|
namespace: opts['--namespace'],
|
77
79
|
)
|
78
80
|
|
79
|
-
|
81
|
+
output = generator.to_s
|
82
|
+
|
83
|
+
if opts['--out']
|
84
|
+
File.write(opts['--out'], output)
|
85
|
+
else
|
86
|
+
puts output
|
87
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docopt-compgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- crdx
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -68,7 +68,7 @@ files:
|
|
68
68
|
- lib/docopt_compgen/version.rb
|
69
69
|
homepage: https://github.com/crdx/docopt-compgen
|
70
70
|
licenses:
|
71
|
-
-
|
71
|
+
- GPLv3
|
72
72
|
metadata:
|
73
73
|
rubygems_mfa_required: 'true'
|
74
74
|
post_install_message:
|
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
requirements: []
|
89
|
-
rubygems_version: 3.
|
89
|
+
rubygems_version: 3.3.25
|
90
90
|
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: docopt completion generator
|