##// END OF EJS Templates
Default color output for ls on OSX...
Anders Hovmöller -
Show More
@@ -72,17 +72,17 b' def default_aliases():'
72 ]
72 ]
73 else:
73 else:
74 # BSD, OSX, etc.
74 # BSD, OSX, etc.
75 ls_aliases = [('ls', 'ls -F'),
75 ls_aliases = [('ls', 'ls -F -G'),
76 # long ls
76 # long ls
77 ('ll', 'ls -F -l'),
77 ('ll', 'ls -F -l -G'),
78 # ls normal files only
78 # ls normal files only
79 ('lf', 'ls -F -l %l | grep ^-'),
79 ('lf', 'ls -F -l -G %l | grep ^-'),
80 # ls symbolic links
80 # ls symbolic links
81 ('lk', 'ls -F -l %l | grep ^l'),
81 ('lk', 'ls -F -l -G %l | grep ^l'),
82 # directories or links to directories,
82 # directories or links to directories,
83 ('ldir', 'ls -F -l %l | grep /$'),
83 ('ldir', 'ls -F -G -l %l | grep /$'),
84 # things which are executable
84 # things which are executable
85 ('lx', 'ls -F -l %l | grep ^-..x'),
85 ('lx', 'ls -F -l -G %l | grep ^-..x'),
86 ]
86 ]
87 default_aliases = default_aliases + ls_aliases
87 default_aliases = default_aliases + ls_aliases
88 elif os.name in ['nt', 'dos']:
88 elif os.name in ['nt', 'dos']:
@@ -255,7 +255,7 b' class AliasManager(Configurable):'
255 if l2.split(None,1)[0] == line.split(None,1)[0]:
255 if l2.split(None,1)[0] == line.split(None,1)[0]:
256 line = l2
256 line = l2
257 break
257 break
258 line=l2
258 line = l2
259 else:
259 else:
260 break
260 break
261
261
@@ -182,8 +182,9 b' class OSMagics(Magics):'
182 try:
182 try:
183 # Removes dots from the name since ipython
183 # Removes dots from the name since ipython
184 # will assume names with dots to be python.
184 # will assume names with dots to be python.
185 self.shell.alias_manager.define_alias(
185 if ff not in self.shell.alias_manager:
186 ff.replace('.',''), ff)
186 self.shell.alias_manager.define_alias(
187 ff.replace('.',''), ff)
187 except InvalidAliasError:
188 except InvalidAliasError:
188 pass
189 pass
189 else:
190 else:
General Comments 0
You need to be logged in to leave comments. Login now