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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14901 invoked from network); 29 Apr 2022 14:17:43 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 29 Apr 2022 14:17:43 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1651241863; b=ScDWtKOvmjyPJV0KWQGr1IkwcliITuskd2kp8V28Ov0QMcMLPr8WO/ZxRcMGLZHsg522MlNcn1 LE4O6kcoNHrZhEdYSx7SktraTg6dNMXLYF1uq75fItexCLyRVMg8nZrObGMpnIQbrLvwbSP40q z55yu6kyo1feGsBSByMkcVYjiFDn2xWjZcX4NFKI3aXlnXfUpeSL1xvn8yYufcw4IU+CYCA/dy Y+v13xOztoyd11icwSE/Ff0QngIn1N7KSdpXl5YCBAgNr1XQvG/uo3bbUG9ZizKVnA0nZ2u2dP ESzjJTIjeS15iSPqcWHG8/6FFX/9ynMFvH4HaVxetrR2aA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-io1-f43.google.com) smtp.remote-ip=209.85.166.43; 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=1651241863; bh=ixA6hsoRioj16kVH/AERjgukkbc4srcVXKW0mZ3EOHg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=n6mwvm9c0G0G/DtNfU/i/lKk3XmoPr8I2gTtFvFobey28D/U5GqWNr7lUSNLj7cAkpNXIUvPQZ BGUn1lFlxhnuOCY0+EpBcP7JbzLAq84Q0ci5YYFPCNdg3td/YBshaYjkotRjsOq3gk3+VELFVI /3jL5Mjt2iZk0x0KSkjh1eYhIJrO8Khs3mbKejeW12L25R9GIHz16hsPDZIokqGDMUUda/FQOp yRGpHdpU72waBAVV9nhisxyGCOEhrnw14nXuQo9B13OIZfHXX4M0E6D4LFzQyKYpAYPZ0aHdGx CqWNxuRN0sp1JDunn2kdcGVwexXdTJCPgVDaR/ehAOoKEA==; 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:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ixA6hsoRioj16kVH/AERjgukkbc4srcVXKW0mZ3EOHg=; b=UGnPg2EJ4s2dRkfoyzJGiXyaoI 9EKYbBG4LaG9fYkf0xyOGOD2rp62cDLhm9F92IiSQm1r+QJ03vyGBvk56jHWG0rQx+vvwp1DPpz+h FmlvWabNTfXaxWJ2l8X8oyHeAErQQbJKZunPLdPH1SJelnoVsqNCJ5+5fENvrYdbutayT3nja0O31 x9WMXAcJTSlEhAjtDduv4yg2F1aJxJGCf4KCVpOCbiIKES19IbWs6/tzHbFvRUsWKci4SPjVupMxg sytRn72vVlZwvF80d9DcZOkPovngWoG9Se/LePb3aRBfhyVhdJMQF6jbsL+oFDSCZmncc0Gd+wANr 3buuoOGw==; Received: from authenticated user by zero.zsh.org with local id 1nkRRG-0003N8-HN; Fri, 29 Apr 2022 14:17:42 +0000 Authentication-Results: zsh.org; iprev=pass (mail-io1-f43.google.com) smtp.remote-ip=209.85.166.43; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-io1-f43.google.com ([209.85.166.43]:47068) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1nkRQa-0002f3-Qo; Fri, 29 Apr 2022 14:17:01 +0000 Received: by mail-io1-f43.google.com with SMTP id g21so9841898iom.13 for ; Fri, 29 Apr 2022 07:17:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ixA6hsoRioj16kVH/AERjgukkbc4srcVXKW0mZ3EOHg=; b=kJo4RpfgdHt/T/VX5zBScthO3wJwp9mcb1rsSwjORbUUF4BCtbKFQXgZUOUJkgZu3u a574k9o07y9EC4OEMclwODYImphTI8QR0A2+msP3/HfBil1aiwLsJYkp6X2tAmLIm2VM h76xbwzaggq5UvIEmLiuHXdP9mrfk8w+u7MxK5MJ6KQIaNrjDyZVqW1auKJwNMQJEvo2 SnnIyg6+qpeUtioIhtuWRYqnq5DNScK9nkQz8IaxEggLvjS6MNNUP1RodOwKzRT1OseO UYKF5PyES9w3ytkRjIYF6UbK+m9aDMvmUw4zo1RycjNDbFSjPffRE9k2ny7Mh3kkPAyV ky/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ixA6hsoRioj16kVH/AERjgukkbc4srcVXKW0mZ3EOHg=; b=27jCEZ8kLUNN/KyFKagD4xeISO+vRcQ5E3VwNKHY9zUnte0jq4OAMTo0mXV1gJJo0X swV2sPswB5Flz4igTIp8VrVg23CoMFu6OfyFAwRaU95OHMPJ1huAVOoWXTLU3z3nA9Wt nTJJ66gh9otV8qk4cPf77thMPYSLrFBhsX0qDTxnZ3S4FyViKHzsx2NefN2NSF2xvU6h MO6eZ35EhQYue1bZzenec0tVc+e4lq+d210ObE0Rn5sej6j6Bm6KVZgq8VbwNTrln1jv lcsDibD2zD90brcBl4s2VL/I8XQN7qgvV0DER8HJqU4gqbN5msk6ygA3fVo7dSJP8P1w eWRg== X-Gm-Message-State: AOAM533ADy+87YDTE9jnN8rQmyc1xTusPrmDmRZbkofU1+x7B+hnoVt2 x1qKHP3ZlDCfKPSRHhY5J9T8eUR5TZapZGK5yInFeEke3i4= X-Google-Smtp-Source: ABdhPJyylzAgQv8Mw5ZodseVb0CbaiP7pTP/mRapn5D9/r+vBUItLGY8W1TepkQbLJzhKshcKnOpZFek1vSi/hw6t1Q= X-Received: by 2002:a6b:f80b:0:b0:649:a265:bcc3 with SMTP id o11-20020a6bf80b000000b00649a265bcc3mr15084311ioh.18.1651241819494; Fri, 29 Apr 2022 07:16:59 -0700 (PDT) MIME-Version: 1.0 References: <747863791.139295.1651238910118@mail2.virginmedia.com> In-Reply-To: <747863791.139295.1651238910118@mail2.virginmedia.com> From: Pier Paolo Grassi Date: Fri, 29 Apr 2022 16:16:23 +0200 Message-ID: Subject: Re: prepopulate BUFFER To: Peter Stephenson Cc: Zsh-Users List Content-Type: multipart/alternative; boundary="00000000000016dcec05ddcbb206" X-Seq: 27707 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: --00000000000016dcec05ddcbb206 Content-Type: text/plain; charset="UTF-8" perfect, thanks! Pier Paolo Grassi Il giorno ven 29 apr 2022 alle ore 15:29 Peter Stephenson < p.w.stephenson@ntlworld.com> ha scritto: > > On 29 April 2022 at 14:21 Pier Paolo Grassi > wrote: > > hello, I was wondering if it is possible to prepopulate $BUFFER before > > rendering the prompt. > > I tried doing so in preexec, but it didn't work. Is there some other > > function I can override to do this? > > You need "print -z" --- it has all the usual options of print but the > result > ends up in the line buffer when the line editor starts. > > pws > > --00000000000016dcec05ddcbb206 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
perfect, thanks!

Pier Paolo Grassi<= br>


Il giorno ven 29 apr 2022 = alle ore 15:29 Peter Stephenson <p.w.stephenson@ntlworld.com> ha scritto:
> On 29 April 2022 at 14:21 Pier= Paolo Grassi <pierpaolog@gmail.com> wrote:
> hello, I was wondering if it is possible to prepopulate $BUFFER before=
> rendering the prompt.
> I tried doing so in preexec, but it didn't work. Is there some oth= er
> function I can override to do this?

You need "print -z" --- it has all the usual options of print but= the result
ends up in the line buffer when the line editor starts.

pws

--00000000000016dcec05ddcbb206--