On 4/12/2017 10:30 PM, Scott Robison wrote:
On Wed, Apr 12, 2017 at 4:41 PM, Thomas <tho...@dateiliste.com> wrote:
On 2017-04-12 23:24, Scott Robison wrote:
When I am using the download from fossil-scm.org, I am able to use
single quotes to 'escape' the asterisk. Double quotes do not work.
On Windows?
How'd you do that?
Using a copy of fossil.exe 2.2 I just downloaded from fossil's
download page a minute ago, from a command prompt on Windows 10 Pro,
as follows: ....

Interesting. That does work, but not entirely for the reason I expected.

Using my build of Fossil 2.1 on Win10 64-bit, and the fossil test-echo command, I see:

C:\Users\Ross\Documents\tmp\fossil4>fossil test-echo '*'
g.nameOfExe = [C:\Programs\Bin\fossil.exe]
argv[0] = [fossil]
argv[1] = [test-echo]
argv[2] = ['*']

C:\Users\Ross\Documents\tmp\fossil4>fossil test-echo *
g.nameOfExe = [C:\Programs\Bin\fossil.exe]
argv[0] = [fossil]
argv[1] = [test-echo]
argv[2] = [.all-help-9c65b5432e.html.espell]
argv[3] = [.dockerignore]
....
argv[35] = [www]

So the single quotes work. The arguments are passed by CMD to fossil.exe without expanding wildcards. It appears that the single quotes prevent expansion in the C startup code, but are preserved. But that is ok, because the GLOB syntax understood by fossil allows quotes and strips them off before matching.

There's one more quirk. The globber does not change the argument in fossil if no files match. I suspect that causes some confusion when experimenting with this:

C:\Users\Ross\Documents\tmp\fossil4>fossil test-echo *.no-such-file.*
g.nameOfExe = [C:\Programs\Bin\fossil.exe]
argv[0] = [fossil]
argv[1] = [test-echo]
argv[2] = [*.no-such-file.*]

C:\Users\Ross\Documents\tmp\fossil4>

--
Ross Berteig                               r...@cheshireeng.com
Cheshire Engineering Corp.           http://www.CheshireEng.com/
+1 626 303 1602

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to