diff --git a/IPython/Extensions/ipy_profile_sh.py b/IPython/Extensions/ipy_profile_sh.py
index ef4ae8e..492680b 100644
--- a/IPython/Extensions/ipy_profile_sh.py
+++ b/IPython/Extensions/ipy_profile_sh.py
@@ -100,7 +100,7 @@ def main():
         noext, ext = os.path.splitext(cmd)
         key = mapper(noext)
         if key not in ip.IP.alias_table:
-            ip.defalias(key, cmd)
+            ip.defalias(key.replace('.',''), cmd)
 
     # mglob combines 'find', recursion, exclusion... '%mglob?' to learn more
     ip.load("IPython.external.mglob")    
diff --git a/IPython/Magic.py b/IPython/Magic.py
index 07c5737..feccfcf 100644
--- a/IPython/Magic.py
+++ b/IPython/Magic.py
@@ -2648,7 +2648,7 @@ Defaulting color scheme to 'NoColor'"""
                             # each entry in the alias table must be (N,name),
                             # where N is the number of positional arguments of the
                             # alias.
-                            alias_table[ff] = (0,ff)
+                            alias_table[ff.replace('.','')] = (0,ff)
                             syscmdlist.append(ff)
             else:
                 for pdir in path:
@@ -2658,7 +2658,7 @@ Defaulting color scheme to 'NoColor'"""
                         if isexec(ff) and base.lower() not in self.shell.no_alias:
                             if ext.lower() == '.exe':
                                 ff = base
-                            alias_table[base.lower()] = (0,ff)
+                            alias_table[base.lower().replace('.','')] = (0,ff)
                             syscmdlist.append(ff)
             # Make sure the alias table doesn't contain keywords or builtins
             self.shell.alias_table_validate()