Show More
@@ -358,6 +358,7 b' class InteractiveShell(SingletonConfigurable):' | |||||
358 | # but for now, we can't do that as readline is welded in everywhere. |
|
358 | # but for now, we can't do that as readline is welded in everywhere. | |
359 | readline_use = CBool(True, config=True) |
|
359 | readline_use = CBool(True, config=True) | |
360 | readline_remove_delims = Unicode('-/~', config=True) |
|
360 | readline_remove_delims = Unicode('-/~', config=True) | |
|
361 | readline_delims = Unicode() # set by init_readline() | |||
361 | # don't use \M- bindings by default, because they |
|
362 | # don't use \M- bindings by default, because they | |
362 | # conflict with 8-bit encodings. See gh-58,gh-88 |
|
363 | # conflict with 8-bit encodings. See gh-58,gh-88 | |
363 | readline_parse_and_bind = List([ |
|
364 | readline_parse_and_bind = List([ | |
@@ -1866,6 +1867,9 b' class InteractiveShell(SingletonConfigurable):' | |||||
1866 | delims = delims.replace(d, "") |
|
1867 | delims = delims.replace(d, "") | |
1867 | delims = delims.replace(ESC_MAGIC, '') |
|
1868 | delims = delims.replace(ESC_MAGIC, '') | |
1868 | readline.set_completer_delims(delims) |
|
1869 | readline.set_completer_delims(delims) | |
|
1870 | # Store these so we can restore them if something like rpy2 modifies | |||
|
1871 | # them. | |||
|
1872 | self.readline_delims = delims | |||
1869 | # otherwise we end up with a monster history after a while: |
|
1873 | # otherwise we end up with a monster history after a while: | |
1870 | readline.set_history_length(self.history_length) |
|
1874 | readline.set_history_length(self.history_length) | |
1871 |
|
1875 |
@@ -617,3 +617,7 b' __doc__ = __doc__.format(' | |||||
617 | def load_ipython_extension(ip): |
|
617 | def load_ipython_extension(ip): | |
618 | """Load the extension in IPython.""" |
|
618 | """Load the extension in IPython.""" | |
619 | ip.register_magics(RMagics) |
|
619 | ip.register_magics(RMagics) | |
|
620 | # Initialising rpy2 interferes with readline. Since, at this point, we've | |||
|
621 | # probably just loaded rpy2, we reset the delimiters. See issue gh-2759. | |||
|
622 | if ip.has_readline: | |||
|
623 | ip.readline.set_completer_delims(ip.readline_delims) |
General Comments 0
You need to be logged in to leave comments.
Login now