Filename completion anomaly

May 20, 2008
12,377
138
Syracuse, NY, USA
If I type

echo %@full["qb<Tab>

it completes to

echoargs.bat %@full["qb

with the cursor after "echoargs.bat".

I'm not questioning whether it should complete "qbat.bat" (which is present).

But it shouldn't do completion on "echo", a whole word away, should it?
 
vefatica wrote:

> If I type
>
> echo %@full["qb
>
> it completes to
>
> echoargs.bat %@full["qb
>
> with the cursor after "echoargs.bat".
>
> I'm not questioning whether it should complete "qbat.bat" (which is
> present).
>
> But it shouldn't do completion on "echo", a whole word away, should it?

You cannot use filename completion if you have an open double quote on
the command line. In this instance, the parser is looking for the first
quote, doesn't find it, and defaults to the start of the line. Either
use the correct syntax:

echo %@full["qb"<tab>

or put a space before the ":

echo %@full[ "qb<tab>

(Note that this behavior is more than 15 years old ...)

Rex Conn
JP Software
 

Similar threads