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,FREEMAIL_FROM,HTML_MESSAGE,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 26582 invoked from network); 17 Aug 2022 22:01:37 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Aug 2022 22:01:37 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1660773697; b=hScCVt0K37MCgfgeBmwUhfM04+3pq6Be2Zdw2qR39o5s4c3D6vLa655bwkl46/q/uCgPjOPRsS mMylbdiBntXxoKPOyxrJ3fNaemNeLP9cZYyrsvG8v5QHuCXIQ48VWcg14XYaOMdx1jW4zsh4mf UL3egF/5IXY3ndtuT8RjtxwHr4lPgCe59pXt80ExsJIgII2rO3TQVdlfejONUQXrmFRwsaPCRt HLSNKe3Lq0I8nfXzNk/LqjjgwbB41OJScdxYZzt6HA7/g28pA0tGtaH2fiM+rcVorheVI7RIt8 nrpk5cTzs3ql/fRL+7o2uxko9ttljA8wFHS62OaH3v8ZHQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-vk1-f174.google.com) smtp.remote-ip=209.85.221.174; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1660773697; bh=S8LzUzm+tUFBpYmZK65PikG/hHlRL3SN2YtVkBlGjJg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=UBqaLs9gAYOgA5gwcPFWPaXgVP4jBMJMXsM+mxGfT7NCArKffPWmJqp6RETb8K6t0QmwHPLVvZ zcrvXbmEIIfK5qsPwCEzRO+na38rOuAQstGv4Nw9+G+A6TRn7zKlZHGOucJDXvwDfwh7WKayDa N3LxzLFLf89ZCMbHIO7k9SVfG3S5dUzCX2EQ4UuR8wRa0Ez5R2x79ADrLqFmJAXCDbYQ8S/lPl HLKhEwM2wsV94dNpCPjS/syJ9XYIHH9cECymA+wu6by+PZaFKVNbhFV2SKVWVEjA6d7imbuE9L MU9v5qtziOwuQnKJ23hJ6wCg6rVOIeiJCxpajsA1o+J/WA==; 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-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=FmQ+O7eoQpTfj5vp35DyGb+738Kmw4gRrbUir+ItpMM=; b=hAem+Maa1Mm3gmRVqpDF6Bqc8L Bbzwevi4z8pfM99FBF03ALsnnLOwz8Fv9LjIeV8MgV0Jf1QX2ImNk8t2cJlwFI9P3pLzFr8QPR7nR 4E/nCFx483PV12yStyxPzMrocfumuOWeYODLtc906Ev4xrJU9Wa04WsZfVSuBN+ShjO3tj2MjFWr2 mTOMZ4BN8V/D/0/OF/ZkoLDPG1OscHuylPOiNwgFyRHbDJC8xbnB96gtT7C1OFWHtcjKFPWXGDjPW yawwN17+xPugxtVOnKWFi6alBkAsQdoYDLwROIYgxFp5NxWKFGwOmC7b2AFxrIQqv3YjUTsEeUjkN 3BZ+2X2A==; Received: from authenticated user by zero.zsh.org with local id 1oOR6V-0009gl-TE; Wed, 17 Aug 2022 22:01:35 +0000 Authentication-Results: zsh.org; iprev=pass (mail-vk1-f174.google.com) smtp.remote-ip=209.85.221.174; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-vk1-f174.google.com ([209.85.221.174]:45679) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oOR5U-00091G-Cf; Wed, 17 Aug 2022 22:00:33 +0000 Received: by mail-vk1-f174.google.com with SMTP id t64so7340096vkb.12 for ; Wed, 17 Aug 2022 15:00:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc; bh=FmQ+O7eoQpTfj5vp35DyGb+738Kmw4gRrbUir+ItpMM=; b=odabqpco5JsS/THFPyyR3/jrYlQMPIxcp1V6wu3mryNzMjB0+/sqOLXteRc3zSCG3Q +W0Ky0eetywXKqpwZ4u15NY27vZNaGWN0yD46jgO2nZbAZdtSCnr8iBXaHBue9k9wHBe bzDGKY39oiGiHC6swSDkMZ1vbEu91NJvQwCwDJjeOjDmZA96XBkIQ/RWjoul78Xr2oek lEGd1WrBHrHQ4NHv3z7X26a7W3fBtLEwQynvHBiRt/D120sLHVPeTEwlZovhRgv+S9Vk bMJVwvH+Ls/Utjh1an4satwYgcZqI6h8yWSszDorOh5wIb1j/w2fXb4tlzorjT2Mhct+ 1emA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc; bh=FmQ+O7eoQpTfj5vp35DyGb+738Kmw4gRrbUir+ItpMM=; b=Hpg9DFr2bvO6KNK7s+vM5UVj75XAzNAqcBw378LbU0VTVh5ZsHogRTmBRcjiA9FcmA l9uj+EIMJ2l93DuRgAsPeuXDcnR3AuqPEZrKCwZYCtr5sfObCdSdXBJNBrW4vglk38fe FNYEziV1srFKvZ9jlaXntd8TRllIXsiAhTfCdlMKq476ocavEN0K7lHuYq1cQUGvvKZQ DpjQIb1HIVWe6KOR9kPE/aQWDsigaFjpFPJfqJHmeoShxkNf0VCx0H0IydVjc6rmAYWQ 1lWMO2VBhqKN9NhIYEoZkUoxwrJ5qSsnayVNFQ1aWiTaTvXyjTLpvq5Be1vWyTdkBVk5 zlsw== X-Gm-Message-State: ACgBeo0QMSsJX3cIo1+mcC8YLN2LlFdJIVdsCmmYDhH8kraBMmpHa4G+ di/72QnSdtT+PBMQHnPAL2n/oiB3gQrRmzTai/M= X-Google-Smtp-Source: AA6agR5nX87cmRfpLQk5etaMH0S6XPDBUc49hD1p+6nuLNI9YbDNUwYQCxsfuwP+0PFU0CEZRpLI+A5iNyrCgOfpbtE= X-Received: by 2002:a05:6122:214f:b0:377:dd43:ba43 with SMTP id m15-20020a056122214f00b00377dd43ba43mr32817vkd.39.1660773630618; Wed, 17 Aug 2022 15:00:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Zach Riggle Date: Wed, 17 Aug 2022 15:00:19 -0700 Message-ID: Subject: Re: Enhanced history-incremental-search To: dominik.vogt@gmx.de, Zsh Users Content-Type: multipart/alternative; boundary="0000000000004e301e05e676fe41" X-Seq: 27962 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: --0000000000004e301e05e676fe41 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm a big fan of history-substring-search, which lets you type any portion of a command and just hit =E2=86=91 and scroll through the matches. No nee= d for Ctrl+R keyboard combo, just arrow keys. https://github.com/zsh-users/zsh-history-substring-search *Zach Riggle* On Wed, Aug 17, 2022 at 2:24 AM Dominik Vogt wrote: > On Tue, Aug 16, 2022 at 01:27:07PM -0700, Bart Schaefer wrote: > > On Tue, Aug 16, 2022 at 3:41 AM Dominik Vogt > wrote: > > > > > > I'd like to have a context sensitive kind of > > > history-incremental-search-*. > > > > history-beginning-incremental-search-backward () { > > zle -U "^${LBUFFER}${BUFFER:+*}" > > zle history-incremental-pattern-search-backward -K ipsearchback > > } > > zle -N history-beginning-incremental-search-backward > > bindkey ^R history-beginning-incremental-search-backward > > bindkey -A isearch ipsearchback > > bindkey -M ipsearchback ^R history-incremental-search-backward > > Thanks a lot, that works fine! > > > The "cycle" part is left as an exercise, because that's not supported > > natively by the history-incremental-* widgets. > > That was only bad choice of words. In a history with two million > lines it is pointless to search in cycles. > > Ciao > > Dominik ^_^ ^_^ > > -- > > Dominik Vogt > > --0000000000004e301e05e676fe41 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm a big fan of history-substring-search, which lets = you type any portion of a command and just hit =E2=86=91 and scroll through= the matches.=C2=A0 No need for Ctrl+R keyboard combo, just arrow keys.

