In : %lsmagic
In : %load_ext rmagic
In : %%%%lsmagic
It seems specific to rmagic - neither sympyprinting nor cythonmagic has the same effect.
It seems to stem from the import rpy2.robjects as ro line in rmagic.py.
import rpy2.robjects as ro
But you can trace that back to a minimal example which breaks it:
I'd guess the root cause is something to do with this C code from _rinterface.c (in EmbeddedR_init()):
/*FIXME: setting readline variables so R's oddly static declarations
char *rl_completer, *rl_basic;
rl_completer = strndup(rl_completer_word_break_characters, 200);
rl_completer_word_break_characters = rl_completer;
rl_basic = strndup(rl_basic_word_break_characters, 200);
rl_basic_word_break_characters = rl_basic;
/* --- */
Or perhaps the lack of --no-readline in the arguments when R is spun up. We need to forward this upstream to the r2py folks.
And it's been forwarded upstream. https://bitbucket.org/lgautier/rpy2/issue/115/starting-r-breaks-ipython-tab-completion
Reset readline delimiters after loading rmagic.