kpathsea: Auxiliary tasks
5.5.3 Auxiliary tasks
---------------------
Kpsewhich provides some features in addition to path lookup as such:
'--debug=NUM'
Set debugging options to NUM.
Debugging.
'--expand-braces=STRING'
Output variable and brace expansion of STRING.
Path
expansion.
'--expand-path=STRING'
Output the complete expansion of STRING, with each element
separated by the usual path separator on the current system (';' on
Windows, ':' otherwise). This may be useful to construct a custom
search path for a format not otherwise supported. To retrieve the
search path for a format that is already supported, see
'--show-path'.
Nonexistent directories are culled from the output:
$ kpsewhich --expand-path '/tmp'
=> /tmp
$ kpsewhich --expand-path '/nonesuch'
=>
For one-shot uses of an arbitrary (not built in to Kpathsea) path,
see '--path' (
Path searching options)
'--expand-var=STRING'
Output the variable and tilde expansion of STRING the 'mktex...'
scripts run 'kpsewhich --expand-var='$TEXMF'' to find the root of
the TeX system hierarchy.
Path expansion.
'--help-formats'
Output information about each supported format (
Supported
file formats), including the names and abbreviations, variables
looked for, and the original path.
'--safe-in-name=NAME'
'--safe-out-name=NAME'
Exit successfully if NAME is safe to open for reading or writing,
respectively, else unsuccessfully. No output is written. These
tests take account of the related Kpathsea configuration settings
(
Calling sequence).
'--show-path=NAME'
Show the path that would be used for file lookups of file type
NAME. Either a filename extension ('pk', '.vf', etc.) or an
integer can be used, just as with '--format', described in the
previous section.
'--var-value=VARIABLE'
Outputs the value of VARIABLE (a simple identifier like 'TEXMF',
with no '$' or other constructs), expanding '$' (
Variable
expansion and '~' (
Tilde expansion) constructs, but not
performing other expansions.