Purpose:Customize TCC filename ("tab") completion


Format:TABCOMPLETE [/= /L script /P /S /U script]


/L (script)/S (active scripts)




TABCOMPLETE allows you to create scripts to customize TCC's filename ("tab") completion, using any scripting language supported by TCC (i.e., BTM, Lua, Python, REXX, etc.).


You can create a maximum of 256 tab completion scripts, each of which can process any number of command names, variables, functions, etc. When TCC starts, it will automatically load any scripts in the "Complete" subdirectory in the TCC installation directory.


A tab completion script is passed four arguments:


Command - the name of the command at the beginning of the command line


Argument - the current argument being evaluated (double quoted)


Index - the offset in the command line of the beginning of Argument


CommandLine - the entire command line (double quoted)


When the script finishes, it should return 0 if it processed the completion, and save the result(s) in the TABCOMPLETIONRESULT environment variable. If the script has multiple completion results, they should be added to TABCOMPLETIONRESULT, separated by a space (and double quoted if they contain any whitespace).


TCC will examine the contents of TABCOMPLETIONRESULT; if it contains a single value TCC will insert it at the completion point on the command line. If there are multiple return values, TCC will display a popup window for selection (like the F7 completion window).




/=Display the TABCOMPLETE command dialog to help you set the filename and command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog.


/LLoad a tab completion script


/PPause after displaying a page of script names (only used with /S)


/SDisplay the names of all active tab completion scripts


/UUnload a tab completion script.