fix #1886 - readline completer with space

This commit is contained in:
Hugo Wang 2016-10-26 22:21:07 +08:00
parent 99eb2ea9c4
commit 0e904b98eb
2 changed files with 14 additions and 1 deletions

View file

@ -0,0 +1,13 @@
**Added:** None
**Changed:** None
**Deprecated:** None
**Removed:** None
**Fixed:**
* Fixed readline completer issue when cmd alias contains space (e.g. ``ls``).
**Security:** None

View file

@ -261,7 +261,7 @@ class ReadlineShell(BaseShell, cmd.Cmd):
_rebind_case_sensitive_completions()
line = builtins.aliases.expand_alias(line)
mline = line.partition(' ')[2]
mline = line.rpartition(' ')[2]
offs = len(mline) - len(text)
if self.completer is None:
x = []