Take Command / TCC Help v. 13.03

Customizing Filename Completion

Hide Navigation Pane

Customizing Filename Completion

Previous topic Next topic No directory for this topic No expanding text in this topic  

Customizing Filename Completion

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for expanding text JavaScript is required for the print function Mail us feedback on this topic!  

Comments (...)

You can customize filename completion for any internal or external command or alias. This allows TCC to display filenames intelligently based on the command you are entering. For example, you might want to see only .TXT files when you use filename completion in the EDIT command.

 

To customize filename completion you can use the Filename Completion configuration options. You can also use the FILECOMPLETION environment variable. If you use both, the environment variable will override the configuration option. You may find it useful to use the environment variable for experimenting, then create permanent settings with the configuration dialog .

 

The format for both the environment variable and the directive is:

 

cmd1 [cmd2 ...]:ext1 ext2 ...; cmd2: ...

 

where

 

cmd1 etc. are command names

 

ext1 etc. are file extensions (which may include wildcards) or one of the following file types:

 

DIRSDirectories
RDONLYRead-only files
HIDDENHidden files
SYSTEMSystem files
ARCHIVEFiles modified since the last backup
FILESEverything that's not a directory

 

Note that if a file uses one of the reserved file type names shown above as its extension (e.g. xyz.hidden) , that file will be treated as if it were of that type.

 

The command name is the internal command, alias, or executable file name (without a path). For example, to have file completion return only directories for the CD, CDD, and RD commands and only .C and .ASM files for a Windows editor called WinEdit, you would use this setting for filename completion in the configuration dialog:

 

cd cdd rd:dirs; winedit:c asm

 

To set the same results using the FILECOMPLETION environment variable:

 

set filecompletion=cd cdd rd:dirs; winedit:c asm

 

With this setting in effect, if you type "CD " and then pressed Tab, TCC returns only directories, not files. If you type WINEDIT and press Tab, you will see only names of .C and .ASM files.

 

When testing for a customized filename match, TCC checks the actual command line you type (but without expanding any aliases). For example, if you use the definition above and have "W" aliased to "WINEDIT" and then enter a "W" command, filename completion  -- which refers only to "WINEDIT" -- will be ignored. To use customized filename completion for aliases you must enter the alias name:

 

FileCompletion=cd cdd rd:dirs; winedit:c asm; w:c asm

Comments (...)