Fixed _add_cdpaths in autocomplete, amending #191

This commit is contained in:
Sébastien Pierre 2016-05-19 10:38:34 -04:00
parent f68650a218
commit 84e61badc8

View file

@ -322,7 +322,7 @@ class Completer(object):
env = builtins.__xonsh_env__ env = builtins.__xonsh_env__
csc = env.get('CASE_SENSITIVE_COMPLETIONS') csc = env.get('CASE_SENSITIVE_COMPLETIONS')
for cdp in env.get('CDPATH'): for cdp in env.get('CDPATH'):
test_glob = os.path.join(cdp, prefix) + '*' test_glob = os.path.join(builtins.__xonsh_expand_path__(cdp), prefix) + '*'
for s in iglobpath(test_glob, ignore_case=(not csc)): for s in iglobpath(test_glob, ignore_case=(not csc)):
if os.path.isdir(s): if os.path.isdir(s):
paths.add(os.path.basename(s)) paths.add(os.path.basename(s))