Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Unexpected results
- X-seq: zsh-users 27980
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Unexpected results
- Date: Mon, 22 Aug 2022 22:56:28 +0200
- Archived-at: <https://zsh.org/users/27980>
- In-reply-to: <CAH+w=7aiyJxe6i=AtKKO2Rt4j2Qb7n0pBtqqogz8GsrR2QvbMg@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <FB0B3030-396E-4874-B531-E23FCB1EE526@easesoftware.com> <1591910550.1867255.1661176876454@mail.virginmedia.com> <CAH+w=7aiyJxe6i=AtKKO2Rt4j2Qb7n0pBtqqogz8GsrR2QvbMg@mail.gmail.com>
On Mon, Aug 22, 2022 at 10:52 PM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Mon, Aug 22, 2022 at 7:01 AM Peter Stephenson
> <p.w.stephenson@xxxxxxxxxxxx> wrote:
> >
> > The :h modifier on history is pretty brutal, yes. We store the
> > full history word internally, but a "history word" is before the
> > lexical analyser has got to work, i.e. the raw expression with
> > quotes in it. What you want is that word after it's been
> > processed internally.
>
> echo !:1:Q:h:q
>
> perhaps?
It expands to this:
echo 'a/path' 'with' 'spaces/in'
Instead of this:
echo 'a/path with spaces/in'
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author