From d40d0fae018e1fc131eaa562a24b47ac804b4085 2008-06-06 09:41:42 From: Ville M. Vainio Date: 2008-06-06 09:41:42 Subject: [PATCH] cd completer: do not recursively add dirs starting with . (e.g. .svn) --- diff --git a/IPython/Extensions/ipy_completers.py b/IPython/Extensions/ipy_completers.py index 1e88db4..238a101 100644 --- a/IPython/Extensions/ipy_completers.py +++ b/IPython/Extensions/ipy_completers.py @@ -344,7 +344,7 @@ def cd_completer(self, event): if d[-1] in ['/','\\']: d = d[:-1] - subdirs = [p for p in os.listdir(d) if os.path.isdir( d + '/' + p)] + subdirs = [p for p in os.listdir(d) if os.path.isdir( d + '/' + p) and not p.startswith('.')] if subdirs: matches = [ (d + '/' + p) for p in subdirs ] return single_dir_expand(matches)