diff options
author | Karl Berry <karl@freefriends.org> | 2018-12-13 17:23:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-12-13 17:23:10 +0000 |
commit | 4d763ea3fc9e08f00534d39b6ba9dfc621bf6402 (patch) | |
tree | 9c93c3d6f8122be8235a9dce24564348125ed558 /Build/source/texk/kpathsea/kpsewhich.c | |
parent | f29df809ce8fc8a1295118a60b33a476ab42399e (diff) |
have kpsewhich --var-value expand braces too; also, recognize eithe ; or : regardless of the current system when parsing elements from a path (https://github.com/TeX-Live/texlive-source/issues/3)
git-svn-id: svn://tug.org/texlive/trunk@49400 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/kpsewhich.c')
-rw-r--r-- | Build/source/texk/kpathsea/kpsewhich.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/kpsewhich.c b/Build/source/texk/kpathsea/kpsewhich.c index 30680cc5df2..d78f098f657 100644 --- a/Build/source/texk/kpathsea/kpsewhich.c +++ b/Build/source/texk/kpathsea/kpsewhich.c @@ -493,7 +493,7 @@ to also use -engine, or nothing will be returned; in particular,\n\ -show-path=TYPE output search path for file type TYPE\n\ (list shown by -help-formats).\n\ -subdir=STRING only output matches whose directory ends with STRING.\n\ --var-value=STRING output the value of variable $STRING.\n\ +-var-value=STRING output the expanded value of variable $STRING.\n\ -version display version information number and exit.\n \ " @@ -824,7 +824,7 @@ main (int argc, string *argv) } puts (kpse->format_info[user_format].path); } else { - WARNING1 ("kpsewhich: Unknown file type, cannot show path:", + WARNING1 ("kpsewhich: Unknown file type, cannot show path: ", path_to_show); } } @@ -836,6 +836,12 @@ main (int argc, string *argv) unfound++; value = ""; } + /* It is helpful for users to output the fully-expanded (as a + string, no filesystem checks) value. We can't call brace_expand + as part of kpathsea_var_value, though, because unfortunately it + is not reentrant. We use var_value in lots of places in the + source, and it clobbers the static buffer in the kpse structure. */ + value = kpathsea_brace_expand (kpse, value); puts (value); } |