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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8067 invoked from network); 21 May 2020 05:10:39 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 21 May 2020 05:10:39 -0000 Received: (qmail 7468 invoked by alias); 21 May 2020 05:10:30 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45875 Received: (qmail 16087 invoked by uid 1010); 21 May 2020 05:10:30 -0000 X-Qmail-Scanner-Diagnostics: from mail-oo1-f45.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25814. spamassassin: 3.4.4. Clear:RC:0(209.85.161.45):SA:0(-1.9/5.0):. Processed in 0.791212 secs); 21 May 2020 05:10:30 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.161.45 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=2HskmYyObN8n52FvFIkntX4CUV2PMCJNf7t3TaHgaAo=; b=Q1iaNb/m7lb+Vod3jgaEmYlw8hmtnJWzAJKulO02Ufdl2hHZ0xZWxYyLyk+XPruqBH woeirrJGaTf6zVdN7scOZ0pJfd+rpSZVK9IhlcUIZuK+Z2IKOJwd0RK169InqED70eXJ Kk6jFa0EzVvnDPyDkzBdlp1ny2RN9VZbVymBckw2NYzmRqKH+7d9AMJjai8k2MtXolfz ouGPPDAfy8Jf4U3RU9WdZtAYSIw2I+WJB9Hm67dL+lwHPz5KGxnu1OMUpQXv41lHkd+P pCJes1slAobeGYTl0/+SQ0Va4NI3bSTI5N+TTaGfZAb2ALgvIJ6rJ5ujw6VobpRsRZmn EjXA== X-Gm-Message-State: AOAM532Yxu+CsEp7pbi9kN+jpEuFwhAFG+glkp2MuQe1b0uzciDguPmS /SGntnT75Lnf6XVL/eI/Cq2NlcVjO0m3Bap9MHbNDsDNxnS2Fg== X-Google-Smtp-Source: ABdhPJwrizaoRKaT1y4YjWJZNdTcSgCQSFdgaAn8KSx3HJnfi1VRujeBFnrhaEBoLTXQGHnyvxerdbBERGKgrdM3bTc= X-Received: by 2002:a4a:a3ca:: with SMTP id t10mr6106442ool.82.1590037795904; Wed, 20 May 2020 22:09:55 -0700 (PDT) MIME-Version: 1.0 References: <20200502212517.v36yw3jv7x3zxzho@chazelas.org> <20200510100727.j42omcak4lps55qo@chazelas.org> In-Reply-To: <20200510100727.j42omcak4lps55qo@chazelas.org> From: Bart Schaefer Date: Wed, 20 May 2020 22:09:45 -0700 Message-ID: Subject: Re: [PATCH] [ping] Effect of "print -s" when called in zle widget not seen until zle is restarted To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" On Sun, May 10, 2020 at 3:08 AM Stephane Chazelas wrote: > > [Repost as it looks like it was missed the first time round.] I got it both times, FWIW. > > function test_hist() { > > print -s "This is a test" > > } > > > > If I call the function explicitly by typing test_hist, the > > string is immediately added to the history, but if I call it > > through the bindkey by pressing ctrl-x ctrl-t, the string is not > > added to the history straight away. I need to issue another > > command before I can see it in the history. > > > > Why is that, and how can I fix it? I think that's actually intentional, and changing it might break contributed functions such as zcalc, sticky-note, and nslookup. There appears to be some interaction with "vared -h" that changes when the ZLE_CMD_SET_HIST_LINE entry point is used.