This is now fixed in trunk:
In [5]: hist = 123
In [6]: hist=hi %hist %history hist
In [6]: hist = hi %hist %history hist
Tab completed both with and without the spaces.
This is now fixed in trunk:
In [5]: hist = 123
In [6]: hist=hi
%hist %history hist
In [6]: hist = hi
%hist %history hist
Tab completed both with and without the spaces.