Commit 1cf1d871 authored by adam j hartz's avatar adam j hartz

fix issue with tab completion in the middle of a line

resolves #6
and bumps version to 0.1.0!
parent 08c705f5
......@@ -16,4 +16,4 @@
# xonsh is Copyright (c) 2015-2016 the xonsh developers and is licensed under
# the 2-Clause BSD license.
__version__ = '0.0.23'
__version__ = '0.1.0'
......@@ -247,14 +247,15 @@ class ReadlineShell(BaseShell, Cmd):
return []
rl_completion_suppress_append() # this needs to be called each time
offset = 0
_s, _e, _q = check_for_partial_string(line)
effective_line = line[:endidx]
_s, _e, _q = check_for_partial_string(effective_line)
if _s is not None:
if _e is not None and ' ' in line[_e:]:
mline = line.rpartition(' ')[2]
mline = effective_line.rpartition(' ')[2]
else:
mline = line[_s:]
mline = effective_line[_s:]
else:
mline = line.rpartition(' ')[2]
mline = effective_line.rpartition(' ')[2]
offset = len(mline) - len(text)
comps = self.completer.complete(text, line,
begidx, endidx,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment