You can add commands and submenus to the Tools menu. The tools can then be accessed from the Tools menu in P4V and optionally from context menus. You can export your custom tool definitions to a file from which other P4V users can import them.
Important: To define tools that issue p4 commands, specify "p4" in the Application field and the command and desired arguments (for example, "fix -c %c job000001") in the Arguments field. On Windows machines, you can specify the command and arguments together in the Application field, but if you export the resulting definition to a non-Windows machine, it will not work.
%a | Selected label. |
%b | Selected branch. |
%C, %c | Selected changelists. |
%D, %d | Selected files or folders (depot syntax used for depot files). |
%F, %f | Selected files (workspace syntax used for depot files). |
%i | Selected workspace specifications. |
%J, %j | Selected jobs. |
%O, %o | Depends on which pane has focus: |
When left pane has focus, selected checked out files. | |
When right pane has focus, all checked out files. | |
%P, %p | Selected pending changelists. |
%s | Selected submitted changelists. |
%u | Selected user. |
$c | Current workspace specification. |
$p | Current port. |
$r | Current client workspace root. |
$u | Current user. |
$D | Arguments from prompt dialog. |
$% | Literal '%' character. |
$$ | Literal '$' character. |
mycommand %F
" runs "mycommand arg1 arg2
arg3
" and "mycommand %f
" runs "mycommand arg1;
mycommand arg2; mycommand arg3
".
C:\tmp
) or specify %f, which uses the directory
of the selected file.(Note: If you specify %f, omit any other values.
For example, %f\temp
is invalid.) If you do not specify a value
in the Start in field, the value of the field depends on whether you
specify other file selection parameters (% parameters) in the Arguments
field, as follows: To add a new submenu: