##// 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 This file contains all the classes and helper functions specific to IPython.
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,18 +549,33 b' class InteractiveShell(object,Magic):'
549 # a better ls
549 # a better ls
550 'ls ls -F',
550 'ls ls -F',
551 # long ls
551 # long ls
552 'll ls -lF',
552 'll ls -lF')
553 # color ls
553 # Extra ls aliases with color, which need special treatment on BSD
554 'lc ls -F -o --color',
554 # variants
555 # ls normal files only
555 ls_extra = ( # color ls
556 'lf ls -F -o --color %l | grep ^-',
556 'lc ls -F -o --color',
557 # ls symbolic links
557 # ls normal files only
558 'lk ls -F -o --color %l | grep ^l',
558 'lf ls -F -o --color %l | grep ^-',
559 # directories or links to directories,
559 # ls symbolic links
560 'ldir ls -F -o --color %l | grep /$',
560 'lk ls -F -o --color %l | grep ^l',
561 # things which are executable
561 # directories or links to directories,
562 'lx ls -F -o --color %l | grep ^-..x',
562 'ldir ls -F -o --color %l | grep /$',
563 )
563 # things which are executable
564 'lx ls -F -o --color %l | grep ^-..x',
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 elif os.name in ['nt','dos']:
579 elif os.name in ['nt','dos']:
565 auto_alias = ('dir dir /on', 'ls dir /on',
580 auto_alias = ('dir dir /on', 'ls dir /on',
566 'ddir dir /ad /on', 'ldir dir /ad /on',
581 'ddir dir /ad /on', 'ldir dir /ad /on',
@@ -568,7 +583,7 b' class InteractiveShell(object,Magic):'
568 'ren ren','cls cls','copy copy')
583 'ren ren','cls cls','copy copy')
569 else:
584 else:
570 auto_alias = ()
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 # Call the actual (public) initializer
587 # Call the actual (public) initializer
573 self.init_auto_alias()
588 self.init_auto_alias()
574
589
@@ -1,5 +1,10 b''
1 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
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 * IPython/irunner.py: New module to run scripts as if manually
8 * IPython/irunner.py: New module to run scripts as if manually
4 typed into an interactive environment, based on pexpect. After a
9 typed into an interactive environment, based on pexpect. After a
5 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
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