##// END OF EJS Templates
rehashing now done by the config file alone - providing the system...
vivainio -
Show More
@@ -5,7 +5,7 b' We define a special input line filter to allow typing lines which begin with'
5 '~', '/' or '.'. If one of those strings is encountered, it is automatically
5 '~', '/' or '.'. If one of those strings is encountered, it is automatically
6 executed.
6 executed.
7
7
8 $Id: InterpreterExec.py 994 2006-01-08 08:29:44Z fperez $"""
8 $Id: InterpreterExec.py 1039 2006-01-20 23:59:33Z vivainio $"""
9
9
10 #*****************************************************************************
10 #*****************************************************************************
11 # Copyright (C) 2004 W.J. van der Laan <gnufnork@hetdigitalegat.nl>
11 # Copyright (C) 2004 W.J. van der Laan <gnufnork@hetdigitalegat.nl>
@@ -242,19 +242,20 b' help(pysh) -> help on the installed shell extensions and syntax.'
242 # Set the 'cd' command to quiet mode, a more shell-like behavior
242 # Set the 'cd' command to quiet mode, a more shell-like behavior
243 __IPYTHON__.default_option('cd','-q')
243 __IPYTHON__.default_option('cd','-q')
244
244
245 # This is redundant, ipy_user_conf.py will determine this
245 # Load all of $PATH as aliases
246 # Load all of $PATH as aliases
246 if os.name == 'posix':
247 #if os.name == 'posix':
247 # %rehash is very fast, but it doesn't check for executability, it simply
248 # # %rehash is very fast, but it doesn't check for executability, it simply
248 # dumps everything in $PATH as an alias. Use rehashx if you want more
249 # # dumps everything in $PATH as an alias. Use rehashx if you want more
249 # checks.
250 # # checks.
250 __IPYTHON__.magic_rehash()
251 # __IPYTHON__.magic_rehash()
251 else:
252 #else:
252 # Windows users: the list of extensions considered executable is read from
253 # # Windows users: the list of extensions considered executable is read from
253 # the environment variable 'pathext'. If this is undefined, IPython
254 # # the environment variable 'pathext'. If this is undefined, IPython
254 # defaults to EXE, COM and BAT.
255 # # defaults to EXE, COM and BAT.
255 # %rehashx is the one which does extension analysis, at the cost of
256 # # %rehashx is the one which does extension analysis, at the cost of
256 # being much slower than %rehash.
257 # # being much slower than %rehash.
257 __IPYTHON__.magic_rehashx()
258 # __IPYTHON__.magic_rehashx()
258
259
259 # Remove %sc,%sx if present as aliases
260 # Remove %sc,%sx if present as aliases
260 __IPYTHON__.magic_unalias('sc')
261 __IPYTHON__.magic_unalias('sc')
@@ -16,6 +16,7 b' empty.'
16
16
17 import IPython.ipapi as ip
17 import IPython.ipapi as ip
18
18
19 import os
19
20
20 o = ip.options()
21 o = ip.options()
21 # autocall 1 ('smart') is default anyway, this is just an
22 # autocall 1 ('smart') is default anyway, this is just an
@@ -37,7 +38,12 b" if o.profile == 'pysh':"
37
38
38 ip.magic('alias d ls -F --color=auto')
39 ip.magic('alias d ls -F --color=auto')
39
40
40 # Make available all system commands. You can comment this line out to speed up
41 # Make available all system commands through "rehashing" immediately.
41 # startup on slow machines, and to conserve a bit of memory
42 # You can comment these lines out to speed up startup on very slow
43 # machines, and to conserve a bit of memory.
42
44
45 if os.name=='posix':
46 ip.magic('rehash')
47 else:
48 #slightly slower, but better results esp. with Windows
43 ip.magic('rehashx')
49 ip.magic('rehashx')
General Comments 0
You need to be logged in to leave comments. Login now