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

Re: "no such file" errors while sourcing config files



In the last episode (Oct 14), Roland Jesse said:
> Hello,
> 
> does anybody in the list have an idea why the following error occurs?
> 
> j.wh4-422 ~ % ls -l .zshrc.private
> -rw-r--r--  1 j  user  217 14 Okt 21:58 .zshrc.private
> j.wh4-422 ~ % . .zshrc.private
> .: no such file or directory: .zshrc.private
> j.wh4-422 ~ %

The manpage reads:

       . file [ arg ... ]
              Read commands from file and  execute  them  in  the
              current  shell  environment.  If file does not con-
              tain a slash, or if PATH_DIRS  is  set,  the  shell
              looks  in the components of path to find the direc-
              tory containing file.  Files in the current  direc-
              tory  are  not read unless "." appears somewhere in
              path.

So if you want to run a script in your current directory, run it like

. ./.zshrc.private 

	-Dan Nelson
	dnelson@xxxxxxxxxxxx



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