diff options
author | Peter Stephenson <pws@zsh.org> | 2017-01-12 13:54:29 +0000 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2017-01-12 13:54:29 +0000 |
commit | 33799ae2b00c09445e2e47720bc740ec434416e4 (patch) | |
tree | 5ad8280e25112174a72c7924d637fb9fd44db2b3 /Test/C04funcdef.ztst | |
parent | d3cf8816dce8f41bba2436045f38e9884ba04cc0 (diff) | |
download | zsh-33799ae2b00c09445e2e47720bc740ec434416e4.tar.gz zsh-33799ae2b00c09445e2e47720bc740ec434416e4.tar.xz zsh-33799ae2b00c09445e2e47720bc740ec434416e4.zip |
40335: More care with autoload function path.
If doing "autoload -X", the path present might actually be location of file containing the function with the autoload -X. Add an explicit flag to say it's a directory for autoload.
Diffstat (limited to 'Test/C04funcdef.ztst')
-rw-r--r-- | Test/C04funcdef.ztst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Test/C04funcdef.ztst b/Test/C04funcdef.ztst index 1821b786e..7100280f3 100644 --- a/Test/C04funcdef.ztst +++ b/Test/C04funcdef.ztst @@ -419,6 +419,16 @@ 0:autoload -dX with path >I have been loaded by default path. + ( + fpath=(.) + print 'loadthisfunc() { autoload -X }' >loadthisfunc_sourceme + print 'print Function was loaded correctly.' >loadthisfunc + source $PWD/loadthisfunc_sourceme + loadthisfunc + ) +0: autoload -X interaction with absolute filename used for source location +>Function was loaded correctly. + %clean rm -f file.in file.out |