help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "$PWD"/m.ter<tab> removes the quotes on expand


From: #!microsuxx
Subject: Re: "$PWD"/m.ter<tab> removes the quotes on expand
Date: Sun, 10 Nov 2024 21:44:39 +0100

i mean it didnt paste the "$PWD" cause it was gone

~/foo bar $ echo "$PWD"/m.

~/foo bar $ echo $PWD/m.bar

On Sun, Nov 10, 2024, 9:42 PM #!microsuxx <fxmbsw7@gmail.com> wrote:

> ~ $ mkdir 'foo bar'
> ~ $ cd foo\ bar/
> ~/foo bar $ touch m.bar
> ~/foo bar $ echo $PWD/m.bar
> /data/data/com.termux/files/home/foo bar/m.bar
> ~/foo bar $
>
> this is a dual problem
> not 1:1 code and therefore no work for codings where quotes plus tab is
> required
>
> vanilla termux just updated packages
>
> On Sun, Nov 10, 2024, 9:05 PM Andreas Kähäri <andreas.kahari@abc.se>
> wrote:
>
>> 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
>>
>> .
>>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]