mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-29 05:21:00 +01:00
40342: Add directory name cache for autoload file paths.
This renders "autoload /blah/blah/*" as efficient as use of fpath.
This commit is contained in:
parent
33799ae2b0
commit
178e62dbfe
6 changed files with 200 additions and 12 deletions
|
|
@ -429,6 +429,45 @@
|
|||
0: autoload -X interaction with absolute filename used for source location
|
||||
>Function was loaded correctly.
|
||||
|
||||
(
|
||||
fpath=()
|
||||
mkdir extra2
|
||||
for f in fun2a fun2b; do
|
||||
print "print $f" >extra2/$f
|
||||
done
|
||||
repeat 3; do
|
||||
autoload $PWD/extra2/fun2{a,b} $PWD/extra/spec
|
||||
fun2a
|
||||
fun2b
|
||||
spec
|
||||
unfunction fun2a fun2b spec
|
||||
autoload $PWD/extra2/fun2{a,b} $PWD/extra/spec
|
||||
spec
|
||||
fun2b
|
||||
fun2a
|
||||
unfunction fun2a fun2b spec
|
||||
done
|
||||
)
|
||||
0: Exercise the directory name cache for autoloads
|
||||
>fun2a
|
||||
>fun2b
|
||||
>I have been loaded by explicit path.
|
||||
>I have been loaded by explicit path.
|
||||
>fun2b
|
||||
>fun2a
|
||||
>fun2a
|
||||
>fun2b
|
||||
>I have been loaded by explicit path.
|
||||
>I have been loaded by explicit path.
|
||||
>fun2b
|
||||
>fun2a
|
||||
>fun2a
|
||||
>fun2b
|
||||
>I have been loaded by explicit path.
|
||||
>I have been loaded by explicit path.
|
||||
>fun2b
|
||||
>fun2a
|
||||
|
||||
%clean
|
||||
|
||||
rm -f file.in file.out
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue