On Mon 05 Sep 2005 at 14:25:25 +0200, you wrote:

> X-Loop: [EMAIL PROTECTED]
> Reply-To: Peter Gebauer <[EMAIL PROTECTED]>,
>       [EMAIL PROTECTED]
> X-Debian-PR-Message: report 315515
> X-Debian-PR-Package: bash
> X-Debian-PR-Keywords: 
> X-Mailer: reportbug 3.12
> X-Virus-Scanned: by amavisd-new at smtp.su.se
> Delivered-To: [EMAIL PROTECTED]
> X-Virus-Scanned: by amavisd-new at cs.tu-berlin.de (including spamassassin)
> X-Spam-Status: No, hits=0 tagged_above=0 required=3 tests=
> X-Spam-Level: 
> Resent-From: Peter Gebauer <[EMAIL PROTECTED]>
> Resent-To: debian-bugs-dist@lists.debian.org
> Resent-Cc: Matthias Klose <[EMAIL PROTECTED]>
> Resent-Date: Thu, 23 Jun 2005 10:33:10 UTC
> Resent-Message-ID: <[EMAIL PROTECTED]>
> Resent-Sender: Debian BTS <[EMAIL PROTECTED]>
> From: Peter Gebauer <[EMAIL PROTECTED]>
> To: Debian Bug Tracking System <[EMAIL PROTECTED]>
> Subject: Bug#315515: bash: Environment variables completion error for 
> commands 'cd' and 'ls'.
> Date: Thu, 23 Jun 2005 09:23:59 +0200
> 
> Package: bash
> Version: 3.0-15
> Severity: minor
> 
> "cd $MY_VAR<tab>" will complete to "cd \$MY_VARIABLE" and escape the 
> dollar character.
> You don't want it escaped, you want to use it. Also, it doesn't need to 
> expand variables, just leave them as they are.
> "ls $MY_VAR<tab>" will not complete at all.

This can't be fixed, due to a limitation in bash itself. For cd
completion to treat pathnames correctly and not append a space to them,
'complete -o filenames' must be used. Unfortunately, this has the
effect of treating $foo as a filename, too, so bash escapes the $
metacharacter.

Ian
-- 
Ian Macdonald               | Q: What's the difference between a duck and
[EMAIL PROTECTED]             | an elephant? A: You can't get down off an
http://www.caliban.org/     | elephant. 
                            | 
                            | 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to