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: Greg Wooledge
Subject: Re: "$PWD"/m.ter<tab> removes the quotes on expand
Date: Mon, 11 Nov 2024 09:44:53 -0500

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.
In the top-level source directory where the executable "bash" can
be found, doing what you said gives me:

hobbit:/usr/local/src/bash/bash$ $PWD/bash

I.e. the quotes are removed entirely.  This happens either as the first
word of the command (as shown above), or as the second word following
a command such as "ls".



reply via email to

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