From b2146aec5827cd0d583a0bbb5745a86868591820 2011-05-10 21:03:52 From: MinRK Date: 2011-05-10 21:03:52 Subject: [PATCH] Remove "\M-" readline bindings They conflict with 8-bit encodings closes gh-88 --- diff --git a/IPython/config/default/ipython_config.py b/IPython/config/default/ipython_config.py index cd99a51..9764f31 100644 --- a/IPython/config/default/ipython_config.py +++ b/IPython/config/default/ipython_config.py @@ -97,14 +97,14 @@ c = get_config() # Readline # c.InteractiveShell.readline_use = True +# be careful with meta-key ('\M-') bindings, because +# they conflict with 8-bit encodings (e.g. UTF8) + # c.InteractiveShell.readline_parse_and_bind = [ # 'tab: complete', # '"\C-l": possible-completions', # 'set show-all-if-ambiguous on', # '"\C-o": tab-insert', -# '"\M-i": " "', -# '"\M-o": "\d\d\d\d"', -# '"\M-I": "\d\d\d\d"', # '"\C-r": reverse-search-history', # '"\C-s": forward-search-history', # '"\C-p": history-search-backward', diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index db40bec..bda19c7 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -239,15 +239,13 @@ class InteractiveShell(Configurable, Magic): readline_merge_completions = CBool(True, config=True) readline_omit__names = Enum((0,1,2), default_value=2, config=True) readline_remove_delims = Str('-/~', config=True) + # don't use \M- bindings by default, because they + # conflict with 8-bit encodings. See gh-58,gh-88 readline_parse_and_bind = List([ 'tab: complete', '"\C-l": clear-screen', 'set show-all-if-ambiguous on', '"\C-o": tab-insert', - # See bug gh-58 - with \M-i enabled, chars 0x9000-0x9fff - # crash IPython. - '"\M-o": "\d\d\d\d"', - '"\M-I": "\d\d\d\d"', '"\C-r": reverse-search-history', '"\C-s": forward-search-history', '"\C-p": history-search-backward',