Snippets
Dialog Box
Cancel
Close the snippet dialog box.
You can press this button or the escape key.
OK
Close the snippet dialog box and sends the snippet command into the current console view.
You can press this button or the enter key.
Show snippet information
If checked, information on snippet (author, version, code) are visible in dialog box bottom.
✉
Opens default email application to contact author.
www
Opens author's web site in default web browser.
Edit
Opens the snippet XML file in default XML editor.
You can configure your default text editor by creating/modifying this registry key: HKEY_CURRENT_USER\SOFTWARE\Classes\SystemFileAssociations\text\shell\edit\command.
For example:
HKEY_CURRENT_USER\SOFTWARE\Classes\SystemFileAssociations\text\shell\edit\command
(default) REG_SZ "C:\Program Files (x86)\Notepad++\notepad++.exe" %1
XML file
Snippet's definition is stored in XML file. Each XML file contains a collection of one or more snippets.
By default, snippets files location is Snippets sub-directory of the settings directory.
The settings directory is the directory containing your configuration file.
So usually snippets are located in %appdata%\Console\Snippets.
XML files schema:
ConsoleZSnippets
A snippets collection. Root element of XML schema. See XML file example.
Attributes
None.
Child Elements
Element | Description |
---|---|
DownloadUrl | Required element. Contains download URL. There must be exactly one DownloadUrl element in ConsoleZSnippets element. |
Snippet | Required element. Contains snippet definition. You can define one or multiple Snippet elements in ConsoleZSnippets element. |
Parent Elements
None.
DownloadUrl
Download URL.
Attributes
None.
Child Elements
None.
Parent Elements
Element | Description |
---|---|
ConsoleZSnippets | Root element of XML schema. |
Snippet
Snippet definition. See dialog box from XML example.
Attributes
None.
Child Elements
Element | Description |
---|---|
Header |
Required element. Specifies general information about the command snippet. There must be exactly one Header element in Snippet element. |
Declarations |
Optional element. Contains the literals of a command snippet that you can edit. There may be zero or one Declarations element in Snippet element. |
Code |
Required element. Specifies the code that you want to insert. There must be exactly one Code element in Snippet element. |
Parent Elements
Element | Description |
---|---|
ConsoleZSnippets | Root element of XML schema. |
Header
Specifies general information about the command snippet.
Attributes
None.
Child Elements
Element | Description |
---|---|
Title |
Required element. The friendly name of the command snippet. There must be exactly one Title element in a Header element. |
Description |
Required element. A description of the command snippet. There must be exactly one Title element in a Header element. |
Author |
Required element. The name of the person or company that authored the command snippet. There must be exactly one Title element in a Header element. |
Version |
Required element. The command snippet version. There must be exactly one Version element in a Header element. |
ShellTypes |
Optional element. Contains shell types for which command snippet is usable. There may be zero or one ShellTypes element in Header element. |
Parent Elements
Element | Description |
---|---|
Snippet | Snippet definition. |
Title
Opens author's web site in default web browser.
Attributes
None.
Child Elements
None.
Parent Elements
Element | Description |
---|---|
Header | Specifies general information about the command snippet. |
Description
A description of the command snippet.
Attributes
None.
Child Elements
None.
Parent Elements
Element | Description |
---|---|
Header | Specifies general information about the command snippet. |
Author
The name of the person or company that authored the command snippet.
Attributes
Attribute | Description |
---|---|
Url |
Optional attribute. Author's web site. |
Optional attribute. Author's email address. |
Child Elements
None.
Parent Elements
Element | Description |
---|---|
Header | Specifies general information about the command snippet. |
Version
The command snippet version.
Attributes
None.
Child Elements
None.
Parent Elements
Element | Description |
---|---|
Header | Specifies general information about the command snippet. |
ShellTypes
Contains shell types for which command snippet is usable.
Attributes
None.
Child Elements
Element | Description |
---|---|
ShellType |
Optional element. Specifies shell types for which command snippet is usable. There may be zero, one or multiple ShellType elements in ShellTypes element. |
Parent Elements
Element | Description |
---|---|
Header | Specifies general information about the command snippet. |
ShellType
Specifies shell types for which command snippet is usable.
Attributes
None.
Child Elements
None.
Parent Elements
Element | Description |
---|---|
ShellTypes | Contains shell types for which command snippet is usable. |
Declarations
Contains the literals of a command snippet that you can edit.
Attributes
None.
Child Elements
Element | Description |
---|---|
Literal |
Optional element. Contains literals. You can define 0 to 99 Literal elements in Declarations element. |
Parent Elements
Element | Description |
---|---|
Snippet | Snippet definition. |
Literal
Defines the literals of the command snippet that you can edit.
Attributes
None.
Child Elements
Element | Description |
---|---|
ID |
Required element. Specifies a unique identifier for the literal. There must be exactly one ID element in a Literal element. |
ToolTip |
Required element. Contains literals. You can define 0 to 99 Literal elements in Declarations element. There must be exactly one ToolTip element in a Literal element. |
Default |
Required element. Contains literals. You can define 0 to 99 Literal elements in Declarations element. There must be exactly one Default element in a Literal element. |
Parent Elements
Element | Description |
---|---|
Declarations | Contains the literals of a command snippet that you can edit. |
ID
Specifies a unique identifier for the literal.
Attributes
None.
Child Elements
None.
Parent Elements
Element | Description |
---|---|
Literal | Defines the literals of the command snippet that you can edit. |
ToolTip
Describes the expected value and usage of the literal.
Attributes
None.
Child Elements
None.
Parent Elements
Element | Description |
---|---|
Literal | Defines the literals of the command snippet that you can edit. |
Default
Specifies the default value of the literal.
Attributes
None.
Child Elements
None.
Parent Elements
Element | Description |
---|---|
Literal | Defines the literals of the command snippet that you can edit. |
Code
Specifies the code that you want to insert.
Attributes
Attribute | Description |
---|---|
Delimiter |
Optional attribute. Specifies the delimiter used to describe literals in the code. By default, the delimiter is $. |
Child Elements
None.
Parent Elements
Element | Description |
---|---|
Snippet | Snippet definition. |
Here an example of XML file:
Here an example dialog box from XML: