From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23072 invoked by alias); 28 Sep 2011 10:05:23 -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: 29806 Received: (qmail 9536 invoked from network); 28 Sep 2011 10:05:22 -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=-3.3 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at m.gmane.org designates 80.91.229.12 as permitted sender) X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: zsh-workers@zsh.org To: zsh-workers@zsh.org From: Stephane CHAZELAS Subject: Re: _N_GNU_nonoption_argv_flags_ Date: Wed, 28 Sep 2011 09:29:27 +0000 (UTC) Message-ID: References: <20110927184201.GB5502@yahoo.fr> <110927191325.ZM25485@torch.brasslantern.com> X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 188-223-3-27.zone14.bethere.co.uk Mail-Copies-To: nobody User-Agent: slrn/pre1.0.0-18 (Linux) 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