Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Unexpected results



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