Hello, I am new to this Forum, but have been a long time 4NT user. I recently upgraded to 4nt/Tcc version 9.02. I have historically always modified my command prompt to include my nested shell number (option -z, I believe). When I installed version 9.02, this behavior appeared to no longer work.
I ran a quick test by opening up a 4NT window and checked the value of _shell. It was 0, as expected. I then executed "4nt.exe" from the command line to create a nested shell. Again, I checked the value and it was still 0, not 1 as I expected. I then had to perform two "exits" in order to fully close the window - as expected.
Is this a known bug with _shell in 9.02, or am I missing something? (Incidentally, I also checked the value of the new internal variable (_shells) and got the same results.
I am running on Vista.
Thanks for any help.
After all of this discussion and investigation, this appears to me to be a bug in 9.02. It looks like when I install on Vista using the default destination folder, the installer puts a SFN into my PATH for my TCMD9 directory. A "Which /A 4nt" command confirms this, giving me a single SFN entry (this happens when I perform the which command at the command prompt from any directory OTHER THAN the TCMD9 directory. If I run "Which" from within the TCMD9 directory, I get two entries - one long and one short, and my shell works in this limited case.). From any directory other than the TCMD9 directory, issuing a second 4nt command at the command prompt then created a second shell, but _shell was not being updated properly.
1. I ended up putting the LFN equivalent into my PATH ahead of the SFN. I now have two entries for TCMD9 in my PATH (long and short). This way, 4nt tools that need the LFN will find what they need; and 4nt tools that need the SFN will also find what they need. (Long is ahead of Short.)
2. Set ComSpec to be the complete long path to 4nt.exe.
3. I then created an alias: alias 4NT `%ComSpec`
4. And then another alias: alias tcc `%ComSpec`
5. Now when I invoke either 4NT or TCC, the executable 4nt.exe is always launched using the complete path. Proper shell nesting now occurs.
I want to thank all of you for your quick responses and your debugging/checking. You really helped me out a lot. Hopefully, I can return the favor someday.