From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2768 invoked by alias); 13 Jun 2018 01:45:05 -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: 23473 Received: (qmail 6602 invoked by uid 1010); 13 Jun 2018 01:45:05 -0000 X-Qmail-Scanner-Diagnostics: from mail-vk0-f47.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.213.47):SA:0(-1.9/5.0):. Processed in 0.828581 secs); 13 Jun 2018 01:45:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 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=ug2jNqF+xTSyaqe/dZI19Ll+hbGaOV7camo/BpLiz0U=; b=A9A+KBc8bAn+76Y+u2C0shy8MZg7rYBgS9fkam07whjOKq+zjcSOXT/6r5texHhnBq WoG48jkHIDiGTDYc3Levd/dsPBQ/4RPW9xnv+cn62SmRk2DB90EnEbAUPF2VdGorIXZg rjX4qr3o2P4Dpzt3qtuFhzE7cn/+xhg4Q1EAd72/hqYyALMP86SMAcecjGt184wyPehl Y2B0qa9aXaA1cKR2r3SM9q8nLLKD5g5VBm/0do4nG+YFdbK7S3iza9mk3V5YPpArdkSI SqRx30wfXPLhK3Gop4i6edWMVXs6vw3MnGI1nFG4QBVLMTwQYAzmLejPnvp5/XjndPDI +sLg== 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=ug2jNqF+xTSyaqe/dZI19Ll+hbGaOV7camo/BpLiz0U=; b=eUVVA3dNrbI1UX8cX/3vKpRWD7HxIECu4KcBthaNyQZWAUmLRsPz5ddvtq+D/0hjv9 xztxN30lm0LlUygh8aW/n1dsnVgFiGPNpVEmaPhLPN/e/OXIJ2OFCr2Vnz4jVOke69IQ LBevIrmvz4mH0soqL1jmGROPs+Dp6zVQamWixkbA/u7L/qgGOw820CE90W/VNNIX0eYl ZWrnIqfFZYMX1r2yTiLdGw5lG5sUcoHEEWny8LB0+3X5L1HcwB/BeXir3bgMXJ40mWeJ QszVtonmw2eFFWx1kT9aJwmt6AZuJhaVECFx9YT/Gp4gd1DzpMg5Qr/JtFz67yNUAZuj j85g== X-Gm-Message-State: APt69E1lpIh1MNf7vtK0Ftzrul4eF+UoxLelAZn8eiAp92iwBSkxxXCX z5kfPOh4S8sVAR7TmLNgj5gHoAQzUsmQgQ05R5XlC1Ir X-Google-Smtp-Source: ADUXVKKpm5fLJAEDVbYEev1Hi9XTrDcqkOZC/ppag1/AKasOAy9LYUWzNJeZ1JRQQqioRBtdKTDLoirR8VpV70LCAjc= X-Received: by 2002:a1f:45c1:: with SMTP id s184-v6mr919408vka.13.1528854300993; Tue, 12 Jun 2018 18:45:00 -0700 (PDT) MIME-Version: 1.0 From: Pier Paolo Grassi Date: Wed, 13 Jun 2018 03:44:28 +0200 Message-ID: Subject: populate next comand line from precmd To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary="000000000000862fd7056e7c214e" --000000000000862fd7056e7c214e Content-Type: text/plain; charset="UTF-8" hello, I was wondering if it is somehow possibile to populate the command line within the precmd function. What I am trying to achieve is: from a normal function (not a zle widget) I would like to set some variable, to be read in the precmd function where it is used to populate the next command line and also set the cursor position. I know how to do it from a widget, but from what I know there is no way of doing this from outside a widget, am I right? the desidered behaviour would be: $ special_function par par2 etc [accept-line] output $ special_function par par2 etc (already compiled, some params may be modified) I don't want to: modify the accept-line widget modify history so that the modified version of the line is at a press of the up key this is more of a "can this be done in this way?" question thanks in advance -- 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 --000000000000862fd7056e7c214e--