diff options
author | Karl Berry <karl@freefriends.org> | 2018-12-18 01:40:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-12-18 01:40:49 +0000 |
commit | d9b2d2530b4ac09813cfba6d98bce38bde3b51dd (patch) | |
tree | 3bc9012f1281edc4a9c2c18d30ce922ef04a06e3 /Build/source/texk/kpathsea/doc/kpathsea.texi | |
parent | b1b4f4baba35f24c5312ba7b478db9a66614765b (diff) |
restore -var-value behavior; new option -var-brace-value
git-svn-id: svn://tug.org/texlive/trunk@49446 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/doc/kpathsea.texi')
-rw-r--r-- | Build/source/texk/kpathsea/doc/kpathsea.texi | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/Build/source/texk/kpathsea/doc/kpathsea.texi b/Build/source/texk/kpathsea/doc/kpathsea.texi index 8bdf46be39f..449bd0e7489 100644 --- a/Build/source/texk/kpathsea/doc/kpathsea.texi +++ b/Build/source/texk/kpathsea/doc/kpathsea.texi @@ -1822,13 +1822,36 @@ Show the path that would be used for file lookups of file type or an integer can be used, just as with @samp{--format}, described in the previous section. +@item --var-brace-value=@var{variable} +@opindex --var-brace-value=@var{variable} +Like @samp{--var-value} (next), but also expands @samp{@{...@}} +constructs. (@pxref{Brace expansion}). Thus, the value is assumed to +possibly be several path elements, and @samp{~} is expanded at the +beginning of each. The path separator is changed to that of the +current system in the expansion. + +Example: @samp{FOO='.;~' kpsewhich --var-brace-value=FOO} outputs (on +a Unix-ish system) @samp{.:/home/karl}, supposing the latter is the +current user's home directory. Note that the @samp{;} in the source +value, as commonly used in @file{texmf.cnf}, has changed to a +@samp{:}, as the normal path separator on the current system. (On a +Windows-ish system, the @samp{;} would remain.) + @item --var-value=@var{variable} @opindex --var-value=@var{variable} Outputs the value of @var{variable} (a simple identifier like -@samp{TEXMF}, with no @samp{$} or other constructs), expanding -@samp{@{...@}} (@pxref{Brace expansion}), @samp{$} (@pxref{Variable -expansion}) and @samp{~} (@pxref{Tilde expansion}) constructs, -considered as strings, but not looking on the filesystem. +@samp{TEXMFDIST}, with no @samp{$} or other constructs), expanding +@samp{$} (@pxref{Variable expansion}) and @samp{~} (@pxref{Tilde +expansion}) constructs in the value. @samp{~} expansion happens at the +beginning of the overall value and at the beginning of a variable +expansion, but not arbitrarily within the string. Braces are not expanded. + +Example: @samp{--var-value=texmf_casefold_search} outputs (if the +default is not changed) @samp{1}. + +Example to contrast with @samp{--var-brace-value}: @samp{FOO='.;~' +kpsewhich --var-value=FOO} outputs @samp{.;~}, i.e., the same as the +input value. @end table |