From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id GMjGA6SaLGeyawEAe85BDQ:P1 (envelope-from ) for ; Thu, 07 Nov 2024 10:47:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id GMjGA6SaLGeyawEAe85BDQ (envelope-from ) for ; Thu, 07 Nov 2024 11:47:00 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=qq.com header.s=s201512 header.b=QKjIa2uz; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730976419; a=rsa-sha256; cv=none; b=ZpOehhXpcZp2Hltc4Q2bq6wAtlUmikLZ+0Ll0DPnmOPhTYlO2DlRuZ376Xk74yOmOAJA5Q wyLZx+DZDsvSXXDPEx0+Er4+iZu0BNMAX/E0E0RvHp3WfjoQ/z97Mvz6sKzDnC9UhY1mlh uZ8kbXSJVNu4HdisfKDvg3c/czhD5YqzQXrDmVicqD/ZWmsOdFf1rhMo9IozkohPFhxl24 OOsXyZ9HiEoOgPMJZo92IyFoYnphkw4w42lCCu2/iNCdjtB2AzuCWEv/LP4RYp1js6A0MM JPbnAjqNb9jmAZYadAF3wq/XbMC4RiGSCsfyg7P5IqHXz5h0aYxqJKD1iJ527g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=qq.com header.s=s201512 header.b=QKjIa2uz; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730976419; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=EVz6q16qMfZ14rIi/UblGSc/4ZKPXsE69CPy+MwPlt0=; b=p7KFuPaELEwAgNUSybmv8/B78tqXuxYfgCA/ItBKD1p4zJjMZzXsWqOKoSgHsUklcBewWk TcwwL4tUwg2ouqiiu5W00ifm0Zgw8D98kPLJemIYRdZY9BsRgTQY9z27cT2pWLmDgNnzKQ vFK6vCXpkLTouDuN7obwRiHJVXtDzuoahDVu/r+JqU/rYF+y23eIU+834C5Vz+oxu5vLDk qvM+89yh3NfjAVHmULTwaFlRH+V4pWe50OXAG5BNqe9DkgP3uHzblwn9F/LybZMZN5/RZ/ H9DUqFqXVHnYOuoUr2D3VIwey3ZMAtmawdZu3jfhp/7NuWDgmG+bfBJCJ1ciAg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A0E5C8B4B5 for ; Thu, 07 Nov 2024 11:46:59 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t901i-0006oM-JU; Thu, 07 Nov 2024 05:46:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t901f-0006ns-Rw for emacs-orgmode@gnu.org; Thu, 07 Nov 2024 05:46:07 -0500 Received: from xmbghk7.mail.qq.com ([43.163.128.46]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t901a-0006dC-EW for emacs-orgmode@gnu.org; Thu, 07 Nov 2024 05:46:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1730976352; bh=EVz6q16qMfZ14rIi/UblGSc/4ZKPXsE69CPy+MwPlt0=; h=Subject:From:To:Date:In-Reply-To:References; b=QKjIa2uzuaLuZWIpFZ81KkOVUO4mcQSamoLUTDpQ2OIh5rFCi9ZIcpP2TY7C7h9A4 ipH/ZhzWgnhG3hrmqnwANbc60iq5SgToYl9o+nFKeDRlkHUNLiDeeIsZ+uNNhCo5V/ gnaTd1SThRVwehhDVdagGsYkcjUhZ5RRXbkgWBMg= Received: from [10.8.166.199] ([171.217.24.55]) by newxmesmtplogicsvrszb20-0.qq.com (NewEsmtp) with SMTP id B23126AE; Thu, 07 Nov 2024 18:44:35 +0800 X-QQ-mid: xmsmtpt1730976275tazxio6aq Message-ID: X-QQ-XMAILINFO: N3QMWHy44bBn+f4WYzyXoHZqKRDw7IXF3kjXRpdf31p1raEkF4j7boUL8c1hy/ u1FqKhdeYOq5bXJvFubNINrPxNQA+hpUamlajpkrguC9B8lSeef/Hd/ySxs/I8CygRO/Sh9AKdNi fdmqAJEDr4KulzlJdqxnj3Z/HZRJ/4CmI8OBTrRnV0b+dhc6ftLXxJk7wkYu+aDenIzEU2xo7BH/ 18LWn8y1Eeqz6qLPibvzxODFLn+agBFu/ZGjvM5UWx8mkm01apBGnFebm8Y131DZ/1EsNytFe9gy J3NbGO8EtnGx5VCK56wvT91K7z5D4yc94BPeevOZhIb8iWxAp6k/WTt12KzAyhpyQIy0loTd2StH XziC9G6PMOtKVkD633LTBSV15MKSYQDe1jxOcbU5Q70uOIqgSG0bWZA7oXpEqmDhRyVZvnFyEUdG 7uil3R4GvS78W5vgncbGqGKBrRdqU8ERiUhWuaNz0TptubiPfb5oE+youGbrZSxG3OmjgixUIoDU El9yfvlkxeoN9AgzDvZBsjAxE3jjBMOs0FYAfkIdSK8QlfkV6KXipaWTIhQK4tdaQKdMp6ZP2cHd y7LMsQZUx6/V8SxToVk1NnbzDvhoXQkCHuFkaXO0FZcHonOs1U6bPNETFRX8k2U8hhAgblF2vzQx pg+5EJuhpnhZ9fq8vhBeOD09C7LMX0QETbjtOG2EbsgWLNvFAr6Id2RpOv+VKMCuthmd3W9SJPCJ aiBZq0CGcOnQqJndwy/sWWTJ8SMprrXslNm6jOjKU11qdx4C58UdN3DvA1yDB7xNtutp27rccO3O ZmquzGyh35otIM7Y5UrZF6qha1++yXjNFbeMJyCMPrqlfYBufwdoGiDHPPdO8U4MjwDtks5s+nPx hsUAec58yIVUwMii4t9vm8Iu7FIjiK4IRbZ2cCGkSXaJ1n7vx0LtVwXWsygXfAqdd85zBZzmxY X-QQ-XMRINFO: NyFYKkN4Ny6FSmKK/uo/jdU= X-OQ-MSGID: <64f9cf9d4411b0c3beaf26ad29f70c8c8a3ea896.camel@shellcodes.org> Subject: Re: [PATCH] Fix `grep' command to handle filenames starting with '-'. From: lux To: Rens Oliemans , emacs-orgmode@gnu.org Date: Thu, 07 Nov 2024 18:44:34 +0800 In-Reply-To: <874j4j8gz2.fsf@rensoliemans.nl> References: <874j4j8gz2.fsf@rensoliemans.nl> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.1-1 MIME-Version: 1.0 Received-SPF: none client-ip=43.163.128.46; envelope-from=lx@shellcodes.org; helo=xmbghk7.mail.qq.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.10 X-Spam-Score: -2.10 X-Migadu-Queue-Id: A0E5C8B4B5 X-Migadu-Scanner: mx10.migadu.com X-TUID: EV/ssqcVZO9V On Thu, 2024-11-07 at 11:40 +0100, Rens Oliemans wrote: > Xi Lu writes: >=20 > > - =C2=A0=C2=A0=C2=A0 (grep (format "grep -rnH -e '%s' *" ',region-strin= g))] > > + =C2=A0=C2=A0=C2=A0 (grep (format "grep -rnH -e '%s' ./*" ',region-str= ing))] >=20 > This works so my comment might be a bit too bikesheddy, but another metho= d > would be to > append the argument `--` after the list of options to ensure that the res= t of > the > arguments aren't parsed as options; perhaps that's preferred. Yes, but I haven't tested it on other Unix-like platforms, so I'm not sure = if "- -" will work properly on all of them.