Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

WAD TCMD /T ...

May
12,846
164
The first command below starts TCMD17 with TCC13 echoing "foo" in the only tab. That seems right (args after "/t program" are passed to program). I figure that's why the help says /T has to be last on TCMD's command line. That's all good.
But, with the second command below, TCMD17 itself uses the specified INI file (and the TCC13 in its only tab doesn't get the INI spec and winds up using its default INI file).
Code:
v:\> g:\tc17\tcmd /t g:\tc13\tcc.exe echo foo

v:\> g:\tc17\tcmd /t g:\tc13\tcc.exe @g:\tc11\TCMD.INI
 
Note that this has nothing to do with having several versions. Here:
Code:
g:\tc17\tcmd.exe /t g:\tc17\tcc.exe @t:\alternate.ini
TCMD uses the specified INI file and TCC doesn't.
 
WAD - the TCMD.INI directive is processed and removed before the command line arguments are parsed.
So it's simply impossible to start TCMD, specifying what TCC will be in its one/default tab and an INI file that that TCC should use?
Too bad!!
It should stop looking for INI directives when it runs into /T.
 
So it's simply impossible to start TCMD, specifying what TCC will be in its one/default tab and an INI file that that TCC should use?

No, you can put it in your startup tabs.

It should stop looking for INI directives when it runs into /T.

Which would require a parser rewrite, because the @INIFILE option is processed a few thousand instructions before TCMD gets around to looking for /T. (And always has been.)
 
And a little experimenting suggests you can't give "/T program" **ANY** argument that starts with '@'. Bad!

I find it hard to believe that wherever/however you FIND the @INIFILE option you can't stop looking at /T.
 
I find it hard to believe that wherever/however you FIND the @INIFILE option you can't stop looking at /T.

If you think about it for another minute, you'll realize that TCMD can't parse anything until it processes the .INI file. Unless you want to not use anything other than the default values for the .INI directives -- in which case you don't need to be specifying a TCMD.INI (or have one at all).
 
If you think about it for another minute, you'll realize that TCMD can't parse anything until it processes the .INI file. Unless you want to not use anything other than the default values for the .INI directives -- in which case you don't need to be specifying a TCMD.INI (or have one at all).
That seems to be a contradiction. "TCMD can't parse anything until it processes the .INI file." But how can it figure out what .INI file to process until it parses its own command line?
Finding an INI file spec MUST happen before processing the INI file. Can you simply not look beyond a "/T"? As it is, TCMD appears to throw away EVERY argument that starts with '@', considering only the last one to be TCMD's INI file spec. That makes nonsense like this work(?).
Code:
g:\tc17\tcmd @ @ @foo /t g:\tc17\tcc.exe @g:\tc17\tcmd.ini @t:\alternate.ini echo foo
(where TCMD uses t:\alternate.ini and TCC uses the default).
Or perhaps you throw away **AND USE** only the first such arg? That way, at least, the user could specify an INI file for TCC by also specifying one (possibly the default) for TCMD ... a bit cumbersome but better than not having the capability at all.
Code:
g:\tc17\tcmd.exe @g:\tc17\tcmd.ini /t g:\tc17\tcc.exe @t:\alternate.ini
 
Or, instead of that ludicrously convoluted (and largely imaginary) syntax, you could just use the simple (and documented) startup tab.
Wouldn't that make it happen by default? And isn't the whole point of "/T" to do something different from the default?
 
Wouldn't that make it happen by default? And isn't the whole point of "/T" to do something different from the default?

First, I doubt that more than 10 people have ever used /T. It's a (very) special case option, and definitely not generally useful.

And second, no, the whole point of /T is not to do something different than the default, it's to create a new tab in an already-running TCMD session, from an app or batch file outside the TCMD session. The one (exceedingly rare) edge case that you're focusing on is passing /T as a startup option, which TCMD treats as an error condition when it can't find another TCMD session (and tries the best it can to do something marginally useful, namely starting a TCMD session).
 
The very first line from the help, describing "/T":

Code:
/T You can specify the program to start in the first tab with the /T option:

If that doesn't mean "as a startup option", what does it mean?
 

Similar threads

Back
Top