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=-1.0 required=5.0 tests=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 8418ae4b for ; Thu, 20 Feb 2020 13:07:22 +0000 (UTC) Received: (qmail 27365 invoked by alias); 20 Feb 2020 13:07:16 -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: 24696 Received: (qmail 15953 invoked by uid 1010); 20 Feb 2020 13:07:16 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot1-f45.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25725. spamassassin: 3.4.2. Clear:RC:0(209.85.210.45):SA:0(-1.6/5.0):. Processed in 2.24169 secs); 20 Feb 2020 13:07:16 -0000 X-Envelope-From: ethersoft@gmail.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.210.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:cc; bh=7/kPsyxRn5+S3GkFiUeBAwUOC9XJoXusiAqQ5l0BZzY=; b=mcn+GCHZkBCru3G2kPu+tPELKl8ISUNE0tNUGM2gM8VVfA4Pb+z+VFgMgzyPdfWBpa 31AMJu9dd/yrIcnrI5El4tBFc/EWjw3c94o2fWBglN8hPd0xGQZEdJxrFsdU6LMjeH/y XDa7/EhytHuFBqvk83keSXOzkOGgzrBxZqRESfZNi5MrZGoh5dZg2iwtJI+G1yKB92Yw JaGhsGdVgEQCrowxhZ+9GKQGZwiDWrIvtR4cLZ8s5CYWq0db93ziiKf+QxzZDIcaEltd sJmk/4++BwczxccpLCELdMeAvCJQlO7go2qBi65Y+exMSdyUrAxYrLQVPf/G79zAi5vC 1Cew== X-Gm-Message-State: APjAAAV0D6Gdh2JVLM1ELuRnz53Tsm7OnZXiLWr1lM/Lx5Bi/ylyAUAW OO8cLetSdorwKzv21IVv0PISV7AFlKK/8vJREls= X-Google-Smtp-Source: APXvYqz32xRokBFbrqOHpcS+KCmGez/np/CpMo8PGv4f3FKwxx4e70Hml0sj7WMP4tT3jT0fxWHaKYQzOEFQV8BIpmo= X-Received: by 2002:a05:6830:1049:: with SMTP id b9mr24623715otp.100.1582204001137; Thu, 20 Feb 2020 05:06:41 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Vin Shelton Date: Thu, 20 Feb 2020 08:05:03 -0500 Message-ID: Subject: Re: history expansion To: Pier Paolo Grassi Cc: Zsh-Users List Content-Type: multipart/alternative; boundary="000000000000733760059f0193c8" --000000000000733760059f0193c8 Content-Type: text/plain; charset="UTF-8" I'm not sure I understand what you mean. Does print -z !! do what you want? Perhaps you want to try out other batch substitutions (e.g. "!:1") before you use "print -z", which enables interactive editing. HTH, Vin On Thu, Feb 20, 2020 at 7:46 AM Pier Paolo Grassi wrote: > hello, history expansion is quite the powerful syntax for re-executing > commands from history with various functionalities for automatic > transformation. Since it happens before alias expansion it is not possibile > to simplify the access to these functionalities though, and one have to > remember and type every time the right syntax, and in case of error you > have to type everything again. > Is that it or am I missing some way to reuse it? > I have just thought of a custom widget that could add to $BUFFER a history > command of one's choice, are there other ways? > > Pier Paolo Grassi > linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217 > founder: https://www.meetup.com/it-IT/Machine-Learning-TO > --000000000000733760059f0193c8--