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=-7.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26609 invoked from network); 7 Sep 2021 13:01:19 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Sep 2021 13:01:19 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1631019679; b=pojNoAQ9IR9omx26cVtqIFZwl0TtcZW8tPOnSORfnM7BYzJ1BAuJfEEsbvl9gvJx7nYvZM4HU2 flofBbFRk/iqIGi8NUK/ZV9upwly3YwrvcnsIamuo18Wj4cbw0luLiJNF8OWEexYm+Eke60ssQ z/X8o03XkvHri83l2SbVTtDtgDn7p70xrv8eeGD/Wtwmd5vFTfRAuuQwNC13yYZOwK1YAteR9Z TfPtH7iwR4acTweywqVVi40iuYoP0l7xW3689M74AZq+/eJN1xqkYvstv9f/KFCkUq4FaWh2A1 3+0CjpClrO9jYh8K4GoMDs7vL3Xe6lSDyqKWhz1tjGA1KQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (p3plsmtp06-04-2.prod.phx3.secureserver.net) smtp.remote-ip=97.74.135.59; dmarc=none header.from=rayninfo.co.uk; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1631019679; bh=tGRoYdeDd15eSeC1zgya73SK8UBFs679CCkZu7UI4X4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:DKIM-Signature; b=oiGubts1Vy7/Btz+iGHsa0UeZy8wJ0pHHDIOHsbCHDzTBkDX+iYWx4R1VlJ3d7QMKN0wTFa1x0 DiLc2DoA/Th/loFsVlNW+SLVfDqXHtL5I1+h6lFNvp1MuIHeifn2SeEOt7IrTAmwqvm0L4ko88 ocBid8UoY0fF6gyfucwaUG+iO29wOcEBCAmP4i+V7SPYVm8IRUi9OOhaek1SMwM6JIGZNaBhgf Bi62ncTcgtuxUlageolvdcWQru9rDLghFc4wWSTE9oTTl3Cp5egzfHc3ZXCgPd7Xc5zdxRupr4 Kerw9ysNbI3ZkfBZFNjidHs52+EcDump0PPoNz2s/IkRgg==; 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:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=tGRoYdeDd15eSeC1zgya73SK8UBFs679CCkZu7UI4X4=; b=NsdwKXyTGyvWBfKFzhZG5GMsTY Otzy+ZqAqJO9mw+f3zb50z9wCz0NFvVbgPRuZg+Ou4pbNPY8DK/DCfCFAQOIqvWM/5lMQgHfW9fP8 xVfdmYqXRP2QZh2j8HB7zox2jd20QE8a45prt76xgupn/tK66noSiumLXRld41YkLbiAUjN5gr73o Ouw6X3v7z3tG+G4S8x2GRnI1VgZ11WKjd4EaZF/4HnivimcdW6gUh1TYYvqIozj4G4BoNAH3/haSK I3gium1aU4058D5XZwrQgNNUbH+Km7yUmx+otpFychRhaQUdPesJxn2n4jUx2mrSgLZyTeraqhJg5 sGUapStg==; Received: from authenticated user by zero.zsh.org with local id 1mNaiy-000Ae3-3K; Tue, 07 Sep 2021 13:01:16 +0000 Authentication-Results: zsh.org; iprev=pass (p3plsmtp06-04-2.prod.phx3.secureserver.net) smtp.remote-ip=97.74.135.59; dmarc=none header.from=rayninfo.co.uk; arc=none Received: from p3plsmtp06-04-2.prod.phx3.secureserver.net ([97.74.135.59]:37663 helo=p3plwbeout06-04.prod.phx3.secureserver.net) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1mNahk-0009nl-RR; Tue, 07 Sep 2021 13:00:01 +0000 Received: from mailex.mailcore.me ([94.136.40.144]) by :WBEOUT: with ESMTP id NahhmWHg4Be79NahimbcBD; Tue, 07 Sep 2021 05:59:58 -0700 X-CMAE-Analysis: v=2.4 cv=W8f96Tak c=1 sm=1 tr=0 ts=6137624e a=wXHyRMViKMYRd//SnbHIqA==:117 a=FZe4aYP819v1gJ8TWQqDOQ==:17 a=peN1nrWoQT4A:10 a=IkcTkHD0fZMA:10 a=7QKq2e-ADPsA:10 a=0bVGPFuShBKJGGJCcScA:9 a=QEXdDO2ut3YA:10 X-SECURESERVER-ACCT: david@rayninfo.co.uk X-SID: NahhmWHg4Be79 Received: from [95.146.215.86] (helo=[192.168.1.231]) by smtp10.mailcore.me with esmtpa (Exim 4.94.2) (envelope-from ) id 1mNahg-0008B2-Lr for zsh-users@zsh.org; Tue, 07 Sep 2021 13:59:56 +0100 Subject: Re: Reverse history search and match for a specific token To: zsh-users@zsh.org References: <20210907105355.atgr45xbrjgbjtwr@trustfood.org> From: zzapper Message-ID: <25be0b2e-5ac1-bd51-8bf7-1ddb601ae181@rayninfo.co.uk> Date: Tue, 7 Sep 2021 13:59:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210907105355.atgr45xbrjgbjtwr@trustfood.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Mailcore-Auth: 8308408 X-Mailcore-Domain: 840527 X-123-reg-Authenticated: david@rayninfo.co.uk X-Originating-IP: 95.146.215.86 X-CMAE-Envelope: MS4xfKL+sri0qGeZAyBy7McSNqxetLPaxQL6AQBOOlw9Ho+HhoSJTR49e0YthpmCIzbsvL64VcznzLx96kZeXYZa/rf1CM6rru7Le2g1bAzbRlCjckWXUucP aT1dGrLeiZ6N6TgYKsebDxXTZHHko3ex10Z1XrnaMf+n08MskpCkjABnVOyYYjAkBqYNNZrki9JArQ== X-Seq: 27099 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 07/09/2021 11:53, Eric Smith wrote: > Hi zshellers, > > I use event history matching a fair amount and can subscript the command to return a specific token like this. > $ !?foo?:% > for the token containing foo > $ !?foo?:$ > for the last token > > How would I match for the token containing `bar`? > > Thanks for the tips. > > Best wishes > Eric echo !?foo?:2 # second echo !?foo?:0 # first echo !?foo?:%   # token echo !?foo?:$   # last That's all I know await other answers zzapper