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

Re: Unexpected results



On Mon, Aug 22, 2022 at 1:56 PM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> On Mon, Aug 22, 2022 at 10:52 PM Bart Schaefer
> <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > echo !:1:Q:h:q
> >
> > perhaps?
>
> It expands to this:
>
>   echo 'a/path' 'with' 'spaces/in'

Ah.  So "!:Q:h" (including the double quotes) then, though that has
problems if there are $var in the previously single-quoted expression.

This is why we have ZLE instead of just bang-history, I suppose.




Messages sorted by: Reverse Date, Date, Thread, Author