From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 284683e6 for ; Fri, 25 Jan 2019 15:26:44 +0000 (UTC) Received: (qmail 18154 invoked by alias); 25 Jan 2019 15:26:24 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23846 Received: (qmail 15888 invoked by uid 1010); 25 Jan 2019 15:26:24 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-f50.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(209.85.217.50):SA:0(-2.0/5.0):. Processed in 2.43829 secs); 25 Jan 2019 15:26:24 -0000 X-Envelope-From: pierpaolog@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=0JNjojMxuArqg7MOVom8x1xpPfB5HBp+HoYVa0MC/ps=; b=WS/GMrHvd6uFVwPCBZyDk2nn1f0jhuC0YaVtpn83aPn7Qer8FfSc3A1gojBCkSnoNU 0BhcSV3Gcx3znTVniOCwmkqburoBR73WGn3D6Zsc6ADLQT/tNByrkYi4fdwoGVSJnujC JAQ0GLKdN8EOILV2jWaw9Q92Flsp0mzd5weBtWQgfL0NOEa/VuayJ1ya/ywSD/1ZaDs1 cLoV4kvgLweeVq5zWZmmu3NF4VJT9U8E0n+n/I4B3tMbwSMt7ZQeEFh9FBN2YQJZvfnY nULr04W6GI8vMvvnHj/4uMI6X1C4nl4vLoDCjpcsAb2I/U1draI/5MkEoXX2eP5yJhik Tjkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=0JNjojMxuArqg7MOVom8x1xpPfB5HBp+HoYVa0MC/ps=; b=q6tjYDsjVDS+vUTRN05AMN36MEvzOdResWMcI0kAEUow0yk9uRbY8QIPtk/BLxXbts tqiCz2/Ixjyx3rDfXhuKRi3JcVgIhaVLnHiIrVMH00PCh5ciY1f1P0cEU+ege1LGSiaS D6jzy/DGlg/Pv9Ts32YH6egbBBA3b8txlZPIJU2zVBjV0DunJe8O0LPod7FJPYwVbIlZ dxbACs46vdV2NrchTVWaTzWZMf/hbP9XrHgg0BlyXrk80mJQhp7HuowtVGiQY7TGV3sE Vf01TZ79a3ulUbxARHl4LArjKd6M4ywA3AfuP8kApqbza5v7EguzklVHnQoPaH4mAvbY vNaw== X-Gm-Message-State: AJcUukfYwSuDDBr90DjcB8VZr6tj2hpB7u1pdrA6sJB0ubWx9rZ6m8Rk aFQcU4TenXU/OaKY4n3LuWQoGOVAKfOJdSFTMQW9lZXU X-Google-Smtp-Source: ALg8bN5LAee12OoBAeRSDioey3/OTR8HDfUghu5ddzDbVyAYftY+LLWLR47IT4dCMrc+JRV2J890K6HZhRKVzaUXgDY= X-Received: by 2002:a67:3d54:: with SMTP id k81mr4669048vsa.57.1548429978063; Fri, 25 Jan 2019 07:26:18 -0800 (PST) MIME-Version: 1.0 From: Pier Paolo Grassi Date: Fri, 25 Jan 2019 16:25:41 +0100 Message-ID: Subject: get text of buffer before completion To: Zsh-Users List Content-Type: multipart/alternative; boundary="000000000000cd5913058049f243" --000000000000cd5913058049f243 Content-Type: text/plain; charset="UTF-8" Hello, I am trying to create a widget that should work like this: 1. when I am doing menu-completion, the widget should save the content of the buffer before the last completion (the text added by the last call to a completion widget such as expand-or-complete-prefix) 2. then execute the whole buffer 3. than show again (like accept-and-hold does) the previous buffer as saved in step 1 eg if I am on a line like this: ls abc/ and pressing TAB complete like this: ls abc/def accepting this with my custom widget (when still in menu selection) should execute the buffer and then return to the prompt with a buffer containing ls abc/ IDK if the "when still in menu selection" is relevant, but I included it in case it is helpful (maybe there are variables populated there that are discarded when the completion has already been accepted/there is only one alternative, although using typeset from a widget hasn't shown such variables though). thanks -- Pier Paolo Grassi email: pierpaolog@gmail.com linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217 founder: https://www.meetup.com/it-IT/Machine-Learning-TO --000000000000cd5913058049f243--