<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Now I am confused, Matthias — where
does "TEXNAME" come into it ? In your example, there was no
instance of "TEXNAME" but rather a direct use of the tilde :<br>
<blockquote type="cite">
<pre wrap="">$ lualatex "/home/matt/reports/test~report/report.tex"</pre>
</blockquote>
Are you now saying that that was not the actual test, but that
what you actually wrote was :<br>
<br>
<blockquote type="cite">
<pre wrap="">$ lualatex TEXNAME</pre>
</blockquote>
<br>
where "TEXNAME" was an logical name, environment variable, or
similar ?<br>
<br>
Anyhow, regardless of whether or not the tilde was explicit or
implicit, it will be processed by TeX, and will therefore be
subject to expansion. <br>
Consider this from another perspective — if you were to write :<br>
<br>
<blockquote type="cite">$ tex \expandafter \def \csname
my:file\endcsname {Source.tex}\input \csname my:file\endcsname<br>
</blockquote>
<br>
you would expect TeX to try to open a file "Source.tex", would you
not ? And indeed it does :<br>
<br>
<blockquote type="cite">This is TeX, Version 3.14159265 (TeX Live
2020/W32TeX) (preloaded format=tex)<br>
<br>
*\end<br>
! I can't find file `Source.tex'.<br>
<to be read again><br>
\end<br>
<*> \end<br>
<br>
(Press Enter to retry, or Control-Z to exit)<br>
Please type another input file name:<br>
</blockquote>
<br>
Thus <i>everything</i> that follows the imperative "tex" at the
command prompt is interpreted as TeX source, and is not
interpreted specially just because it <i>might</i> be a file
name.<br>
</div>
<br>
<i>Philip Taylor</i><br>
</body>
</html>