Filename expansion (Re: hg add with special file names)
hopper at omnifarious.org
Fri Sep 23 14:12:59 CDT 2005
On Fri, Sep 23, 2005 at 05:24:13PM +0200, Jan Hudec wrote:
> On Fri, Sep 23, 2005 at 07:42:06 -0700, Bryan O'Sullivan wrote:
> > On Fri, 2005-09-23 at 14:48 +0200, Jan Hudec wrote:
> > > The default behaviour is broken on Unix and this is a proof. On Unix the
> > > shell does the expansion, so programs don't have to.
> > Mercurial has more extensive pattern matching support than the shell
> > does, so the current behaviour makes sense. Yes, it breaks in rare
> > cases, but that's why keyboards have quote keys.
> No, it does not. Does it have filetype match? Does it have permission match?
> A shell does (for a suitable values of shell).
> That's not a point though. If I want mercurial to expand it, I can still
> prepend glob: to it (which will at the same time escape it from the shell, as
> it won't match any files). But as a default it's confusing on Unix.
I agree. This behavior is not correct on systems where the shell is
supposed to do filename expansion for you. I go to a lot of effort to
write shell scripts that shield filenames from inadvertant expansion by
the shell and write them in complete faith the once the program gets
them, it will interpret them literally. I do not want to have to write
all kinds of special quoting stuff just so that when I pass a filename
to hg, it treats it like every single other program in existence would
treat it without all the special quoting stuff.
But making it different under Windows will have interesting effects for
those who use Cygwin. But I expect that people using Cygwin under
Windows are used to that kind of weird mismatch and expect it.
Have fun (if at all possible),
"It does me no injury for my neighbor to say there are twenty gods or no God.
It neither picks my pocket nor breaks my leg." --- Thomas Jefferson
"Go to Heaven for the climate, Hell for the company." -- Mark Twain
-- Eric Hopper (hopper at omnifarious.org http://www.omnifarious.org/~hopper) --
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://www.selenic.com/pipermail/mercurial/attachments/20050923/41e20981/attachment.pgp
More information about the Mercurial