Add module path to $fpath when loading
This commit is contained in:
parent
e9c5bcb0d9
commit
a88333dd23
1 changed files with 3 additions and 1 deletions
|
@ -50,7 +50,7 @@ function load_module {
|
|||
|
||||
local modpath
|
||||
for p in $fpath; do
|
||||
modpath=$p/$1
|
||||
modpath=$p/$mod
|
||||
[[ -d $modpath ]] && break
|
||||
modpath=''
|
||||
done
|
||||
|
@ -60,6 +60,8 @@ function load_module {
|
|||
return 1
|
||||
fi
|
||||
|
||||
fpath+=($modpath)
|
||||
|
||||
print_info -l 1 "Loading module: $mod"
|
||||
for func in `ls $modpath`; do
|
||||
print_info_sub -l 2 "Loading function: $func"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue