From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: Can't trace script not in PATH
Date: Mon, 23 Aug 2010 15:27:21 +0200 [thread overview]
Message-ID: <AANLkTin5QqjLXUB11Zs-vUoBgwu95iO5=7TgEzhJ9aBo@mail.gmail.com> (raw)
In-Reply-To: <20100315125923.63a6afa6@news01>
On 15 March 2010 14:59, Peter Stephenson <pws@csr.com> 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) <K> <S>)(
> +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
next prev parent reply other threads:[~2010-08-23 13:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <38D4FA2BB99A674BADDED237051D97A70EE02067@FFBRUE001.cfmu.corp.eurocontrol.int>
2010-03-15 12:59 ` Peter Stephenson
2010-03-15 14:03 ` Peter Stephenson
2010-03-15 15:30 ` Peter Stephenson
2010-08-23 13:27 ` Mikael Magnusson [this message]
2010-08-23 13:41 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTin5QqjLXUB11Zs-vUoBgwu95iO5=7TgEzhJ9aBo@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).