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 ddb2215b for ; Thu, 20 Feb 2020 13:27:51 +0000 (UTC) Received: (qmail 27022 invoked by alias); 20 Feb 2020 13:27:45 -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: 24698 Received: (qmail 16120 invoked by uid 1010); 20 Feb 2020 13:27:45 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot1-f46.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.46):SA:0(-1.6/5.0):. Processed in 0.783187 secs); 20 Feb 2020 13:27:45 -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.46 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=cRxKZZIu8Za6o073DtO5Q7f8qGbb1+jVVcX9TNyCetg=; b=CsN2T5fBflfe6GyHzhHJWwIdQzpiaGdWN9uejuaDFnJAnDIhSPf5h/ZtFiEvP8Wpud 5BeegCT4Yks3VbRJDHBolKDmqYWbFVWWVqsHtkAYhiY8DJrlkDs2pdaaycVBlF29RXsn C4ZZWIdsuBPMgRitUNuTz+QUB0vLQb2FdsD6aBVqOeQPwL5XOVFxeSL4bUaaD8NBX40I 2jagCVFGmyBqLXyhFTJpt8kd1rpOqrheT+VuBiChAYX8nt96sg0EtAJYQSsDRFGQ0dp2 rtHSbVSIqhCoNXoYlWvEXW1Ac53oD7wxC5f1XduCE6F/ysG+YtYaM7e/fB3rWXBALnIL Opgg== X-Gm-Message-State: APjAAAUB3ZLowxpHFvsKbFZG4Hma9K4dCNixexJ4nqOoTZYkr+wtH6E0 6IeCLh2inPGf6YLxEgIQ/pC+8YBcU2V7tkU5dUc= X-Google-Smtp-Source: APXvYqx2pCuQfo+PtYPejRtv/Xx9Tl787hefC+ZpHDs+CwtXK/PaaS00t79bJLYOLYVKAerMUaikJfL66kchHpPtuI4= X-Received: by 2002:a9d:6443:: with SMTP id m3mr22712327otl.20.1582205232072; Thu, 20 Feb 2020 05:27:12 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Vin Shelton Date: Thu, 20 Feb 2020 08:25:33 -0500 Message-ID: Subject: Re: history expansion To: Pier Paolo Grassi Cc: Zsh-Users List Content-Type: multipart/alternative; boundary="000000000000d1cc07059f01dc8c" --000000000000d1cc07059f01dc8c Content-Type: text/plain; charset="UTF-8" I still do not understand: what do you want to do? Do you want to create an alias that modifies the history expansion in some particular way? - Vin On Thu, Feb 20, 2020 at 8:19 AM Pier Paolo Grassi wrote: > Hi Vin, it does not because: > > 20-02-20 14:16:45 root@bakeca-vivobook Path: ~ > : print -z '!!' > 20-02-20 14:16:47 root@bakeca-vivobook Path: ~ > : !! > print -z '!!' > > !! is resolved to print -z '!!' > If I had used it like you did, as !! unquoted, it would not be aliasable, > so I would incur in my original problem > thanks > > Pier Paolo Grassi > linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217 > founder: https://www.meetup.com/it-IT/Machine-Learning-TO > > > Il giorno gio 20 feb 2020 alle ore 14:06 Vin Shelton < > acs@alumni.princeton.edu> ha scritto: > >> 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 >>> >> --000000000000d1cc07059f01dc8c--