On Mon, Aug 9, 2010 at 2:59 AM, Bram Moolenaar <[email protected]> wrote:
>
> James Vega wrote:
>
>> When running tests in my build environment, I noticed that test73 kept
>> failing while it would work fine in my normal environment. Turns out
>> this is because my build environment uses dash[0] for /bin/sh, which
>> doesn't support ** wildcards (since they're not specified by POSIX).
>>
>> Poking around, I see that unix_expandpath handles ** regardless of shell
>> by doing its own expansion. Would it make sense to use unix_expandpath
>> to handle the ** when mch_expand_wildcards needs STYLE_VIMGLOB ('shell'
>> is "sh") or STYLE_ECHO (unknown shell)?
>
> When it gets to STYLE_VIMGLOB or STYLE_ECHO this means the shell must be
> used to expand wildcards. Trying unix_expandpath() should already have
> happened. That's because using the shell is a last resort, as it's
> quite slow.
>
> I don't see the sequence of calls that would lead to this. Perhaps it
> depends on some setting?
I stumbled into this problem (works fine in my environment, but fails in
/bin/dash) when I first attempted to write test73.
At that point the find completion was implemented differently when on
windows (using mch_expandpath()) than when on unix (using globpath())
and it still contained the buggy 'recursive = TRUE' stuff, which is now
fixed in changeset 7ec9ada2cd81.
I could not reproduce the problem that you are reporting with the latest
vim (changeset 06a44c4eb3e5 "Prepare for 7.3e release").
I can reproduce the problem with the following bug-ridden-patch:
-- >8 --
diff --git a/src/misc1.c b/src/misc1.c
index 13b413c..02a8163 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -9753,9 +9753,9 @@ gen_expand_wildcards(num_pat, pat, num_file, file, flags)
|| flags & EW_CDPATH))
{
/* recursiveness is OK here */
- recursive = FALSE;
+ //recursive = FALSE;
add_pat = expand_in_path(&ga, p, flags);
- recursive = TRUE;
+ //recursive = TRUE;
}
else
#endif
-- 8< --
James, maybe you are running the test with an outdated vim?
nazri.
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php