Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
order of sourcing
- X-seq: zsh-users 29035
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: order of sourcing
- Date: Sun, 16 Apr 2023 09:14:42 -0700
- Archived-at: <https://zsh.org/users/29035>
- List-id: <zsh-users.zsh.org>
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