bug-bash
[Top][All Lists]
Advanced

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

Re: Command substitution (backtick) and tab completion


From: Eric Blake
Subject: Re: Command substitution (backtick) and tab completion
Date: Fri, 31 Dec 2010 09:57:19 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 12/31/2010 09:49 AM, Chris F.A. Johnson wrote:
> Fri, 31 Dec 2010 11:49:26 -0500 (EST) linux system
>>> with default installation settings.
>>>
>>> In an earlier version of bash (3.2), the following works
>>> ls `pwd`/<tab> (expands pwd).
>>>
>>> In bash 4.1 it does not. Am I missing a setting or something?
>>> Thank you.
>>
>> Anybody that can at least verify this? Thanks.
> 
>    Yes, it works in 3.2 but not in 4.[012].

Personally, I find bash 3.2 behavior buggy - I _don't_ want `` (or $())
expanded by the mere act of tab-completion, as the command may have side
effects that I am unwilling to have happen more than once when I hit the
final Enter to accept the entire command line.  Yes, that means that
tab-completion is inherently limited when it cannot determine the
context of which directory to look in because the left-hand side of a
path name is hidden by a command substitution, but I'd rather live with
that safety than have arbitrary commands running during completion.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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