Differences

This shows you the differences between the selected revisions of the page.

2016-06-22 2016-06-22
5.8.4 Extension option controls can be grouped using @option - group. (martin) 5.8.4 Extension can require specific PowerShell and Windows version. (martin)
Line 21: Line 21:
| ''@==name=='' | Name of the custom command. \\ You can insert ampersand (''&'') before a letter to make it a keyboard accelerator. The name should end with ''%%...%%'' (ellipsis), if some prompt is displayed (confirmation or input) before the actual command is executed). For example ''%%&Grep...%%''. \\ This key is mandatory. | | ''@==name=='' | Name of the custom command. \\ You can insert ampersand (''&'') before a letter to make it a keyboard accelerator. The name should end with ''%%...%%'' (ellipsis), if some prompt is displayed (confirmation or input) before the actual command is executed). For example ''%%&Grep...%%''. \\ This key is mandatory. |
| ''@command'' | The actual [[custom_command|custom command]]. \\ The command will typically include some [[custom_command#patterns|custom command patterns]] and may use ''%EXTENSION_PATH%'' variable to refer to the extension file itself. You can also use ''[[scripting#variables|%WINSCP_PATH%]]'' to refer to the WinSCP executable path, or any other environment variable. \\ This key is mandatory. | | ''@command'' | The actual [[custom_command|custom command]]. \\ The command will typically include some [[custom_command#patterns|custom command patterns]] and may use ''%EXTENSION_PATH%'' variable to refer to the extension file itself. You can also use ''[[scripting#variables|%WINSCP_PATH%]]'' to refer to the WinSCP executable path, or any other environment variable. \\ This key is mandatory. |
-| ''@require'' | Defines extension dependencies. Prevents installing the extension on a system that does not meet extension requirements. \\ Recognized dependencies are: \\ ''WinSCP'' - Defines a minimal supported version of WinSCP, e.g. ''@require WinSCP 5.8.2'' \\ ''.NET'' - Defines a minimal supported version of .NET framework, e.g. ''@require .NET 4.5'' \\ To define multiple dependencies, use multiple ''@require'' entries on separate lines. |+| ''@require'' | Defines extension dependencies. Prevents installing the extension on a system that does not meet extension requirements. \\ Recognized dependencies are: \\ ''WinSCP'' - Defines a minimal supported version of WinSCP, e.g. ''@require WinSCP 5.8.2'' \\ ''Windows'' - Defines a minimal supported version of Windows, e.g. ''@require Windows 6.1'' (for Windows 7)\\ ''.NET'' - Defines a minimal supported version of .NET framework, e.g. ''@require .NET 4.5'' \\ ''PowerShell'' - Defines a minimal supported version of PowerShell, e.g. ''@require PowerShell 5.0'' \\ To define multiple dependencies, use multiple ''@require'' entries on separate lines. |
| ''@side'' | ''Local'' or ''Remote'' [[custom_command#types|type of custom command]]. \\ Defaults to ''Local''. | | ''@side'' | ''Local'' or ''Remote'' [[custom_command#types|type of custom command]]. \\ Defaults to ''Local''. |
| ''@flag'' | Custom command option. \\ Recognized options are: \\ ''ApplyToDirectories'' - Makes the command be executed even for selected directories. Makes sense for commands that work with files only (patterns ''!'', ''!&'' and ''%%!^!%%''). \\ ''Recursive'' - Makes the command be executed for files in selected directories. Makes sense for commands that work with single file only (pattern ''!''). \\ ''ShowResults'' - Makes the output of the custom command be shown in [[ui_console|Console window]]. Can be used with the ''Remote'' type custom commands only. The local commands can use their own Windows console window. \\ ''CopyResults'' - Makes the output of the custom command be copied to a clipboard. Can be used with the ''Remote'' type custom commands only. The local commands can make use of an API of their language to copy a contents to the clipboard. \\ ''RemoteFiles'' - With ''Local'' type custom command, makes ''!'', ''!&'' and ''!/'' patterns refer to remote paths, instead of paths to a local copy of the remote files (prevents the download itself too).  \\ To set multiple options, use multiple ''@flag'' entries on separate lines. | | ''@flag'' | Custom command option. \\ Recognized options are: \\ ''ApplyToDirectories'' - Makes the command be executed even for selected directories. Makes sense for commands that work with files only (patterns ''!'', ''!&'' and ''%%!^!%%''). \\ ''Recursive'' - Makes the command be executed for files in selected directories. Makes sense for commands that work with single file only (pattern ''!''). \\ ''ShowResults'' - Makes the output of the custom command be shown in [[ui_console|Console window]]. Can be used with the ''Remote'' type custom commands only. The local commands can use their own Windows console window. \\ ''CopyResults'' - Makes the output of the custom command be copied to a clipboard. Can be used with the ''Remote'' type custom commands only. The local commands can make use of an API of their language to copy a contents to the clipboard. \\ ''RemoteFiles'' - With ''Local'' type custom command, makes ''!'', ''!&'' and ''!/'' patterns refer to remote paths, instead of paths to a local copy of the remote files (prevents the download itself too).  \\ To set multiple options, use multiple ''@flag'' entries on separate lines. |

Last modified: by martin