I'm trying to use Fossil's CGI mode, but with /index.cgi and other such artifacts of the hosting configuration removed from the URL. I currently have rewrites working in the server, and a shell script that munges the environment variables, but I'm having trouble bridging to "fossil cgi".

In particular, because my shell script isn't the stock example, I can't pass the repository or directory options so it knows where to look for its data. An example in the cookbook writes a temporary compatible script containing the needed options and spawns an instance, but surely there has to be a better way.

Can "fossil cgi" accept -r or -d options that correspond to the "repository:" or "directory:" values from the shell script, or perhaps use a single switch and intelligently set the right value? For instance:

fossil cgi -r
fossil cgi -d

Or maybe something like:

fossil -t
fossil -t

where "-t" means "target" and sets the correct option based on whether the target is a file or directory.