From 6a38bd83e1985dd413bd83c0e6d6ba60aa6a5432 2006-06-05 13:43:18 From: vivainio Date: 2006-06-05 13:43:18 Subject: [PATCH] no_alias honored properly in %rehashx --- diff --git a/IPython/Magic.py b/IPython/Magic.py index 568a9dc..d70235b 100644 --- a/IPython/Magic.py +++ b/IPython/Magic.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Magic functions for InteractiveShell. -$Id: Magic.py 1338 2006-05-31 14:24:23Z vivainio $""" +$Id: Magic.py 1351 2006-06-05 13:43:18Z vivainio $""" #***************************************************************************** # Copyright (C) 2001 Janko Hauser and @@ -2421,7 +2421,7 @@ Defaulting color scheme to 'NoColor'""" for pdir in path: os.chdir(pdir) for ff in os.listdir(pdir): - if isexec(ff): + if isexec(ff) and ff not in self.shell.no_alias: # each entry in the alias table must be (N,name), # where N is the number of positional arguments of the # alias. @@ -2431,7 +2431,7 @@ Defaulting color scheme to 'NoColor'""" for pdir in path: os.chdir(pdir) for ff in os.listdir(pdir): - if isexec(ff): + if isexec(ff) and os.path.splitext(ff)[0] not in self.shell.no_alias: alias_table[execre.sub(r'\1',ff)] = (0,ff) syscmdlist.append(ff) # Make sure the alias table doesn't contain keywords or builtins diff --git a/doc/ChangeLog b/doc/ChangeLog index f9a7fa1..250dc41 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2006-06-05 Ville Vainio + + * Magic.py (magic_rehashx): Honor no_alias list earlier in + %rehashx, to avoid clobbering builtins in ipy_profile_sh.py + 2006-06-03 Fernando Perez * IPython/genutils.py (ask_yes_no): treat EOF as a default answer