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 15189 invoked from network); 29 Apr 2022 14:19:56 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 29 Apr 2022 14:19:56 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1651241996; b=aaWeNrioRTon/vQuVauLO0BlN9H3ek7o6hWVaVquQVgAC1iR1oUDxqUWnbn2BYrgLAUnqN1aZS 9idgsfBqEkPAOjY4/7XYVCdzn2BOBoOir3ER+y5FZ4EIiISBZmrLzteG8r2muVdFfvesYK1DHf ljfUSMJZ9Gm8LzcN6POvgpnTcMGyQxJNRyJuH4y4M6oDJcHz6inxr/XpWn0x/HfEG0nYowhA+C orD9cULG1hJlRFFLkrOc2gEMlK6sI1KyFekEBeL88hvSTeEwDAom7NOTzAAUEzYU8nJIx9jNTS bd9FS7I14PhC7Z23b5NnEiTDSsNesrpw3/CSnFNrw9QhWA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-io1-f54.google.com) smtp.remote-ip=209.85.166.54; 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=1651241996; bh=gPMZ6i1J/g6u+FsZBHyNuhGxxfrpCm+4h8oHYe5pLqc=; 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=qk9VS+ZPrJRsm7WdwlwygdFsVoJFtec0pHUqnYbjntEwZcqgRdy8w0ew/2xyloK9NWhGaCej7n xAlzaZvUhOl3uyNvvG2zFVOAyQkaxqOPtqqBjNz3d+4jLsTCGhWG4kqvvb6UyL7cmqYtuTwfod r9CbmBZr31PVdznX8EN6t95/jedpEN4bauEao7LkyS8Y2WurNRA3ck0rNqzXjLNfmq8nYetHEy p2ymeSyqZO6aWWkDji7Roq7mft1JIJUjNbBR2VDjXDQaq9Dce0SKXVvTlWetcbEYo8G4xOOYa9 kfzUaYz//hlSzJCkJIphSj7J9Xhl31EJX1CenBzRQbp7gg==; 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=gPMZ6i1J/g6u+FsZBHyNuhGxxfrpCm+4h8oHYe5pLqc=; b=l+0/1V8O/7Ag1WApsBBau8d5+Y naD2Wyx9b2+IE0lmmtRq0kOo3MLrT5mHPsnM2W5jpeZEmEgUKVpKJ7OCQDjJvZUQw6LigrRlVT1Bh B+jJTkAL+OkItZeh0fegy6ZmWF3IQhkzI0W3aIFYgDVgTU9BTwaEByo7MHNbhwIvpNCzDRbjGQrPy ab9lWx/kxNQELGeH86cUyTpP3T4O3xfKWR7lSIqTT+59KnFjBcxm9DEsC4pUo3Qyswx2y/miDl44l Hii2r/pyePXNm7h7XrgR7crLXmiJDHb+LDGBwJNZq5u9jJqp4x29Ck2EcWsqq5WsKCkZl9Thw6fHa +Os1ry3g==; Received: from authenticated user by zero.zsh.org with local id 1nkRTQ-0004XS-A9; Fri, 29 Apr 2022 14:19:56 +0000 Authentication-Results: zsh.org; iprev=pass (mail-io1-f54.google.com) smtp.remote-ip=209.85.166.54; 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-f54.google.com ([209.85.166.54]:36856) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1nkRSV-0003g5-R3; Fri, 29 Apr 2022 14:19:00 +0000 Received: by mail-io1-f54.google.com with SMTP id e15so9934165iob.3 for ; Fri, 29 Apr 2022 07:18:59 -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=gPMZ6i1J/g6u+FsZBHyNuhGxxfrpCm+4h8oHYe5pLqc=; b=pUa79jyzNj/PKZ2Wuwxf32ujCk+4w3c9qHBzZ3Rdi6iJO4i+RQjF+KpUirjlp7FHir +Dir4s4nZjpXu53Rf2U83owOKpjnV9zSPaJxThmNE6A9U1r446Aci36eMKpkPcCmbHpf 9XPlrQ6lfe0chxX5Eux7IqVP7eoU7KafR/bgAKpSQJSY3fO3nkVNbYasSnPngvAU2qph 7VvP8zGAxLkrVOyX726CvDebqcxdSNsYVpsduwH6fT1JOtPXzI3Z983XGTBX6s4i65lq iAsCvrznHiMnVVN9XS22C77RhqtK5tQl2hhp0mn0N6UTOInEiof42Q2YHk1V/FniSsJV VlwA== 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=gPMZ6i1J/g6u+FsZBHyNuhGxxfrpCm+4h8oHYe5pLqc=; b=PJSRiOvUaD9c6xM3EqKxHNenn4mkOcUficeG40y67TGVQz7NkxN22gct+CIMMaD0o4 f5Kw7tIzvMlYVJPnK95aLz0UR5QxWAuUAStSWrs6rxRYyjFPkoG+oPxDjvjdPkhVMZfi AE05QGkKFtpZLA6igOdPVRG868t+AfI4k8nAKlHb8iukhNECFw+fQXxsqu6ohZHHvRNT xoJGlRZDlCzZAfQkBjEvFtd0XQ4Z4p4nO6XszjEBF0qpas8jtdEaM5oGMDmE2LLha+zA qz9G+DHzFmFKPKe9iFN7YjM2G4bw8RTDeJpj4wvFdbzgP+dDeWytWDeUGR4GNUiPrilb vRuw== X-Gm-Message-State: AOAM531DdG++F8vwT5OSugi5iYNZajY+JyA0EA0thvM6OQa501zxbDFp yTRMCnvD5Hw8wsn1pv4yPLeLLw+a1J93qK9PFUc= X-Google-Smtp-Source: ABdhPJzYs76W1e1Fy2lof/Y5C9i1Z97mJqmDGqXFDrjdlyQeBtB1g9sYPzJuBibFQZQNpBr2iyGkNZRkNhgQvwONaZE= X-Received: by 2002:a05:6638:14c1:b0:32a:aa03:93e1 with SMTP id l1-20020a05663814c100b0032aaa0393e1mr17138720jak.66.1651241938714; Fri, 29 Apr 2022 07:18:58 -0700 (PDT) MIME-Version: 1.0 References: <747863791.139295.1651238910118@mail2.virginmedia.com> In-Reply-To: From: Pier Paolo Grassi Date: Fri, 29 Apr 2022 16:18:21 +0200 Message-ID: Subject: Re: prepopulate BUFFER To: Peter Stephenson Cc: Zsh-Users List Content-Type: multipart/alternative; boundary="0000000000003204b705ddcbb93d" X-Seq: 27708 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: --0000000000003204b705ddcbb93d Content-Type: text/plain; charset="UTF-8" actually I have another question, is there a similar way of setting the initial cursor position like I would do setting the CURSOR var in zle widgets? Pier Paolo Grassi Il giorno ven 29 apr 2022 alle ore 16:16 Pier Paolo Grassi < pierpaolog@gmail.com> ha scritto: > 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 >> >> --0000000000003204b705ddcbb93d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
actually I have another question, is there a similar way o= f setting the initial cursor position like I would do setting the CURSOR va= r in zle widgets?

Pier Paolo Grassi

Il giorno ven 29 apr 2022 alle ore 16:16 Pier Paolo Grassi <pierpaolog@gmail.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

--0000000000003204b705ddcbb93d--