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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, 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 31953 invoked from network); 12 Jun 2022 13:23:37 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Jun 2022 13:23:37 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1655040217; b=I1K3JVSKR/WqbkLf+JkTk0HGw7io/n94bRR8BofiO1mblSUzF9MbkTG5PIq3NPq0/01Dnb+DER B5N5owmtor+QwthWkY8WM5m7V5YrqHWu/hHpMBJS48lup+r6RZ7UVOeQiB4bdKTAGlwzAeeGJD 5MnjbHar3lVZ/8Zrz7fpPq9sxpXfjWEIExmjTMNsWIY7KmsmL6AJjxAFskMB08z1uJ/6LVQTxb Ev/OqtH6yp2fUlYSRibt1uy22Vk301wxDNXWEx8gnzCwg2BbAxP17fcBtb82GwT71/XWc9GR7G +2rR9KXjgX1Lhc58zmjOL9Vnrz3j165jTB6IYs05MfoBOw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (p3plsmtp23-04-2.prod.phx3.secureserver.net) smtp.remote-ip=68.178.252.168; 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=1655040217; bh=gMt0N0xmJXQZLrSLWvxXhH/be8I9eYiZkIfFfEgA9tc=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Subject:From:To: MIME-Version:Date:Message-ID:DKIM-Signature; b=DIspEMZaW/wGEOiPZelsgGig3OyDZDBMqRcypxI3jOMXc7S+H1avjODNThLSzYa8Q33i6m0QhK SKD/i3aaRtjUfJnu6rRn77NM8kXHPCjPkky9dlwv+yLFmm/L6zdoSdZ39n0VaF+Dtu0WQB3Qh+ 9aR75k9XTdMzcHSIm9gVJyVLtOozCnZU7mGm0u+okVnsxb/xsVzVGWKcpTMnvIry5rD0O7ycSI XM2cxKqPhDjDUu1OzIDuWqsU1QPSzPo3+PT2o5CTh9MzGh07rjJqdQIQrtpBWITwrnKElQJ7xX wyXaD63wbN/MxKiMuV86ZVKU5oe/H58s4iYjzQP0t0ZmqA==; 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:Subject:From:To:MIME-Version:Date:Message-ID:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=6IoyKMJO2SZXTeeWRYpble+KXzG2GdePip4aMKph8u4=; b=hTpV5G6eYrl0BTXEAh/Q6unjKO KatSU1C1k0zG9xOx87RzfESTbWYfM6VGc+koLklDI332nl/QVr7Tg7klkZlknSBxhX9bB27Z3LA7T MaItJbA8587ZKOlxqfqodFQ+qdCDYWnuFsbxChSsC2WIaKv1gPuFL+uzpQSA+yHvqnVB39JWzP+aG MD9DPxKszUpiG2O3Csab2b6m2zMXbLtu/gHTR8r99YFShG1rgr2DyIoH+mSM3+xGvEi/uv+uluNL+ i9AmLK98UdXGh1hMqgrHy3PUa/fSksRDH4NbOLXYYl8mjDW4GMi/LpWp3d0yiHTAy+y/SDfigfEYa aAQKTCGg==; Received: from authenticated user by zero.zsh.org with local id 1o0NZ3-000C0b-1k; Sun, 12 Jun 2022 13:23:37 +0000 Authentication-Results: zsh.org; iprev=pass (p3plsmtp23-04-2.prod.phx3.secureserver.net) smtp.remote-ip=68.178.252.168; dmarc=none header.from=rayninfo.co.uk; arc=none Received: from p3plsmtp23-04-2.prod.phx3.secureserver.net ([68.178.252.168]:38525 helo=p3plwbeout23-04.prod.phx3.secureserver.net) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1o0NTQ-000AlP-D8; Sun, 12 Jun 2022 13:17:49 +0000 Received: from mailex.mailcore.me ([94.136.40.144]) by :WBEOUT: with ESMTP id 0NTMoHsZyJr4Y0NTNojWZG; Sun, 12 Jun 2022 06:17:45 -0700 X-CMAE-Analysis: v=2.4 cv=b+13XvKx c=1 sm=1 tr=0 ts=62a5e779 a=wXHyRMViKMYRd//SnbHIqA==:117 a=X6zDAvHNJjWqs92U55fMeA==:17 a=dyxiLg1_b5pvHpTz:21 a=UxeUck4uFg0A:10 a=IkcTkHD0fZMA:10 a=JPEYwPQDsx4A:10 a=BnkO6toh9JjWWkjMcZAA:9 a=QEXdDO2ut3YA:10 a=0a5wWc6XyTe2DIsEoDDi:22 X-SECURESERVER-ACCT: david@rayninfo.co.uk X-SID: 0NTMoHsZyJr4Y Received: from [95.145.222.137] (helo=[192.168.1.231]) by smtp03.mailcore.me with esmtpa (Exim 4.94.2) (envelope-from ) id 1o0NTL-0000fV-KV for zsh-users@zsh.org; Sun, 12 Jun 2022 14:17:43 +0100 Message-ID: Date: Sun, 12 Jun 2022 14:17:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Content-Language: en-US To: Zsh-Users List From: zzapper Subject: How to see history 'expression' in history rather than the expansion? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailcore-Auth: 8308408 X-Mailcore-Domain: 840527 X-123-reg-Authenticated: david@rayninfo.co.uk X-Originating-IP: 95.145.222.137 X-CMAE-Envelope: MS4xfKIr41lN9yxMvv+y8GcSH5wfdvD/33r2jnYTkCIp1+WVh8+OYbnvMeWE/+Q95v458QHmDm/nSaz14M0nvdT9aQpDfxiLF4efCDaCYwsTx1xvJtoIELyu cL7Di9GJdQHyPeoIAvXJ66e+kz7VeArOzpWLZtO88e3xr/SWyO0mm1h/W0JYobrKom27mG4u79erJA== X-Seq: 27843 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: Hi ls IMG_20220612_093815.jpg cp !$ /tmp # but when I look at history I obviously see ls IMG_20220612_093815.jpg cp IMG_20220612_093815.jpg /tmp # In this case !$ is trivial but sometimes I do an arbitrarily more complex history recall e.g. cp !?imgxyz?$ /tmp and I'd like to see that expression in my history (for reference purposes or to refine and correct it) ###### I've just remembered/realised that the following widget solves that. ##### ###### But will still post this just to get any possible further advice ##### commit-to-history() { # store a command in history for reuse w/o executing it       print -s ${(z)BUFFER}       zle send-break } zle -N commit-to-history bindkey "^h" commit-to-history # ctrl-h zzapper