The comma is not part of the name. The advantage of a leading comma is that tcc will do tab file completion, so that I only need to type
Code:
,pr<tab>
and tcc will fill in prog.py.
Under 4nt, if I ran anything with a leading comma, it would run the command line with the associated program. As a random example,
Code:
,pic.jpg
would display pic.jpg using the jpg viewer windows associates with files with the jpg extension.
tcc does the same thing, except it only passes along the characters up to the first space, rather than the complete command line. I'm trying to figure out how to cause tcc to pass along the complete command line. Put another way, I'm trying to get tcc to do what 4nt did.
Quoting doesn't help.
Code:
,"prog.py -a"
gets
Code:
TCC: unknown command "prog.py -a"
How have you specified
Code:
.py=C:\Python27\python.exe
Is this part of windows file extension associations or is it something you've done in tcc?
You don't quote the arguments. I usually use a space to get filename completion. If you set up python as an executable extension, it will autocomplete without the comma or space. Look up "Executable extensions" in the help.
There's still the general issue with programs for which I haven't set up executable extensions, but I suppose I can deal with those one by one when the need arises.
Reading the docs regarding Executable extensions and Windows File Extensions, it's not clear to me why executable extensions and windows extensions don't behave the same (other than the means of setting them).
In other words, if I've associated .py with a windows file type and that files type with python.exe, why should I also have to set .py=python.ext in tcc?
The only difference I've found is that I have to include the set command in tcstart.btm if I want it to persist.
In other words, if I've associated .py with a windows file type and that files type with python.exe, why should I also have to set .py=python.ext in tcc?
You don't. The system already knows how to handle .py files the right way (if you type the command in full, it will fire Python, even without executable extensions)
What doesn't work in that case is tab completion. In TCC "unuseful" filetypes are skipped, so you don't have to tab through all these.
You can simply mark an extension as "useful" by adding it to the PATHEXT environment variable, like:
Code:
set PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.BTM;.TXT;.PY
After you enable the PATHEXT functionality (OPTION command > Startup tab > tick the PathExt box ), you can now type PR and <TAB> to get "prog.py" on the command-line..
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.