zsh-users
 help / color / mirror / code / Atom feed
* why doesn't 'source *' work?
@ 1999-04-10 18:39 Timothy J Luoma
  1999-04-10 22:19 ` Bruce Stephens
  0 siblings, 1 reply; 5+ messages in thread
From: Timothy J Luoma @ 1999-04-10 18:39 UTC (permalink / raw)
  To: zsh-users


Is there a reason why 'source *' doesn't work?

Is there a setopt I need to configure?

Thanks

TjL

ps -- I'm using zsh-3.1.4, mainly since I'm no longer sure where to get  
current source for zsh and last time I tried it bombed when trying to compile  
for NeXTStep....



^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: why doesn't 'source *' work?
@ 1999-04-10 23:49 Timothy J Luoma
  1999-04-11  0:22 ` Bruce Stephens
  0 siblings, 1 reply; 5+ messages in thread
From: Timothy J Luoma @ 1999-04-10 23:49 UTC (permalink / raw)
  To: zsh-users


Replying to message of 10 Apr 1999 23:19:06 +0100
	from Bruce Stephens <bruce@cenderis.demon.co.uk>
	regarding ``Re: why doesn't 'source *' work?''
	
> > Is there a reason why 'source *' doesn't work?

> In what way doesn't it work?

$ cd /Users/tjl/Unix/zsh/source/functions/complex
$ ls
addwhite            df-sort-by-used     oeu
cd                  ej                  pine
cksub               extract-serv        replace-icon
del                 kill                replace-serv
df-sort             lkincds             unimg
df-sort-by-avail    ls-tar              untar
df-sort-by-mount    mv2lbin             verify
df-sort-by-percent  mv2scripts          whois
df-sort-by-size     oaf                 wn-to-rtf
$ which oeu
oeu not found
zsh: exit 1
$ source *
$ which oeu
oeu not found
zsh: exit 1
$ PATH=$PATH:.
$ source *
$ which oeu
oeu not found
zsh: exit 1
$ echo $PATH_DIRS

$

> According to the manual:

> If any arguments arg are given, they become the positional
> parameters; the old positional parameters are restored when the
> file is done executing.  The exit status is the exit status of the
> last command executed.
>
> I'm guessing you missed the bit about the positional parameters.

Or just don't understand what the heck that means.



> If you want to source all the files (giving them no parameters),
> you'll need to use a loop:
>
> for i in *
> do
> source $i
> done

even simpler (and seems to work):

for i in ~/Unix/zsh/source/functions/complex/*; source $i

however I still don't understand why 'source *' doesn't accomplish the same  
thing... perhaps I'm a bit dense.


> You could wrap this in an autoloaded function, if you wanted.  But not
> a shell script, obviously.  (Well, probably not.)

I added

for i in ~/Unix/zsh/source/functions/complex/*; source $i

to my .zshenv... that seems to work.


TjL




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-04-11  0:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-10 18:39 why doesn't 'source *' work? Timothy J Luoma
1999-04-10 22:19 ` Bruce Stephens
1999-04-10 23:49 Timothy J Luoma
1999-04-11  0:22 ` Bruce Stephens
1999-04-11  0:30   ` Timothy J Luoma

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).