On We= d, Aug 17, 2022 at 2:24 AM Dominik Vogt <dominik.vogt@gmx.de> wrote:
On Tue, Aug 16, 2022 at 01:27:07PM -0700, Bart S= chaefer wrote:
> On Tue, Aug 16, 2022 at 3:41 AM Dominik Vogt <dominik.vogt@gmx.de> wrote:
> >
> > I'd like to have a context sensitive kind of
> > history-incremental-search-*.
>
> history-beginning-incremental-search-backward () {
>=C2=A0 =C2=A0zle -U "^${LBUFFER}${BUFFER:+*}"
>=C2=A0 =C2=A0zle history-incremental-pattern-search-backward -K ipsearc= hback
> }
> zle -N history-beginning-incremental-search-backward
> bindkey ^R history-beginning-incremental-search-backward
> bindkey -A isearch ipsearchback
> bindkey -M ipsearchback ^R history-incremental-search-backward

Thanks a lot, that works fine!

> The "cycle" part is left as an exercise, because that's = not supported
> natively by the history-incremental-* widgets.

That was only bad choice of words.=C2=A0 In a history with two million
lines it is pointless to search in cycles.

Ciao

Dominik ^_^=C2=A0 ^_^

--

Dominik Vogt

--0000000000004e301e05e676fe41--