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=DKIM_ADSP_CUSTOM_MED, 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 9ea3958f for ; Thu, 20 Feb 2020 13:20:31 +0000 (UTC) Received: (qmail 12024 invoked by alias); 20 Feb 2020 13:20:25 -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: 24697 Received: (qmail 16714 invoked by uid 1010); 20 Feb 2020 13:20:25 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-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.217.46):SA:0(-2.0/5.0):. Processed in 1.20255 secs); 20 Feb 2020 13:20:25 -0000 X-Envelope-From: pierpaolog@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.217.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=vvYREmhkOpGRuaPQZRARxfijpJD8PhmYmbS+bgBKXKk=; b=gk6xPAnP5nsuUnR37WOeE4u1KP6OCDX9/toBq3fIC89+mRjsz2FxhypoddpZWoi/yj UgtrBJaox3KJcZnZIKS2mMi/5CRPrZKTkoYM6focOdAOzeN8AjXlmQO8UljcfkmSorEE EQ17pbWPoLEqtX9xYY+3ZjEsg+qkXbcvf4dSJ5FZ6SehKiAQ/V4Cy+CQbeimMcSw/Wwk GT424aLRFHCP0o15lXzbXPePKh2brzryqUh/tv1fXFVinEsuq5KnPJ1aUZSVjiP4C3nD IV4zEOlt+lHOP0tqqM4aqOQ4LuEzv93y7j5hnUeqsg0+J/Ce0KHegWEmSj2d/ZU61iwz a0iQ== X-Gm-Message-State: APjAAAUPW7fvGKAZspkTvZYxzqY+ZosPf8PdWajK6W0ZO4w/lUy5+xnu u4KoGucvEQ9iE+F3sBha2XAZ8DQwlT1y6K193k8QpGB1pzo= X-Google-Smtp-Source: APXvYqwsaXf6UzDgjFUmlSjddEGK85Np6FOmyF1EAjbiebMFYvLXPo3DlE3KSeOWNzLq3drw6K3gtdpyRDTAvV5X/qQ= X-Received: by 2002:a67:df97:: with SMTP id x23mr17118644vsk.160.1582204790321; Thu, 20 Feb 2020 05:19:50 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Pier Paolo Grassi Date: Thu, 20 Feb 2020 14:19:13 +0100 Message-ID: Subject: Re: history expansion To: Vin Shelton Cc: Zsh-Users List Content-Type: multipart/alternative; boundary="0000000000007d39cc059f01c24c" --0000000000007d39cc059f01c24c Content-Type: text/plain; charset="UTF-8" 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 >> > --0000000000007d39cc059f01c24c--