Configure external tools
Use the externaltools.conf
file to run actions from external tools on selected objects.
If you configure actions, these actions appear in the submenu when you right-click and select Open in the following locations:
- Controlled and private items in the Workspace Explorer tab.
- The Pending Changes tab
- The History view (Windows only)
The actions also appear as a new context menu item, External tools, in the following locations:
- The Branches tab
- The Changesets tab
- The Labels tab
- The History side panel (only GTK and macOS)
Create the externaltools.conf
file
Create the externaltools.conf
file in one of the following locations:
Note: The following locations are listed in order of precedence. For example, a configuration file in plastic-global-config
overrides a configuration file in the plastic4
directory.
- In the
plastic-global-config
repository under/externaltools/externaltools.conf
so that all clients have the same settings by default. - In your client installation directory.
- In the
plastic4
directory:- Windows: under
C:\Users\<em>user</em>\AppData\Local\plastic4
- Linux or macOS: under
$HOME/.plastic4
- Windows: under
Syntax
Use the following syntax for the externaltools.conf
file:
<objectType>[:<objectType>[...]] | <toolName> | <actionToRun> | <args>
Parameters
Parameter | Description |
---|---|
objectType | The name of the target object. The object can be an item, label, changeset, or branch. To combine objects, use : to separate them, |
toolName | The name of the tool you want the context menu to display. |
actionToRun | The path or environment variable:
|
args | The arguments line to pass to the target application. There are three supported placeholders:
|
externaltools.conf
file example
Refer to the following example of a valid externaltools.conf
file:
item | Open with sublime | C:\Program Files\Sublime Text 3\subl.exe | "@object"
label:changeset:branch | Create new code review... | /usr/bin/createcodereview | "@object@@repository" @wkpath
item | Preview with PhotoScape | %PHOTOSCAPE_PATH% | "@object"