From: Stephane CHAZELAS <stephane_chazelas@yahoo.fr>
To: zsh-workers@zsh.org
Subject: Re: _N_GNU_nonoption_argv_flags_
Date: Wed, 28 Sep 2011 09:29:27 +0000 (UTC) [thread overview]
Message-ID: <slrnj85q7n.795.stephane.chazelas@spam.is.invalid> (raw)
In-Reply-To: <110927191325.ZM25485@torch.brasslantern.com>
2011-09-27, 19:13(-07), Bart Schaefer:
> On Sep 27, 7:42pm, Stephane Chazelas wrote:
> }
> } _N_GNU_nonoption_argv_flags_
> } (Here N is grep's numeric process ID.) If the ith
> } character of this environment variable's value is
> } 1, do not consider the ith operand of grep to be
> } an option, even if it appears to be one.
> }
> } It's news to me. Is there any plan for zsh to implement that?
>
> I would have to guess there are no plans, because I've never heard
> it mentioned (either the variable itself, or of implementing it).
I've just seen this in GNU bash source (GPL code):
#if 0 /* UNUSED -- it caused too many problems */
void
put_gnu_argv_flags_into_env (pid, flags_string)
intmax_t pid;
char *flags_string;
{
char *dummy, *pbuf;
int l, fl;
pbuf = itos (pid);
l = strlen (pbuf);
fl = strlen (flags_string);
dummy = (char *)xmalloc (l + fl + 30);
dummy[0] = '_';
strcpy (dummy + 1, pbuf);
strcpy (dummy + 1 + l, "_GNU_nonoption_argv_flags_");
dummy[l + 27] = '=';
strcpy (dummy + l + 28, flags_string);
free (pbuf);
export_env = add_or_supercede_exported_var (dummy, 0);
}
#endif
If Chet reads us, what were the "too many problems" caused.
Where does that come from. I expect it to be an extension of GNU
getopt, but that is not mentionned in the documentation, a grep
on libc.so doesn't return anything and actually it doesn't seem
to even work here:
sh -c 'export _$$_GNU_nonoption_argv_flags_=1111; exec grep -t a'
grep: invalid option -- 't'
--
Stephane
prev parent reply other threads:[~2011-09-28 10:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-27 18:42 _N_GNU_nonoption_argv_flags_ Stephane Chazelas
2011-09-28 2:13 ` _N_GNU_nonoption_argv_flags_ Bart Schaefer
2011-09-28 9:29 ` Stephane CHAZELAS [this message]
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=slrnj85q7n.795.stephane.chazelas@spam.is.invalid \
--to=stephane_chazelas@yahoo.fr \
--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).