Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

order of sourcing



I'd like to clear up a little bother:

file aa:

aa ()
{
    bb "howdy!"
}

file bb:

bb ()
{
    echo $1
}

4 /aWorking/Zsh/Source/Wk/Test 0 $ . *    # Just sourcing 'aa' and 'bb'.

4 /aWorking/Zsh/Source/Wk/Test 0 $ aa
aa:2: permission denied: bb

4 /aWorking/Zsh/Source/Wk/Test 0 $ . bb; aa
howdy!

... I think I get it:  'aa' is sourced first and thus 'aa ()' doesn't know what 'bb ()' looks like so throws an error until 'bb' is sourced again.  But shouldn't 'aa ()' sorta find 'bb ()'  in real time?  It's easy enough to deal with but I'm betting there's an easy and better solution that doesn't involve ad hoc re-sourcing.






Messages sorted by: Reverse Date, Date, Thread, Author