Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: function copy
- X-seq: zsh-workers 44531
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: PATCH: function copy
- Date: Mon, 15 Jul 2019 22:23:55 +0200
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VtS+YjqIvzLV4VfBdJmZNn6ydVGlvQLvx5MnDPoVW3o=; b=Etwn+IueoiHZaTfGaMMHjQ7P6ixVJNjIKmusfSh+dSHkMexlRzwAHOnU37fB3hwZ2P L59RPhUcQo/sYaO5iPEAxOs1W/TVrAKFz5eEQiPoqfZLXXaHjmvPBD9n0kBpqxxNWxKd ZCbwcacoonk7RU9ZaoX0eqJKXsY6smGhFrtp/aaewkitD+yms/xMnwhasqbe3F7+JqAw 0yMeFu0Lp5+cFgoVqWDjHUBTCAMJOCVxQToAJSgGBO4LjMHSW/HY9Eu3MDsY9MMB8p+d 2Fs5XVr8f1RyMeqy3WraivnKy6uUXtzGlUhODMKNb8CyvYciIjnFTKzVi7s9XZzfFoNz KohQ==
- In-reply-to: <b80d50af30a0e94f5335d3deeb2bd7d4594ba112.camel@ntlworld.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <b80d50af30a0e94f5335d3deeb2bd7d4594ba112.camel@ntlworld.com>
On Mon, 15 Jul 2019 at 22:01, Peter Stephenson
<p.w.stephenson@xxxxxxxxxxxx> wrote:
> + if (OPT_ISSET(ops,'c')) {
> + Shfunc newsh;
> + if (!*argv || !argv[1] || argv[2]) {
> + zwarnnam(name, "-c: requires two arguments");
> + return 1;
> + }
I'm probably wrong, as the tests should caught that up, but should the
"argv[2]" in the line:
> + if (!*argv || !argv[1] || argv[2]) {
actually say "!argv[2]"?
Hmm.. There's probably a shift-like operation in bin_functions, which
makes the check argv[2] be actually for an third argument?
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author