|
From: | Chet Ramey |
Subject: | Re: "$PWD"/m.ter<tab> removes the quotes on expand |
Date: | Mon, 11 Nov 2024 09:48:06 -0500 |
User-agent: | Mozilla Thunderbird |
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/
OpenPGP_signature.asc
Description: OpenPGP digital signature
[Prev in Thread] | Current Thread | [Next in Thread] |