[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: |
Mon, 11 Nov 2024 21:11:37 +0100 |
i suggest one more to update mai nline ( more )
thanks for texting tho :))
On Mon, Nov 11, 2024, 3:48 PM Chet Ramey <chet.ramey@case.edu> wrote:
> On 11/11/24 9:44 AM, Greg Wooledge wrote:
> > On Mon, Nov 11, 2024 at 09:26:15 -0500, Chet Ramey wrote:
> >> It's a bit more subtle than that. When bash detects that there are
> >> characters in the directory name that require quoting -- since it has
> >> to expand the variable to find the directory to open for possible
> >> completions -- it quotes the completed word.
> >>
> >> $ mkdir dir\ with\ spaces
> >> $ cp bash dir\ with\ spaces/
> >> $ cd dir\ with\ spaces/
> >>
> >> Here I typed "$PWD"/ba[TAB]
> >>
> >> $ "$PWD/bash"
> >
> > Is that in the development version? I can't reproduce that in 5.2.
>
> Yes. It changed about two years ago. From CHANGES in bash-5.3-alpha:
>
> b. Bash does a better job of preserving user-supplied quotes around a word
> completion, instead of requoting it.
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
>