From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11298 invoked by alias); 23 Aug 2010 13:27:28 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28190 Received: (qmail 4037 invoked from network); 23 Aug 2010 13:27:25 -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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.212.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=fNxak0HNQtku0QOSfir12PgpNJYso+HYlM6oiot1JOw=; b=WK7NS17kNbV4YBd0aXn8BGP7q+dZKYfGtvzJg2P5fpB3u6JCyVPs7r3+AB23x2V1CQ p6Ap4W4HL1AA0cZJT9V3hgs8VzeCvM06FgVVP7ILRqtpF6eF1q7mqTrUMQEcbDI7jBvS DxOr5OHkArUJ/3px/cg6/A9iSQxIHPAYtxisY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=aLuKtrJSZeCTa/ADYwOAqaoTkj21lvjltFzxu5I6rUGO8h4oTO1scLrBInWc+szs3V x/bd+k0fUUOQ9kAT65Qhx5cnBhaJWv0p95yp6ZK+VqimyOQzR9CPuCq0rxISVJjuZCXB 0mWBYM9fFxmPPnavVQoFNorEl0tM2V/Iin5zo= MIME-Version: 1.0 In-Reply-To: <20100315125923.63a6afa6@news01> References: <38D4FA2BB99A674BADDED237051D97A70EE02067@FFBRUE001.cfmu.corp.eurocontrol.int> <20100315125923.63a6afa6@news01> Date: Mon, 23 Aug 2010 15:27:21 +0200 Message-ID: Subject: Re: Can't trace script not in PATH From: Mikael Magnusson To: zsh workers Content-Type: text/plain; charset=UTF-8 On 15 March 2010 14:59, Peter Stephenson wrote: > I've made this a new option, PATH_SCRIPT, which is on in the appropriate > emulations. > > It's not entirely trivial since now we need the path to be set up before we > open the script file. I hope this change does it without decapitating any > of the statuary on the way down the corridor. > > It looks like the invocation section in the manual was missing any > description of the shell opening a script file; it was implied elsewhere but > never stated. Did I miss something somewhere else? > > Index: Doc/Zsh/invoke.yo > =================================================================== > RCS file: /cvsroot/zsh/zsh/Doc/Zsh/invoke.yo,v > retrieving revision 1.8 > diff -p -u -r1.8 invoke.yo > --- Doc/Zsh/invoke.yo 21 Oct 2005 09:51:55 -0000 1.8 > +++ Doc/Zsh/invoke.yo 15 Mar 2010 12:58:01 -0000 > @@ -1,7 +1,7 @@ > texinode(Invocation)(Files)(Roadmap)(Top) > chapter(Invocation) > cindex(invocation) > -sect(Invocation Options) > +sect(Invocation) > cindex(shell options) > cindex(options, shell) > cindex(shell flags) > @@ -17,7 +17,8 @@ first one is assigned to tt($0), rather > parameter. > ) > item(tt(-i))( > -Force shell to be interactive. > +Force shell to be interactive. It is still possible to specify a > +script to execute. > ) > item(tt(-s))( > Force shell to read commands from the standard input. > @@ -27,6 +28,15 @@ execute. > ) > enditem() > > +If there are any remaining arguments after option processing, and neither > +of the options tt(-c) or tt(-s) was supplied, the first argument is taken > +as the file name of a script containing shell commands to be executed. If > +the option tt(PATH_SCRIPT) is set, and the file name does not contain a > +directory path (i.e. there is no `tt(/)' in the name), first the current > +directory and then the command path given by the variable tt(PATH) are > +searched for the script. If the option is not set or the file name > +contains a `tt(/)' it is used directly. > + > After the first one or two arguments have been appropriated as described above, > the remaining arguments are assigned to the positional parameters. > > Index: Doc/Zsh/options.yo > =================================================================== > RCS file: /cvsroot/zsh/zsh/Doc/Zsh/options.yo,v > retrieving revision 1.90 > diff -p -u -r1.90 options.yo > --- Doc/Zsh/options.yo 4 Feb 2010 17:40:07 -0000 1.90 > +++ Doc/Zsh/options.yo 15 Mar 2010 12:58:01 -0000 > @@ -1138,6 +1138,20 @@ executables specified in this form. Thi > indicated by this option, and regardless of whether `tt(.)' or the current > directory appear in the command search path. > ) > +pindex(PATH_SCRIPT) > +pindex(NO_PATH_SCRIPT) > +pindex(PATHSCRIPT) > +pindex(NOPATHSCRIPT) > +cindex(path search, for script argument to shell) > +item(tt(PATH_SCRIPT) )( > +If this option is not set, a script passed as the first non-option argument > +to the shell must contain the name of the file to open. If this > +option is set, and the script does not specify a directory path, > +the script is looked for first in the current directory, then in the > +command path. See > +ifnzman(noderef(Invocation))\ > +ifzman(the section INVOCATION in zmanref(zshmisc)). % grep INVOCATION Doc/**/*.1 Doc/zsh.1:.SH "INVOCATION" Doc/zshall.1:.SH "INVOCATION" Doc/zshoptions.1:the section INVOCATION in \fIzshmisc\fP(1)\&. so should it say zmanref(zsh) instead, or is invoke.yo included in the wrong manpage? -- Mikael Magnusson