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 27518 invoked from network); 7 Jul 2022 13:47:38 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Jul 2022 13:47:38 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1657201658; b=C10D+gZGSSWfW32oa0kQdQhkPy61YSoIrBj3ojd/ZRlzXz7dhtEpTSfLSsmUqG7CUqaM4A4vDx NIiD8sEQVdTiQja94gHyUcvGNXsvdMTic4P2IcYpqDXKf+ETH8CUzxZbOML00sJ+z7WvVphPqR CuaL8jjItaRqVDTfp1BfT1UVK7CrYWVvWZqfzEJEG4TmCH3x2V4OVgu4hS5e0QuTL8jITpLIsP GJRsZ8EqAFUxFUr/He5omMQHevCE1fFM/2LyTB8YMbu5+3rzN0ls1Ge/OFMqJUAXxYAjBc0BwJ TmEqjKeNVmOLv6DKj3vkDE9lDSNjxz3+loyV6AK8IdWtYA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97; 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=1657201658; bh=ZqdMQ8ZQTLUAJjNefBNOXA29mHJMqF+X5fyurFqnPls=; 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=BQ5WmVCb30He1L3BfdI/91rtytTmOXqElNXwZNQ/hKmhnNY0C1YQRiW92rffvDPAI89RLP3Seb mkbqhLGcmxVwWCFCvOSysuzjiuzVMw9T5hsQCWB/WdvCvsAI9OH7hvQsP/zd0k/2GhpfeSEshw uThXLsMkraVHl53VAzAx8ZW0ug+ubM9HFjYH/PBlH6A4CjhRPB2VJKy/ZhAFRYmI6LLjMJvdx7 xWt0hco6U/yguh9iiqKrqoxhd3HjWkYvgSqi14Wzuqjm5VlEa4zZBApWVJTuydR3ohJYBVp77Q g+NOYtmLfy9yqD3u4AbVkQWjL8JCawR8dNHjLNap4KDFfQ==; 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=ZqdMQ8ZQTLUAJjNefBNOXA29mHJMqF+X5fyurFqnPls=; b=l+eIBr5lVNtELILDPbqGTp6A/n xUKco/uMG/ZR2ImGcmHZZQo4U+h7nbCNWYTZweHlwhsgSOhJA+2O+/IZnv9XMSOMVI9+/v7qbcSb/ eu5LK20gWRj//XbduetP2C4PGkPCODeNaFmXv4s8yOjsY1oHJPbmvjhLWfZW+rHPfGyOuuUkWtcNX Sa5aDa5DM+37W2YGOYdjc28jtg+oaVMN4FYGq/rUUUWezVub/bnUN3pZ677e3nMsCjZlyMtr1QB+m oQjRZSuwd+q6E9/HROSkls/IISWsJVpbGU+zHLwEwZrtTfRf9hToqnQFXmytyhVdfvHHJu7vtSFHZ 2T/uZBqg==; Received: from authenticated user by zero.zsh.org with local id 1o9Rqz-000LhB-Gg; Thu, 07 Jul 2022 13:47:37 +0000 Authentication-Results: zsh.org; iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none Received: from smtpq2.tb.ukmail.iss.as9143.net ([212.54.57.97]:47778) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1o9Rpj-000Kyd-JD; Thu, 07 Jul 2022 13:46:23 +0000 Received: from [212.54.57.82] (helo=smtp3.tb.ukmail.iss.as9143.net) by smtpq2.tb.ukmail.iss.as9143.net with esmtp (Exim 4.90_1) (envelope-from ) id 1o9Rpi-0001y7-VN for zsh-users@zsh.org; Thu, 07 Jul 2022 15:46:19 +0200 Received: from oxbe17.tb.ukmail.iss.as9143.net ([172.25.160.148]) by smtp3.tb.ukmail.iss.as9143.net with ESMTP id 9RpioPjbksyQZ9RpioxSIt; Thu, 07 Jul 2022 15:46:18 +0200 X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-users@zsh.org X-SourceIP: 172.25.160.148 X-CNFS-Analysis: v=2.4 cv=W/8r6Dak c=1 sm=1 tr=0 ts=62c6e3aa cx=a_exe a=C4ceZvFKwZ2eZ1YMZ8iQeA==:117 a=1DWFKdCB1IcA:10 a=IkcTkHD0fZMA:10 a=ZjyAdWuDOD4A:10 a=pGLkceISAAAA:8 a=DBhdMuaOWJnzzcVsZ8UA:9 a=QEXdDO2ut3YA:10 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=1657201578; bh=ZqdMQ8ZQTLUAJjNefBNOXA29mHJMqF+X5fyurFqnPls=; h=Date:From:To:In-Reply-To:References:Subject; b=5zf+3OSDOZpdrLb68J4ZeDLefcSAZ3/lgFcENu6HMP1aYf/tAqLN+rEPAOJU5UMvH 5jr7PJTF/Jg99eb8mv0ArC8mVKYsT1vScDIaMoHsYqFToko8jzulbeCHFRgP+0exrE LQ1O5VsYqDUNscWX2EKSIy5t0sm4WgG7GbAh7USNPNAOruqxr/xZoUEFzBtXvMEh4T yX5YRJIfJ8fT3SsWuwN1806EzE2WYsdGcoRgaaIUvdvIuabcG6Jx/uUq1U08VfeK0w vcur0z/x4d6XGIkbQKc7nk9n+tmbdViEsq4URp9wjmmy+UDaPM0uKJB/0e5kZuvfiT isixl4tA6EhOQ== Date: Thu, 7 Jul 2022 14:46:18 +0100 (BST) From: Peter Stephenson To: zsh-user Message-ID: <275535579.503636.1657201578488@mail.virginmedia.com> In-Reply-To: <1728479877.503410.1657201438041@mail.virginmedia.com> References: <1728479877.503410.1657201438041@mail.virginmedia.com> Subject: Re: How to parse zsh history MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer X-Originating-IP: 147.161.224.167 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4xfMRpaiaVVArRlgaifGRqeXchaKQ6XyJX0P9oB6RkB+GvFsgygK7l6yrkV3c60yd/MF3YNQf1DtgtEbjAi/vAfgO98DjF6eodut8p7CV7PJmNllGmiGgt O7svk7PlUJs3ieNo5xQ7SseH0yRqC60aIPYd1kGM2EKgspxzQELqNNe+dWtiNM10p1lNEWXQB5+LI4ypBrtGcyguG8xBtA5apuznG5F5G5YZBArPymvDQm6P X-Seq: 27873 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: Sorry, *still* don't know how to reply to everybody... On 07/07/2022 06:56 Ahmad Ismail wrote: > I am working on a widget for fuzzy search history. I guess you want some variation on print -l ${history[(R)*(#a2)stuffhere*]} --- to be clear, this is outputting all history lines that are in shell memory that contain a string "stuffhere" with up to two approximations. I should have a play with that and let us know where you get stuck. $history is in the standard zsh/parameter module, so since you almost certainly have completion loaded it should be available already. If you need to load from files before search, fc has numerous options for that, including one to load to a local context so you don't pollute the global history. pws