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

Re: zsh portable script



On 2010-07-12 18:15:19 +0200, Vincent Lefevre wrote:
> On 2010-07-12 17:45:18 +0200, Joke de Buhr wrote:
> > sorry, the correct version should be:
> > 
> >   #!/bin/sh
> >   
> >   if [ -z "$ZSH_VERSION" ]; then
> >       ## searching PATH for zsh executable
> >       exec zsh $0 $*
> 
> As arguments may contain spaces, this is incorrect. This should be:
> 
>   exec zsh "$0" ${1+"$@"}

Sorry,

  exec zsh -- "$0" ${1+"$@"}

as I said in my previous reply.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)



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