From 89765fe6da71a733a2fc69862a07d394b0502c88 2008-06-12 14:56:43 From: Ville M. Vainio Date: 2008-06-12 14:56:43 Subject: [PATCH] cd completer: no longer greedy. If you are using a buggy readline that inserts spaces after completions (so you need to press backspace), do import ipy_completers ipy_completers.greedy_cd_completer = True --- diff --git a/IPython/Extensions/ipy_completers.py b/IPython/Extensions/ipy_completers.py index 238a101..27139d3 100644 --- a/IPython/Extensions/ipy_completers.py +++ b/IPython/Extensions/ipy_completers.py @@ -298,6 +298,8 @@ def runlistpy(self, event): return dirs + pys +greedy_cd_completer = False + def cd_completer(self, event): relpath = event.symbol #print event # dbg @@ -353,7 +355,10 @@ def cd_completer(self, event): else: return matches - return single_dir_expand(found) + if greedy_cd_completer: + return single_dir_expand(found) + else: + return found def apt_get_packages(prefix): out = os.popen('apt-cache pkgnames')