In OS X ipython shell navigation was a pain coz I couldn't navigate/skip one word forward or backward using CTRL-RIGHT / LEFT arrows. Whenever I tried doing it I would see such characters.
In : celery papaya;5D;5D;5D;5C;5C;5C
A QUICK WAY TO FIX this is by installing readline and configuring .inputrc.
1) Install readline using brew
$ brew install readline
2) TRICK LIES HERE. Find which characters are sent to ipython notebook when you press CTRL-RIGHT / LEFT.
Press CTRL-V and CTRL-RIGHT. In my case it showed
REPEAT for left arrow. Press CTRL-V and CTRL-LEFT.
3) Finally, your ~/.inputrc should look like
$ cat ~/.inputrc
# ipython settings
4) Enjoy ! CTRL-RIGHT and CTRL-LEFT works now.