Skip to main content

TCC Command Line Editing and Syntax Coloring

The TCC command line works like a single-line word processor, allowing you to edit any part of the command at any time before you press Enter to execute it (or Esc to erase it). The command line as typed (before alias and variable expansion) can contain up to a maximum of 65,535 characters.

Browse command line and directory history, use the tab key for filename and directory completion, and use numerous cut and paste options (even with Windows command line applications that have no internal cut and paste support) with the advanced line editor. All command line editing keys can be changed in the OPTION command Keyboard dialog.

TCC supports syntax coloring on the command line (similar to the syntax coloring in the IDE / batch debugger). You set the option and the colors to use in the OPTION / Windows dialog. You can define both foreground and background using any of the 16 Windows console colors. TCC will colorize:

  • Default - any text that doesn't match a syntax option
  • Commands - internal TCC commands
  • Aliases - command aliases defined with the TCC ALIAS command.
  • Comments - lines beginning with rem or ::
  • Labels - labels for a GOTO or GOSUB
  • Operators - | < > && || etc.
  • Batch / Local Vars - %1 - %n, %*, %~... etc.
  • Environment Vars - environment variables
  • Internal Vars - internal TCC variables and variable functions
  • Regexes - regular expressions