1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
Commit graph

13 commits

Author SHA1 Message Date
Matijs van Zuijlen
96b61f14aa Fix some warnings 2015-01-23 14:03:36 +01:00
Conrad Irwin
299494e4c3 Don't use side-effecty string append [Fixes #1223] 2014-05-26 22:13:14 -07:00
Conrad Irwin
bb5745aa55 Catch completion errors [Fixes #841] 2014-05-05 23:42:38 -07:00
Ryan Fitzgerald
a9a49ee8a3 Make object path resolution more robust (fix #957)
This fixes #957 and should make object path resolution more predictable
in general. Instead of splitting the path on "/" before doing any
parsing, we use `StringScanner` and `complete_expression?` to scan
through the string looking for complete slash-delimited Ruby
expressions.

It also turned out that separating the code for handling "-" from the
path-resolution code simplified things a lot. It doesn't really make
sense for "-" to be in there anyway, since paths like "foo/-/bar" don't
mean anything.
2014-04-28 00:41:19 -07:00
Ryan Fitzgerald
2467871169 Extract object path resolution into a class 2014-04-27 17:28:56 -07:00
Johnny Five
4e11c93185 fully qualify constant name. closes #1193 2014-04-27 14:13:44 -07:00
robert
7e612a3156 pass the right 'input' to InputCompleter#call, improve docs. 2014-04-27 14:13:37 -07:00
robert
f569d3b119 remove useless if 2014-04-27 14:13:33 -07:00
robert
3fd66b6403 input becomes primary argument in #initialize.
with `_pry_` as an optional second. in the repl the second argument will
always be met but to avoid needing a pry instance around to use Pry::InputCompleter,
it uses the first argument(`input`) when implementing auto completion, and
'pry' can be used if its around/available.
2014-04-27 14:13:30 -07:00
robert
4bab51f53c rewrite Pry::InputCompleter as a class who wraps '_pry_'.
this commit changes InputCompleter from a module implemented on top
of singleton/class methods to a class who wraps '_pry_' and reads
from _pry_.input, who is assumed to be Readline.

pry-bond will also need to be updated to have a similar style API.
2014-04-27 14:12:45 -07:00
robert
cf0e8c1051 label and re-use regexp's in Pry::InputCompleter. 2014-04-27 14:12:37 -07:00
yui-knk
e99ae3df08 Fix yard documentation warnings(fix #1163) 2014-03-16 23:54:45 +09:00
Robert Gleeson
97c28898e1 lazy load Pry::InputCompleter or Pry::BondCompleter
prior to commit both would be loaded but in most cases you'd only use
one or the other. when `bond` is available and `_pry_.config.completer`
has not been set to nil before the pry session has started & editline is
not being used(OSX only), then "pry/bond_completer" is loaded. otherwise
the default fallback is Pry::InputCompleter("pry/input_completer")
2014-03-16 04:24:12 +01:00
Renamed from lib/pry/completion.rb (Browse further)