AllowedShellCommands

"David Allsopp" <[email protected]>
Newsgroups gmane.comp.tex.miktex
Organization MetaStack Solutions Ltd.
Message-ID <[email protected]>
I would like to configure my MiKTeX installation to allow \write18 to permit
git to be executed without needing to specify --enable-write18 each time I
run the tex driver. The motivation, for anyone interested, is so that an
analysis of \jobname can cause tex to checkout the correct version of other
TeX files automatically from source control.

A look at the sources revealed the AllowShellCommands registry value.
Various hunting through the source code has revealed that I must set the
value for every single TeX driver (i.e. xetex, pdftex, tex are all
separate).

This feature seems to have several limitations:
1. It appears to be undocumented
2. Requiring it be set for each and every single TeX driver is tedious -
instead of reading it from
HKLM/HKCU\Software\MiKTeX.org\MiKTeX\2.9\tex\AllowedShellCommands could it
not be read from the Core key, given that the feature is part of the Core
library?
3. It appears that setting the value in HKCU totally overrides anything
specified in HKLM?
4. It appears that you must include all the default values in the setting
(i.e. they are not added). i.e. the value picked totally replaces all
others.

If someone could confirm that my analysis is correct, I may raise a bug (and
possibly try to code some of the changes). I am thinking that it would be
good if:
1. The setting were properly documented
2. There is a place where it can be set for all TeX drivers
3. There were a way of combining the values, rather than overriding them

An obvious solution to #3 might be to introduce a new, compatible, syntax
where beginning the setting with ";" means "add this value to the previous"
one. One could then set one's system in a way which always these to be
nested if wanted. Thus where at present having AllowedShellCommands = git
means that \write18 can no longer execute ps2pdf, makeindex, etc., having
AllowedShellCommands = ;git would permit all the default commands and also
git.

Thoughts?


David


------------------------------------------------------------------------------
_______________________________________________
Q: How can I leave the mailing list?
A: See http://docs.miktex.org/faq/support.html#leavingml
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.