The sequences control+r and fn+delete that used to do recursive search / delete the following character do not work anymore in python 2.7 / Mac OSX Lion. Instead, a ~
appears each time I use fn+delete. I am using readline
for tab completion (which also had to be changed according to python tab completion Mac OSX 10.7 (Lion)). Any ideas how to fix it?
Thanks, Bruno
According to http://pypi.python.org/pypi/readline:
"Mac OS X, do not ship with GNU readline installed. The readline extension module in the standard library of Mac "system" Python uses NetBSD's editline (libedit) library instead, which is a readline replacement with a less restrictive software license."
So, you can install it with the command:
sudo easy_install readline
Else, you can use tcsh shortcuts; control + d to delete the following character and Ecp + p for history search.
For recursive search you can configure libedit by adding following line to ~/.editrc
bind ^R em-inc-search-prev
or right from your .pystartup
file
readline.parse_and_bind("bind ^R em-inc-search-prev")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With