ddbcli 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/ddbcli +1 -1
- data/lib/ddbcli/cli/help.rb +10 -6
- data/lib/ddbcli/cli/options.rb +0 -2
- metadata +1 -1
data/bin/ddbcli
CHANGED
data/lib/ddbcli/cli/help.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'tempfile'
|
2
2
|
|
3
|
-
def print_help
|
3
|
+
def print_help(options = {})
|
4
4
|
doc =<<EOS
|
5
5
|
##### Query #####
|
6
6
|
|
@@ -130,12 +130,16 @@ Shell
|
|
130
130
|
|
131
131
|
EOS
|
132
132
|
|
133
|
-
|
134
|
-
|
135
|
-
|
133
|
+
if options[:pagerize]
|
134
|
+
Tempfile.open("ddbcli.#{$$}.#{Time.now.to_i}") do |f|
|
135
|
+
f.puts(doc)
|
136
|
+
f.flush
|
136
137
|
|
137
|
-
|
138
|
-
|
138
|
+
unless system("less #{f.path}")
|
139
|
+
puts doc
|
140
|
+
end
|
139
141
|
end
|
142
|
+
else
|
143
|
+
puts doc
|
140
144
|
end
|
141
145
|
end
|
data/lib/ddbcli/cli/options.rb
CHANGED