Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Chet Ramey Newsgroups: gnu.bash.bug Subject: Re: Issues with history substitution and its documentation Date: Mon, 18 Nov 2019 11:18:56 -0500 Lines: 15 Approved: bug-bash@gnu.org Message-ID: References: <6387fbce-a15e-8a32-8eea-d4cec4587f62@case.edu> Reply-To: chet.ramey@case.edu NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: usenet.stanford.edu 1574093944 17959 209.51.188.17 (18 Nov 2019 16:19:04 GMT) X-Complaints-To: action@cs.stanford.edu Cc: chet.ramey@case.edu To: Jim Monte , bug-bash@gnu.org Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1574093939; bh=DKfYAVsz8YtJ3cRAT8f2WiIZO30zPUb1UtNeEEtWbRM=; h=Reply-To:Cc:Subject:To:References:From:Message-ID:Date: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=ELFmEF3H+rTS/FU3JrlTCDHW8B0oeCAbicwNsGXRwR6YFYkmnvCTOTCnd93NNNokJ0 7hhroFOdw4gItJ/EKcpjRYP2SpHLttzIFYZIWb1ify0oU6lddXpJ8MgO/smNVTYTvBE DXAKzEabtVBishZxKuSiR/0ounde1l7g6jiAZGacv6Jc2TknvuhZNzuRbCnwjkicz3w Mb6RQIUSjzO4FlyX7SlNZS8ZdHMqe9xkLvP+llk0FDglvFoLkPtt9k6TaEVq8D31ebQ wOE0ZR3TlZwv8ugz5qgpg+B9JRUKcfBSwPyH/DXrPcIk0loCENZyWHadx7QKcalOGwp algUEbVg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1574093938; bh=KtHyevJpUZWBr3S5taa7TEXVrXLofwS6mupNK3MvA+A=; h=Reply-To:Cc:Subject:To:References:From:Message-ID:Date: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=3lVx2Py6wyy0B5Hpyn6EUtQV5xAYWlSVBWh1oSp0TZBN3AdLakbNOJh7c8WyB3hkja wD/rNoC1kcVGT2TbASVPCgeHh7H7ob4s5yPLz4oIDON9mZxB9OfxKbI754adxnYoSrv 3pkARxtF9hCRBGYpwMNPKhz7JTxiSVckhDuPRTGkXRHtWchv5uKJ19hDs8qFeBtKVd7 TjF7Ws4l1boxJZlagIOvNAjbxvqYmvbPDgV+QnDnXcqEg2PYx1P5PLPmGsoW4AFXU9H nt2vIyxui832/i4m8Pzy7vgNVDogacusdlJOTLlCxQ0MMDGrPhJVOafZgMwuJmUa0UC F9H+h78A== User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 In-Reply-To: Content-Language: en-US X-Junkmail-Status: score=7/90, host=mpv2-2015.case.edu X-Junkmail-PrAS-Raw: score=7/90, refid=2.7.2:2019.11.18.145116:17:7.944, ip=, rules=DKIM_SIGNATURE, __HAS_REPLYTO, __HAS_CC_HDR, __SUBJ_REPLY, __PHISH_SPEAR_SUBJ_ALERT, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __TO_MALFORMED_2, __TO_NAME, __TO_NAME_DIFF_FROM_ACC, __HAS_REFERENCES, __REFERENCES, __HAS_FROM, FROM_EDU_TLD, __HAS_MSGID, __SANE_MSGID, DATE_TZ_NA, __USER_AGENT, __MOZILLA_USER_AGENT, __MIME_VERSION, __IN_REP_TO, __CT, __CT_TEXT_PLAIN, __CTE, __REPLYTO_SAMEAS_FROM_ADDY, __REPLYTO_SAMEAS_FROM_ACC, __FROM_DOMAIN_IN_ANY_CC1, __FROM_DOMAIN_IN_ANY_CC2, __REPLYTO_SAMEAS_FROM_DOMAIN, __DKIM_ALIGNS_1, __DKIM_ALIGNS_2, __ANY_URI, __URI_MAILTO, __URI_WITH_PATH, __URI_NO_WWW, __CP_URI_IN_BODY, __SUBJ_ALPHA_NEGATE, __URI_IN_BODY, __URI_NOT_IMG, __BODY_NO_MAILTO, __NO_HTML_TAG_RAW, BODY_SIZE_600_699, BODYTEXTP_SIZE_3000_LESS, __MIME_TEXT_P1, __MIME_TEXT_ONLY, __URI_NS, HTML_00_01, HTML_00_10, DKIM_ALIGNS, BODY_SIZE_5000_LESS, [TRUNCATED], so=2010-03-03 19:42:08, dmn=2016-08-03-0138 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 129.22.103.227 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <6387fbce-a15e-8a32-8eea-d4cec4587f62@case.edu> X-Mailman-Original-References: Xref: csiph.com gnu.bash.bug:15605 On 11/4/19 9:42 AM, Jim Monte wrote: > Related to the issues with the ? event designator, the %word designator > substitutes the *first* word matched by the ? event designator or nothing > if the match begins with a space. These details are not documented. Thanks. The issue is that, unlike csh, bash allows substring matches to span `words'. This leads to issues when the matching portion does not begin on a word character. If the match begins on a non-word, how do you substitute a word there? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/