Run Commands

Tutorial

Feature Showcase

Run commands are operating system commands run from within Komodo. Use the Run Command dialog box to interact with the system command line or shell while editing or debugging files in Komodo. Besides making it easy to run simple and complex custom commands from within Komodo, the Run Command dialog box can insert the results of shell commands into a document in the Editor Pane, or pass the contents of a document to the system command line or shell.

To view examples of run commands, see the "Samples" folder in the Toolbox.

Run commands can be stored for re-use in a project or the Toolbox, where they can be assigned key bindings.

Access the last ten commands executed in the Run Command dialog box by selecting Tools|Recent Commands. The prefixes [i], [l] and [il] indicate that Insert output, Pass selection as input or both were selected with the original command.

Creating Run Commands

To create a run command, select Tools|Run Command. The Run Command dialog box is displayed. Alternatively, invoke the Run Command dialog box from the Projects sidebar or the Toolbox by selecting Add|New Command from the Project or Toolbox menu.

The Run Command dialog box can be toggled between its "simple" or "advanced" form by clicking the More/Less button.

Simple Run Commands

This section describes the components of the Run Command dialog box that are displayed when the advanced commands are hidden (via the More/Less button. See Advanced Run Commands for information about the advanced fields.

Advanced Run Commands

Click the More button in the Run Command dialog box to display advanced options. The following options are available:

Command Output Tab

By default, the commands run in the Command Output tab on Komodo's Bottom Pane. (Use the Run in field to run the command in a new shell window, or to run a graphical application without a console.)

If the command prompts for input, enter it directly on the Command Output tab. Output written to "stderr" (standard error output) is displayed in red at the top of the tab. Click the Close button at the top right of the Command Output tab to terminate a running command. Click the Toggle Raw/Parsed Output View button to jump from parsed results to raw output and vice versa. (Parsing is enabled and configured via the Parse output with field.)

Note: For more information on parsing command output, see the Parsing Command Output section of the Run Command Tutorial.

Storing Run Commands in a Project or the Toolbox

To add a run command to the Toolbox, select Add to Toolbox in the Run Command dialog box. Run commands can also be added to projects or the Toolbox via the methods described in Storing Run Commands in a Project or the Toolbox.

To run a command stored in the Toolbox or in a project, double-click the run command's name, use the assigned key binding, or right-click the run command and select Run.

To access run command options for the selected run command, right-click the run command's name. The options are as follows:

Run Command Properties

To access the properties of a run command stored in a project or the Toolbox, right-click the run command and select Properties. The Properties dialog box contains all the elements of the Run Command dialog box, and is therefore used for editing stored run commands. In addition, the Properties dialog box is used to assign a custom icon to the run command, and to assign a custom key binding.

Assigning Custom Icons to Run Commands

The default run command icon can be replaced with custom icons. Komodo includes more than 600 icons; alternatively, select a custom image stored on a local or network drive (use 16x16-pixel images for best results).

To assign a custom icon to a run command:

  1. In the Projects sidebar or Toolbox, right-click the desired run command and select Properties. Alternatively, single click the run command to highlight it in the sidebar then select Projects|runcommand_name|Properties or Toolboxruncommand_name|Properties.
  2. In the Properties dialog box, click Change Icon.
  3. In the Pick an Icon dialog box, select a new icon and click OK. Alternatively, click Choose Other, and browse to the desired image file.
  4. In the properties dialog box for the run command, click OK. The custom icon is displayed next to the run command.

To revert to the default icon for a selected run command:

  1. In the Projects or Toolbox sidebar, right-click the desired run command and select Properties.
  2. Click Reset, then click OK. The default icon is displayed next to the run command.

Run Command Key Bindings

Custom key bindings can be assigned to run commands stored in the Toolbox or in a Project. Use the Key Binding tab in the run command's Properties to specify the keystrokes that invoke the run command. See Key Bindings for Custom Components for more information.