zsh-users
 help / color / mirror / code / Atom feed
From: Pier Paolo Grassi <pierpaolog@gmail.com>
To: Vin Shelton <acs@alumni.princeton.edu>
Cc: Zsh-Users List <zsh-users@zsh.org>
Subject: Re: history expansion
Date: Thu, 20 Feb 2020 14:19:13 +0100	[thread overview]
Message-ID: <CAP+y1xB3=zPcUhd_qJ3nDBPvx8XOoHPqDn0Btby-r=bBpoOVEg@mail.gmail.com> (raw)
In-Reply-To: <CACeGjnUZ_UJAqm=xZbN5Gof+G8M-Y9zATf433FSApV=avp5G1g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]

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 <pierpaolog@gmail.com>
> 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
>>
>

  reply	other threads:[~2020-02-20 13:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 12:44 Pier Paolo Grassi
2020-02-20 13:05 ` Vin Shelton
2020-02-20 13:19   ` Pier Paolo Grassi [this message]
2020-02-20 13:25     ` Vin Shelton
2020-02-20 13:29       ` Pier Paolo Grassi
2020-02-20 15:25         ` Mikael Magnusson
2020-02-20 15:31           ` Pier Paolo Grassi
2020-02-21 22:50             ` gi1242+zsh
2020-02-22  0:21               ` Pier Paolo Grassi
2020-02-22  0:36     ` Bart Schaefer
2020-02-22  1:01       ` Pier Paolo Grassi
  -- strict thread matches above, loose matches on Subject: below --
2002-09-25 10:33 Roman Neuhauser
2002-09-25 23:43 ` Bart Schaefer
2002-09-26 10:12   ` Roman Neuhauser
     [not found]     ` <20465.1033036099@csr.com>
2002-09-26 17:05       ` Bart Schaefer
2002-09-26 17:32         ` Roman Neuhauser
2002-04-30 16:33 Roman Neuhauser
2002-04-30 16:43 ` Bart Schaefer
2002-05-06 12:51   ` Roman Neuhauser
2002-05-06 12:43     ` Borsenkow Andrej
2002-05-06 13:11       ` Roman Neuhauser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP+y1xB3=zPcUhd_qJ3nDBPvx8XOoHPqDn0Btby-r=bBpoOVEg@mail.gmail.com' \
    --to=pierpaolog@gmail.com \
    --cc=acs@alumni.princeton.edu \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).