Show More
@@ -92,6 +92,7 b' def rehashdir_f(self,arg):' | |||||
92 | for ff in os.listdir(pdir): |
|
92 | for ff in os.listdir(pdir): | |
93 | if isexec(ff) and not isjunk(ff): |
|
93 | if isexec(ff) and not isjunk(ff): | |
94 | src, tgt = execre.sub(r'\1',ff), os.path.abspath(ff) |
|
94 | src, tgt = execre.sub(r'\1',ff), os.path.abspath(ff) | |
|
95 | src = src.lower() | |||
95 | print "Aliasing:",src,"->",tgt |
|
96 | print "Aliasing:",src,"->",tgt | |
96 | alias_table[src] = (0,tgt) |
|
97 | alias_table[src] = (0,tgt) | |
97 | # Make sure the alias table doesn't contain keywords or builtins |
|
98 | # Make sure the alias table doesn't contain keywords or builtins |
@@ -1,7 +1,7 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """Magic functions for InteractiveShell. |
|
2 | """Magic functions for InteractiveShell. | |
3 |
|
3 | |||
4 |
$Id: Magic.py 234 |
|
4 | $Id: Magic.py 2345 2007-05-15 15:31:25Z vivainio $""" | |
5 |
|
5 | |||
6 | #***************************************************************************** |
|
6 | #***************************************************************************** | |
7 | # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and |
|
7 | # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and | |
@@ -2592,7 +2592,7 b' Defaulting color scheme to \'NoColor\'"""' | |||||
2592 | if isexec(ff) and base not in self.shell.no_alias: |
|
2592 | if isexec(ff) and base not in self.shell.no_alias: | |
2593 | if ext.lower() == '.exe': |
|
2593 | if ext.lower() == '.exe': | |
2594 | ff = base |
|
2594 | ff = base | |
2595 | alias_table[base] = (0,ff) |
|
2595 | alias_table[base.lower()] = (0,ff) | |
2596 | syscmdlist.append(ff) |
|
2596 | syscmdlist.append(ff) | |
2597 | # Make sure the alias table doesn't contain keywords or builtins |
|
2597 | # Make sure the alias table doesn't contain keywords or builtins | |
2598 | self.shell.alias_table_validate() |
|
2598 | self.shell.alias_table_validate() |
@@ -80,10 +80,17 b' def main():' | |||||
80 | """) |
|
80 | """) | |
81 | ip.magic('rehashx') |
|
81 | ip.magic('rehashx') | |
82 | syscmds = db.get("syscmdlist") |
|
82 | syscmds = db.get("syscmdlist") | |
|
83 | ||||
|
84 | # locase aliases on win#2 only | |||
|
85 | if os.name == 'posix': | |||
|
86 | mapper = lambda s:s | |||
|
87 | else: | |||
|
88 | def mapper(s): return s.lower() | |||
|
89 | ||||
83 | for cmd in syscmds: |
|
90 | for cmd in syscmds: | |
84 | #print "al",cmd |
|
91 | #print "al",cmd | |
85 | noext, ext = os.path.splitext(cmd) |
|
92 | noext, ext = os.path.splitext(cmd) | |
86 | ip.IP.alias_table[noext] = (0,cmd) |
|
93 | ip.IP.alias_table[mapper(noext)] = (0,cmd) | |
87 | extend_shell_behavior(ip) |
|
94 | extend_shell_behavior(ip) | |
88 |
|
95 | |||
89 | def extend_shell_behavior(ip): |
|
96 | def extend_shell_behavior(ip): |
General Comments 0
You need to be logged in to leave comments.
Login now