- Mar
- 75
- 1
When I first saw the shebang feature added, I was elated. However, it arrived with a caveat, "Note that EXTPROC and SHEBANG only work with files with a .CMD extension, not .BTM or .BAT."
On my systems, after continuing struggles with CMD.exe, impatience with its quirks, and recoil at the desperate measures people take to write *.bat and *.cmd files that do anything semi-complicated, I settled upon a few simple rules: (1) Write .btm files for anything that is going to need TCC as its interpreter; (2) Try to avoid ever targeting CMD.exe; and (3) set the .bat and .cmd extensions as being handled by CMD.exe (or whatever the system installation default is.) This regimen has worked nicely, shielding me from most of the grief CMD.exe has given me.
Unfortunately, in order to use the shebang feature, it appears I will have to somehow make .cmd files be run by TCC. I fully expect, if I do that, to once again see baroque errors showing up where some quirky CMD.exe behavior has been avoided or accommodated by a similarly quirky batch file which is not understood by TCC in the same way as some past (or present) version of CMD.exe did (or does.) (I do not fault TCC for this. CMD.exe is "designed" by one or more people with twisted minds.)
Today's questions are: Is there some way to use the shebang feature without courting the above-described, all-too-familiar grief? Is there some compelling reason that TCC should only do shebang on .cmd files? Is there any chance of optionally relaxing that pickiness? What is the thinking behind that ".cmd only" restriction?
On my systems, after continuing struggles with CMD.exe, impatience with its quirks, and recoil at the desperate measures people take to write *.bat and *.cmd files that do anything semi-complicated, I settled upon a few simple rules: (1) Write .btm files for anything that is going to need TCC as its interpreter; (2) Try to avoid ever targeting CMD.exe; and (3) set the .bat and .cmd extensions as being handled by CMD.exe (or whatever the system installation default is.) This regimen has worked nicely, shielding me from most of the grief CMD.exe has given me.
Unfortunately, in order to use the shebang feature, it appears I will have to somehow make .cmd files be run by TCC. I fully expect, if I do that, to once again see baroque errors showing up where some quirky CMD.exe behavior has been avoided or accommodated by a similarly quirky batch file which is not understood by TCC in the same way as some past (or present) version of CMD.exe did (or does.) (I do not fault TCC for this. CMD.exe is "designed" by one or more people with twisted minds.)
Today's questions are: Is there some way to use the shebang feature without courting the above-described, all-too-familiar grief? Is there some compelling reason that TCC should only do shebang on .cmd files? Is there any chance of optionally relaxing that pickiness? What is the thinking behind that ".cmd only" restriction?