WAD issue with filename completion with system and hidden files

May 20, 2009
235
1
54
ITALY
#1
I use TCC 15.01.56 32 bit.
I have set the filename completion with this line: "TYPE:!EXE *;LIST:!EXE *;".
In this way I do not risk to type an executable file.
But I have found that this setting changes the behavior of filename completion.
For example, I create three files and change their attributes.

[C:\work\8888]> 1a.txt
[C:\work\8888]> 1h.txt
[C:\work\8888]> 1s.txt
[C:\work\8888]attrib 1h.txt -a +h
___A___________ -> _H_____________ C:\work\8888\1h.txt
[C:\work\8888]attrib 1s.txt -a +s
___A___________ -> __S____________ C:\work\8888\1s.txt
[C:\work\8888]attrib
___A___________ C:\work\8888\1a.txt
_H_____________ C:\work\8888\1h.txt
__S____________ C:\work\8888\1s.txt

Now, if I type "type 1" and then press the tab key two times it shows 1a.txt and then beeps.
The same for "list 1".
Instead, if I type "copy 1" when I press tab three times, it shows all filenames.
So, it seems that the syntax "command !EXE *;" changes the behavior of filename completion for that command and prevents it to find hidden and/or system files.


Regards

Rodolfo Giovanninetti
 
#4
Thank You, it works!
I consider it a bug since there is already an option that says "Complete hidden files".
It appears that entering anything in the "Options" box defeats those check-boxes. I don't know if it's a bug but it certainly is inconvenient (for example, not to be able to customize completion after saying, once and for all time, to complete hidden and system filenames).
 
#5
Just as an aside, my assumption from the original post is that the exclamation mark means to exclude the specified extension(s). This is definitely news to me if true. I thought I had scoured the help pretty thoroughly on this topic but could find no mention of that at all. If this is documented in the help (meaning the .chm file), where is it?

-- Dan McMullin
 
#7
I'm certainly familiar with the /[!...] exclusion syntax for internal commands. I've read those help pages many times, not just in the past but also immediately prior to and after my previous post. However, I've yet to see any documentation on using the exclamation mark in the FILECOMPLETION directive and/or variable. I'm not saying it's not in there somewhere -- I know not be certain of anything anymore -- only that I haven't seemed to notice it up to now. I'm plenty capable of being oblivious, seemingly more and more so all the time. If it is indeed somewhere in the .chm file, I'd really like to know exactly where. If it's not in there, it really should be added to the FILECOMPLETION-related pages since it's a potentially useful feature.

And if it's undocumented functionality, kudos to the OP for somehow learning of its existence. As complex and feature-rich as TCC is, I depend on the help to shine a light into its darker corners. I'm not sure I ever would have learned about this were it not for this thread.
 

rconn

Administrator
Staff member
May 14, 2008
10,757
97
#8
I use TCC 15.01.56 32 bit.
I have set the filename completion with this line: "TYPE:!EXE *;LIST:!EXE *;".
In this way I do not risk to type an executable file.
But I have found that this setting changes the behavior of filename completion.
WAD -- TCC is assuming that if you have customized filename completion for the specified command, then you've entered the complete set. It doesn't combine the custom completion with the default completion.
 
May 20, 2009
235
1
54
ITALY
#9
WAD -- TCC is assuming that if you have customized filename completion for the specified command, then you've entered the complete set. It doesn't combine the custom completion with the default completion.
Understood. Are there other options I should be aware of? I just want to prevent me from typing some files.
I do believe You should add these examples and descriptions to the help.

Thank You and regards

Rodolfo Giovanninetti