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

Re: source ~/dir/*.zsh



2012-06-21 20:01:08 -0400, TJ Luoma:
> I have split my .zshenv into a bunch of different files which all end
> with different suffixes. For example, functions are called "foo.f.zsh"
> or "bar.f.zsh"
> 
> My idea was to put them all into a special directory and then source
> them like so in ~/.zshenv
> 
>       source ~/dir/*.f.zsh
> 
> But that doesn't seem to work.
> 
> I'm not getting any errors, it just doesn't seem to actually do anything.
> 
> So I need some sort of setopt or other setting to make this work?
[...]

In

source a b c

It sources "a" with arguments "b" and "c"

$ source <(echo 'echo $*') x y
x y

So, above, only the first *.f.zsh is run with the other ones as
arguments.

Try

for i (~/dir/*.f.zsh) source $i

-- 
Stephane



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