simple-cli 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/simple/cli/runner/autocompletion.rb +9 -7
- data/lib/simple/cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fe1d22e8204e5a34ef9b543d0357d17dc7c5b5b
|
4
|
+
data.tar.gz: 7211fa7d521310ea21a4646327fe78845e274412
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3917ea01b33fff5dd5826c69334fe9138bd97c9fccabf4877d70b0a9406bdde6d485354ebfdbcf204e2b4e30142ebc16f5d199648127b0445e25594ecde9367
|
7
|
+
data.tar.gz: aa8fa6cd5c1af25df3596c95411fcaa5449e3c3aaf3f15da7f62bf4ca886d7592b1f28533beb116d1e490bbe130e7f5faea93f188f1012975a569c95296242ab
|
data/Gemfile.lock
CHANGED
@@ -31,13 +31,15 @@ module Simple::CLI::Runner::Autocompletion
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def autocomplete_subcommand_options(subcommand, cur)
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
34
|
+
if subcommand == "help"
|
35
|
+
completions = commands.map(&:to_s).map { |s| s.tr("_", ":") } + ["autocomplete"]
|
36
|
+
filter_completions completions, prefix: cur
|
37
|
+
elsif cur[0,1] == "-"
|
38
|
+
completions = CommandHelp.option_names(@app, string_to_command(subcommand))
|
39
|
+
filter_completions completions, prefix: cur
|
40
|
+
else
|
41
|
+
Dir.glob "#{cur}*"
|
42
|
+
end
|
41
43
|
end
|
42
44
|
|
43
45
|
def autocomplete_help
|
data/lib/simple/cli/version.rb
CHANGED