From 382f21c9e6c941e1d6a3457fa216e5737141955c 2007-11-23 17:57:50 From: darren.dale Date: 2007-11-23 17:57:50 Subject: [PATCH] traits completer respects readline_omit__names --- diff --git a/IPython/Extensions/ipy_traits_completer.py b/IPython/Extensions/ipy_traits_completer.py index 7180e29..5220ea9 100644 --- a/IPython/Extensions/ipy_traits_completer.py +++ b/IPython/Extensions/ipy_traits_completer.py @@ -99,6 +99,13 @@ def trait_completer(self,event): attr_start = symbol_parts[-1] if attr_start: attrs = [a for a in attrs if a.startswith(attr_start)] + + # Let's also respect the user's readline_omit__names setting: + omit__names = ipget().options.readline_omit__names + if omit__names == 1: + attrs = [a for a in attrs if not a.startswith('__')] + elif omit__names == 2: + attrs = [a for a in attrs if not a.startswith('_')] #print '\nastart:<%r>' % attr_start # dbg diff --git a/doc/ChangeLog b/doc/ChangeLog index 1d95cd4..f4121d9 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2007-11-23 Darren Dale + * ipy_traits_completer.py: let traits_completer respect the user's + readline_omit__names setting. + 2007-11-08 Ville Vainio * ipy_completers.py (import completer): assume 'xml' module exists. Do not add every module twice anymore. Closes #196.