earthquake 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -2
- data/VERSION +1 -1
- data/earthquake.gemspec +1 -1
- data/lib/earthquake/input.rb +9 -2
- metadata +1 -1
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.2
|
data/earthquake.gemspec
CHANGED
data/lib/earthquake/input.rb
CHANGED
@@ -92,9 +92,16 @@ module Earthquake
|
|
92
92
|
end
|
93
93
|
|
94
94
|
completion do |text|
|
95
|
-
|
96
|
-
|
95
|
+
results = []
|
96
|
+
regexp = /^#{Regexp.quote(text)}/
|
97
|
+
if Readline.line_buffer =~ /^\s*:\w*$/
|
98
|
+
results += command_names.grep(regexp)
|
97
99
|
end
|
100
|
+
range = Readline::HISTORY.count >= 100 ? -100..-1 : 0..-1
|
101
|
+
results += Readline::HISTORY.to_a[range].map { |line|
|
102
|
+
line.gsub(/^\s*:\w/, '').split(/\s+/)
|
103
|
+
}.flatten.grep(regexp)
|
104
|
+
results
|
98
105
|
end
|
99
106
|
end
|
100
107
|
|