From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27621 invoked from network); 22 Feb 2022 10:19:37 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Feb 2022 10:19:37 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1645525177; b=c1iLuHYrDr5vX/5F1eNNXWnkMba2Q+XrbEweFNTa8n/59H9i4Du/vycrw8vppyd3KcQz4hvmzi anb13hAnyn9AUtx9PizuABfyOXm0AIwtjcy42cckE19sLWXyLrCQNV0CcZ9DgKJPJVkRJRLc1L 0W5YvKXyqlYhw10YieHV6dtsSldqgJ3FBg1sgqDqNbRNhS3eOUMo+AFJZz44UvSuHmYGMxX/A5 z2GGLHKo50wUauqbUqCUA7UPBrZtYbqArMavbbj2TxehK/fLEgPDQXDvbLaP1OXxmKdAO3S5XF pw7sTUnd0x2kfCsMmIWpO4G2gAKe0yJOFNhZDYItiDmFlA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1645525177; bh=+4blNuigkgnkKk952PfdPxFIgmo9oI0lPj3cFyWb3ls=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject: References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature: DKIM-Signature; b=rW9cz9yvOuwrwPfMCh1f9PKbZYHDYZGOcJOyTALG1u4gAvxSoOJRAzd//tz0/SknWoQtsl3ocz 9ejzjEJo5OOCFdO/koYeQueKIlfnOsI+u+B52dqIl5MwnKxsWzGc7D2IgSBe4+U0QSYRgdEG59 IqqoFXhsOs8T76MoYV5Tg0Z5EmlQkAAywOjg1U6AC1AMBxVpwrMeuzdqgHHFzDw7bGRIU9KiUQ 8pKOL5NjyuhCwFs7uIdMOXJydjV+cqyPVKC3LjinHT/IIr7wOPNjkFHRwuSKXFBjw6gAt4vRWv +kOpU3vIPcGtDRYm53TBhLY9TwxeUW6jAAD9/bKVXdhN/Q==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From: Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=tGMO8zeqsEol5+/FxNalpsZ71THGzBhuUu+P2b+3mlA=; b=M89Dam642cOfBeckOyD69thmJ3 wuPb28Mn7aJ+ew6qDakl7tyye7/yS1/99B9O3cGmMQpCr1U+g91MuBXOg9LimQhsW+Os0SvlcMqIR uGBJKNkBIPXhILMDk0MwF9DRcjsIYL8n7/08gOr24YmJ9LhRUZCqeTgLZRYSriZJcAkA/lMc2JsT4 A3uJHYUCabFz11W1ZTh/OfzUfU0PAauiKHrs201H9+lWe48b04qQR2uRBRTelx7gDDnPmWyHWNOvg LIArM3DczP44sIE7f1AXS0BhSACLTrJmqfsr72GdhMlPKkiUHNBSpjaOhFd05snGGah6xl/n1HA2/ 4GGQlhTw==; Received: from authenticated user by zero.zsh.org with local id 1nMSGf-000DQt-Ir; Tue, 22 Feb 2022 10:19:37 +0000 Authentication-Results: zsh.org; iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none Received: from smtpq1.tb.ukmail.iss.as9143.net ([212.54.57.96]:53040) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1nMSFq-000CgI-3O; Tue, 22 Feb 2022 10:18:46 +0000 Received: from [212.54.57.81] (helo=smtp2.tb.ukmail.iss.as9143.net) by smtpq1.tb.ukmail.iss.as9143.net with esmtp (Exim 4.90_1) (envelope-from ) id 1nMSFp-0000wL-Ss for zsh-users@zsh.org; Tue, 22 Feb 2022 11:18:45 +0100 Received: from oxbe7.tb.ukmail.iss.as9143.net ([172.25.160.138]) by smtp2.tb.ukmail.iss.as9143.net with ESMTP id MSFpnk7ffcIP2MSFpnMOMP; Tue, 22 Feb 2022 11:18:45 +0100 X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-users@zsh.org X-SourceIP: 172.25.160.138 X-CNFS-Analysis: v=2.4 cv=RL6goqu+ c=1 sm=1 tr=0 ts=6214b885 cx=a_exe a=fsVlV1GYKS3C/xnq+HX56g==:117 a=wbvTLvLwOfMA:10 a=IkcTkHD0fZMA:10 a=7H6ixmLU1AQA:10 a=22Ro6XbQAAAA:8 a=B2asGv0OLMUEVXObgg8A:9 a=QEXdDO2ut3YA:10 a=p1RiBf0vZFgkX3Jmbd9N:22 X-Authenticated-Sender: p.w.stephenson@ntlworld.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com; s=meg.feb2017; t=1645525125; bh=+4blNuigkgnkKk952PfdPxFIgmo9oI0lPj3cFyWb3ls=; h=Date:From:To:In-Reply-To:References:Subject; b=jJwF9FriIeGqYBXI8pXLJU/AZ0B0kp3t6BqZUGytl1O51EReGN+FQOkAyIHNPbpeY 6UnyftR+GnUG/1nu93QGBiR4RsQoQq15BztfvcNZ8coqhq2oGSODIKEiONjtJv1MON 6ObVzo6Wa6J5v6gshgVvrCF+lLTOXL8pEn1zZ1OW3ofFXBzsrpuaK+SMV1JgaMWAyX dvYcb8WBpcR1vMyVMF3Fq88+o7IiZJo4nHwpwsPF4Uye7tMMANfS0rwRexu0UHyzUS uha8JS/A6dXDcEEdn2HXGoMvxCTqHcN29FyrEIAUeZY/XFP9cdJRdKtLUk96ThnoP6 S542hBvZ50w8w== Date: Tue, 22 Feb 2022 10:18:45 +0000 (GMT) From: Peter Stephenson To: zzapper , zsh-users@zsh.org Message-ID: <1117602475.939955.1645525125795@mail2.virginmedia.com> In-Reply-To: References: <894112583.938338.1645522071761@mail2.virginmedia.com> <90c8c271-6ac0-2a4a-e19a-9f179fe1f399@rayninfo.co.uk> Subject: Re: Using history / fc for case-insensitive pattern matching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev72 X-Originating-IP: 147.161.167.85 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4xfA+csGAwA/N9YUQ2GxLDlPwltQwhCTsaniiPTHWGS987Q/3S1xBF6VUYiUMSGJbzfQ42IlgyLd+j8DH0k2XErlAzKwaoDuussamR9YeR7lEfJqshHpJN VVQzR7XO4jrLMoTnk2OTOfGifPb0zkYl783zos50rM1Mshl1D/hshAnxsnkyyOuWn1J7J2iPpmahT35hkey218V7V8ZDknRMUuvOhyYUyyTpk4J1CD84i8v3 vihm2y5yP4Ax86S/S2V7LQ== X-Seq: 27536 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: > On 22 February 2022 at 09:47 zzapper wrote: > # pws: yes thanks the following works > > > > fc -l -m '(#i)*Mortg*' 1 > > > > > > (should this be documented?) > > > > zzapper > > > > > To answer my own question: with fc any number range eg first last > should/must be the last Would this be a little clearer? History (pun intended) shows that making the docs more verbose doesn't mean people necessarily find them clearer, but I think they are particularly terse at this point. pws diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index c7de50f..dbb787f 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -756,15 +756,16 @@ specifies the most recent event beginning with the given string. All substitutions var(old)tt(=)var(new), if any, are then performed on the text of the events. -In addition to the number range, +The range of events selected by numbers can be narrowed further by the +following flags. startsitem() sitem(tt(-I))(restricts to only internal events (not from tt($HISTFILE))) sitem(tt(-L))(restricts to only local events (not from other shells, see tt(SHARE_HISTORY) in ifzman(zmanref(zshoptions))\ ifnzman(noderef(Description of Options)) -- note that tt($HISTFILE) is considered local when read at startup)) -sitem(tt(-m))(takes the first argument as a pattern (should be quoted) and -only the history events matching this pattern are considered) +sitem(tt(-m))(takes the first argument as a pattern (which should be +quoted) and only the history events matching this pattern are considered) endsitem() If var(first) is not specified, it will be set to -1 (the most recent