From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25461 invoked by alias); 12 Jul 2010 16:14:17 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15173 Received: (qmail 1156 invoked from network); 12 Jul 2010 16:14:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,T_MIME_NO_TEXT autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: Joke de Buhr Cc: zsh-users@zsh.org Subject: Re: zsh portable script In-Reply-To: <201007121745.20332.joke@seiken.de> (Joke de Buhr's message of "Mon, 12 Jul 2010 17:45:18 +0200") References: <1007130241570.5546@smasher> <201007121737.21296.joke@seiken.de> <201007121745.20332.joke@seiken.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Date: Mon, 12 Jul 2010 18:01:20 +0200 Message-ID: <87eif8sn8v.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Df-Sender: 430444 Joke de Buhr wrote: [...] > #!/bin/sh >=20=20=20 > if [ -z "$ZSH_VERSION" ]; then > ## searching PATH for zsh executable > exec zsh $0 $* That should rather be exec zsh "$0" "$@" Or even better, as Vicent put it: exec zsh -- "$0" ${1+"$@"} The `--' should be pretty clear. About the ${1+"$@"}, see: Regards, Frank =2D-=20 In protocol design, perfection has been reached not when there is nothing left to add, but when there is nothing left to take away. -- RFC 1925 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkw7PFAACgkQTLCDJOHZiL1rcgCaA0igAAKsKtk+/mFxlqmVsrCl 2tgAmgKGJq1z9Vik8acu7H654X7A/YQA =5g0y -----END PGP SIGNATURE----- --=-=-=--