On Thu, Mar 30, 2017 at 7:32 AM, <fossil-users-requ...@lists.fossil-scm.org> wrote: > > Date: Thu, 30 Mar 2017 11:15:37 +0200 > From: Florian Balmer <florian.bal...@gmail.com> > To: fossil-users@lists.fossil-scm.org > Subject: Re: [fossil-users] "CGI" command and argc > > > So, I would expect both of the following to work: > > #!/usr/bin/env -S fossil2/fossil cgi fossil.config > > #!/user/bin/env -S fossil1/fossil cgi fossil.config > > No, they don't, as the CGI script name is appended as an extra > argument to the shebang command line, causing Fossil to leave the path > with the explicit "CGI" command. I was suggesting that Fossil keep > going the explicit "CGI" command path even if there's more than three > command line arguments. >
Unfortunately, I don't have a BSD box to test with. The BSD man page for env claims that the -S option tells env to split the string following it by white space. Therefore, I would expect: env "-S perl -e 'print qq([$_] ) for (@ARGV)' a b c" to output: [a] [b] [c] There are examples of this behavior in the env man page (for BSD systems). But, as I said, I don't have a BSD box to test this on, Also, as best I can tell, only BSD's env has the -S option, so it is not a portable solution. However, the following should be portable to most Unix/POSIX type systems: #!/bin/sh -c fossil cgi fossil.config
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users