Re: "$PWD"/m.ter<tab> removes the quotes on expand
From:
Andreas Kähäri
Subject:
Re: "$PWD"/m.ter<tab> removes the quotes on expand
Date:
Sun, 10 Nov 2024 21:05:21 +0100
On Sun, Nov 10, 2024 at 08:52:44PM +0100, Kusalananda Kähäri wrote:
> On Sun, Nov 10, 2024 at 07:58:28PM +0100, #!microsuxx wrote:
> > i try on fresh new termux
> > to expand
> >
> > "$PWD"/smth<tab>
> >
> > it makes when completed the quotes away
> >
> > as a side note , there are no spaces in $PWD
> >
> > greets
>
> Can you say what the issue with this is? As far as I can see, the quotes
> are not needed in the case you are describing, and if there were spaces
> or globbing characters in the value of $PWD, these would be individually
> quoted by the shell (using \) when the variable is expanded as part of
> the completion.
My apologies, I accidentally tested this in a zsh shell session, not in
bash. In zsh, the quotes are removed when the completion is done and the
value of the variable is substituted. In bash, the quotes are removed,
but the value of the variable is not substituted, leading to a possibly
confusing result when the quoting is actually *needed*.
--
Andreas (Kusalananda) Kähäri
Uppsala, Sweden
.