WAD Possible Bug With OPTION Command With @FILE

Jun 2, 2008
373
2
Newton, MA
I have observed something that does not seem right to me with the variable %_inimane. With my original TCSTART file, the variable would have the following value:

Code:
C:\ProgramData\JP Software\Take Command 27\TCMD.INI

When I add the command

Code:
option @c:\tcmd\Mail_Settings.cfg

the value of %_ininame changes to that file. Now I discovered that the same things happens as well when I run the option command from the command line.

This is not behavior that I would expect, and I don't think that it is documented. I also don't think it makes sense, since the INI file is actually still the same, and any changes I make using the OPTIONS tab in TCMD are written to TCMD.INI.

As a work-around, I have removed the "option @file" command and replaced it with a string of commands of the form "option //parameter=value", one for each line in the CFG file.
 
Apr 2, 2011
1,404
10
54
North Carolina, USA
I just do a:
Code:
for %data in @mail_settings.cfg do option //data

does

Makefile:
option @mail_settings.cfg

work?
 
Jun 2, 2008
373
2
Newton, MA
Not quite. The command would have to be for %data in (@Mail_Settings.cfg) do option //%data. Even that would need some tweaking, since one of the lines is mailaddress=Jay Sage <jay@...>, so one would have to turn off redirection. In addition, the file has some lines like "[4NT]" that don't have corresponding option commands (though I think those lines are not necessary and could be removed from the file.

The whole thing added only five lines to TCSTART. The real issue is that running option @file changes the value of %_ininame to "file", which it should not, since the operatve ini file is still tcmd.ini.
 
Jun 2, 2008
350
3
Since it's a temporary options change (as mentioned in the help) I'm thinking that's how you know they're not necessarily coming from the INI file.
 

rconn

Administrator
Staff member
May 14, 2008
12,312
147
WAD, not a bug. It's behaved this way for 20+ years.

TCC does this so that if you've defined a new configuration file (which is definitely what you're doing with the "option @filename" syntax) the filename will be passed on to subsequent secondary shells so they can inherit it.
 
Jun 2, 2008
373
2
Newton, MA
Oh, that's very important to know. I definitely did not want those settings to be inherited! They were changes to the email settings to use a different mail server, and I intended them to apply only to that TCC task. So it's doubly good that I replaced that command with the individual option setting commands (following the suggestion from Charles G). Or are even those changes inherited by new TCC tasks?

It might be a good idea to include these details in the help file. Actually, I just looked, and the help file says, rather misleadingly, "Temporarily changing a list of options:", much like the description of the "OPTION //directive=value" version of the command.
 
Similar threads
Thread starter Title Forum Replies Date
I Possible Bug: History /n Returns Nothing Support 3
Jay Sage WAD Possible Bug in Batch Parameters Support 7
noahcoad Possible Bug? Launching 4nt.exe Goes Hairwire Support 10
G possible bug in SETDOS Support 4
M Is bash-like filename completion possible? Support 3
vefatica DO /P ... is this possible ... ? Support 5
M @FileSize - How is this possible? Support 10
S Is restartable TCMD download possible? Support 6
H Possible V16 documentation error? Support 2
The Wizard WAD Possible Incorrect COMSPEC handling Support 2
S How to? Is it possible for the IDE to start without plugins? Support 3
A How to? Is it possible to freeze one side of the console? Support 19
Vasilich How to? debugging files that use CALL command - possible?? Support 3
wbiebel Can this be possible: TCEXIT is not executed? Support 21
Frank VIEWing multiple files possible? Support 4
daniel347x Is it possible to send a line from the "command input" window to the tab without pressing "Enter", w Support 4
C Possible caching problem with http files Support 7
S Dir - case selection possible?? Support 3
T Possible to delete the new standard tab? Support 1
M Something that does not seem possible... Support 2
D Is this possible, and how Support 0
R strange bug? Support 7
Jay Sage Bug With Flow Control and/or Command Grouping Support 2
M Server 2019 Bug with @execstr? Support 14
R bug _ypixels in BDEBUGGER Support 6
E Fixed Bug with DIR /Z displaying descriptions Support 8
E Text copy bug Support 1
x13 SETARRAY /Z bug Support 6
Gamegod ffind bug with chinese Support 2
Dick Johnson cdd - is this a bug or a feature? Support 7
P "Set" command behavior - a bug? Support 3
nikbackm TCC 20 variable expansion bug Support 6
gentzel Bug launching external commands in 20.11.43 Support 11
R Is this a bug in SETARRAY? Support 2
M Windows Installer bug? Support 4
vefatica @SCRIPT bug persists Support 4
M Little bug, big consequences .. Support 6
fishman@panix.com Once again the Can't Install bug bites... Support 2
gentzel Fixed dirs +n bug in 20.0.12 x64 Support 2
M Bug in Windows 10, when adding symbol to task bar Support 6
Alpengreis [Bug?] View (V) Prefs Error (TC 18.00.27 x64) Support 4
D WAD Minor Post Installation Bug in V18 Support 1
samintz WAD Weird REN bug Support 6
G Bug? TCC 16.03.55 Console Palette Support 4
S Return of FTP copy bug in 16.02.48 Support 12
S XenForo bug Support 3
D TCMD16 Delete Toolbar Button bug Support 7
keithg1964 WAD 16.0027 Alias /rz bug Support 8
rfaquino WAD Apparently a bug when expanding environment variable %ProgramFiles(x86) Support 2
T Documentation @LINE[CON,n] @LINES[CON] not documented (bug?) Support 4

Similar threads