##// END OF EJS Templates
Close #64, if W. Maier confirms this fix works.
fperez -
Show More
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.'
6 6
7 7 This file contains all the classes and helper functions specific to IPython.
8 8
9 $Id: iplib.py 1332 2006-05-30 01:41:28Z fperez $
9 $Id: iplib.py 1334 2006-05-30 03:36:04Z fperez $
10 10 """
11 11
12 12 #*****************************************************************************
@@ -549,8 +549,10 b' class InteractiveShell(object,Magic):'
549 549 # a better ls
550 550 'ls ls -F',
551 551 # long ls
552 'll ls -lF',
553 # color ls
552 'll ls -lF')
553 # Extra ls aliases with color, which need special treatment on BSD
554 # variants
555 ls_extra = ( # color ls
554 556 'lc ls -F -o --color',
555 557 # ls normal files only
556 558 'lf ls -F -o --color %l | grep ^-',
@@ -561,6 +563,19 b' class InteractiveShell(object,Magic):'
561 563 # things which are executable
562 564 'lx ls -F -o --color %l | grep ^-..x',
563 565 )
566 # The BSDs don't ship GNU ls, so they don't understand the
567 # --color switch out of the box
568 if 'bsd' in sys.platform:
569 ls_extra = ( # ls normal files only
570 'lf ls -F -o %l | grep ^-',
571 # ls symbolic links
572 'lk ls -F -o %l | grep ^l',
573 # directories or links to directories,
574 'ldir ls -F -o %l | grep /$',
575 # things which are executable
576 'lx ls -F -o %l | grep ^-..x',
577 )
578 auto_alias = auto_alias + ls_extra
564 579 elif os.name in ['nt','dos']:
565 580 auto_alias = ('dir dir /on', 'ls dir /on',
566 581 'ddir dir /ad /on', 'ldir dir /ad /on',
@@ -568,7 +583,7 b' class InteractiveShell(object,Magic):'
568 583 'ren ren','cls cls','copy copy')
569 584 else:
570 585 auto_alias = ()
571 self.auto_alias = map(lambda s:s.split(None,1),auto_alias)
586 self.auto_alias = [s.split(None,1) for s in auto_alias]
572 587 # Call the actual (public) initializer
573 588 self.init_auto_alias()
574 589
@@ -1,5 +1,10 b''
1 1 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
2 2
3 * IPython/iplib.py (InteractiveShell.__init__): add check for the
4 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
5 recognize the option. After a bug report by Will Maier. This
6 closes #64 (will do it after confirmation from W. Maier).
7
3 8 * IPython/irunner.py: New module to run scripts as if manually
4 9 typed into an interactive environment, based on pexpect. After a
5 10 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
General Comments 0
You need to be logged in to leave comments. Login now