You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using OS X 10.5.8, and have installed Python 2.6.4 (not using the built-in version). I have confirmed the same problem with OS X 10.6.2. I compiled iPython 0.10 against Python 2.6.4, and the following keys do not work: home, end, page up page down (for history searching), ctrl/esc + left/right for word navigation.
These are the standard key bindings and should be compatible with all *nix systems (someone please test linux). Note that these are not the standard OS X key bindings in Terminal, but should be compatible with them. In particular, Terminal uses shift+page up/down instead of page up/down for the escape codes I used. I gave the forward/backword-word bindings for OS X and linux. Home/end are simply disabled in Terminal by default and people will have to fix that themselves.
Also, the implementation in ipython of up/down for history searching is non-standard. I recommend using page up/down as I have it here, and changing up/down to use all of history. I can see by the comments that people have already complained about this....
The text was updated successfully, but these errors were encountered:
Yes, this is still true, but it isn't true that this is an IPython bug, or even an IPython issue at all. Making these changes in IPython would mean that IPython would behave in a different manner to other readline applications on the platform (e.g. bash). A better answer for people who want readline on OSX to behave like readline on Linux is to add the corresponding lines to ~/.inputrc. This would change the behavior for all readline applications, including IPython.
The main remaining point is that history search could be bound to PageUp/Down instead of arrow Up/Down, which would be more standard (though not matching defaults on any system I have used, to my knowledge), and is purely a matter of preference. For me (and especially my PageUp-less laptop keyboard), history search is far too useful to be relegated to the incredibly inconvenient PageUp/Down by default, and if users want it that way, it's easy to change it.
Marking this an an enhancement, since it's a style choice not a bug, but I'd actually recommend just closing this issue, as it really isn't for IPython, but readline on OSX in general.
Original Launchpad bug 516716: https://bugs.launchpad.net/ipython/+bug/516716
Reported by: ben-j-schiller (thesylex).
I'm using OS X 10.5.8, and have installed Python 2.6.4 (not using the built-in version). I have confirmed the same problem with OS X 10.6.2. I compiled iPython 0.10 against Python 2.6.4, and the following keys do not work: home, end, page up page down (for history searching), ctrl/esc + left/right for word navigation.
Here's a fix (for default ipythonrc)
readline_parse_and_bind "\e[1~": beginning-of-line
readline_parse_and_bind "\e[4~": end-of-line
readline_parse_and_bind "\e[5~": history-search-backward
readline_parse_and_bind "\e[6~": history-search-forward
readline_parse_and_bind "\e[5C": forward-word
readline_parse_and_bind "\e[5D": backward-word
readline_parse_and_bind "\e\e[C": forward-word
readline_parse_and_bind "\e\e[D": backward-word
These are the standard key bindings and should be compatible with all *nix systems (someone please test linux). Note that these are not the standard OS X key bindings in Terminal, but should be compatible with them. In particular, Terminal uses shift+page up/down instead of page up/down for the escape codes I used. I gave the forward/backword-word bindings for OS X and linux. Home/end are simply disabled in Terminal by default and people will have to fix that themselves.
Also, the implementation in ipython of up/down for history searching is non-standard. I recommend using page up/down as I have it here, and changing up/down to use all of history. I can see by the comments that people have already complained about this....
The text was updated successfully, but these errors were encountered: