Skip to main content

TCC Tab Completion of Filenames and Commands

Filename completion speeds the process of entering filenames. When you press the Tab (or F9) key on the TCC command line, TCC will insert a matching filename, command, alias, or variable (depending on the command and any matching filename completion arguments).

If you think you're going to have multiple matches, press F7 after the name and TCC will pop up a window where you can select the file(s) you wish to insert into the command line.

In addition to file names, you can optionally complete alias namesand variables names, and internal command names (see OPTION / Command Line / Filename Completion) when the argument is at the beginning of the command line.

Customizing Filename Completion

Many of the internal TCC commands have predefined filename matching - for example, CD and CDD will only match directory names, not filenames.

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. When you press the Tab (or F9) key, TCC will display a matching argument.

Programmable filename ("tab") completion is supported using any scripting language supported by TCC (i.e., BTM/CMD, Lua, Python, REXX, Tcl, etc.), and by plugins. See the TCC internal command TABCOMPLETE for details.

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.