SnippetPredictor-Help.xml
|
<?xml version="1.0" encoding="utf-8"?> <helpItems xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" schema="maml" xmlns="http://msh"> <command:command> <command:details> <command:name>Add-Snippet</command:name> <maml:description> <maml:para>Add snippets with tooltip to the snippet configuration.</maml:para> </maml:description> <command:verb>Add</command:verb> <command:noun>Snippet</command:noun> </command:details> <maml:description> <maml:para>Add snippets with tooltip to the snippet configuration. The snippet configuration resides in `~/.snippet-predictor.json`.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Add-Snippet</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Snippet</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases="none"> <maml:name>Tooltip</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases="none"> <maml:name>Group</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2" aliases="none"> <maml:name>Group</maml:name> <maml:description> <maml:para>The group of the snippet</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="0" aliases="none"> <maml:name>Snippet</maml:name> <maml:description> <maml:para>The text of the snippet</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1" aliases="none"> <maml:name>Tooltip</maml:name> <maml:description> <maml:para>The tooltip of the snippet</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para>The snippet string to add.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Object</maml:name> </dev:type> <maml:description> <maml:para>No output.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> <maml:para>```powershell Add-Snippet "echo hello" ```</maml:para> <maml:para>€</maml:para> <maml:para>Add a snippet.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2 ---------</maml:title> <maml:introduction> <maml:para>```powershell Add-Snippet 'echo hello' 'say hello' ```</maml:para> <maml:para>€</maml:para> <maml:para>Add a snippet with tooltip.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 3 ---------</maml:title> <maml:introduction> <maml:para>```powershell {echo hello} | Add-Snippet ```</maml:para> <maml:para>€</maml:para> <maml:para>Add a snippet. You can pass code blocks. Code blocks are implicitly converted to strings through the pipeline.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 4 ---------</maml:title> <maml:introduction> <maml:para>```powershell @{Snippet='echo hello'; Tooltip='say hello'},@{Snippet='echo goodbye'; Tooltip='say goobye'} | % {[pscustomobject]$_} | Add-Snippet ```</maml:para> <maml:para>€</maml:para> <maml:para>Add a snippet through pipeline.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/Add-Snippet.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>SnippetPredictor.md</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/SnippetPredictor.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Disable-SnippetPredictorKeyHandler</command:name> <maml:description> <maml:para>Removes PSReadLine key bindings registered by SnippetPredictor.</maml:para> </maml:description> <command:verb>Disable</command:verb> <command:noun>SnippetPredictorKeyHandler</command:noun> </command:details> <maml:description> <maml:para>Removes the PSReadLine completion bindings registered by `Enable-SnippetPredictorKeyHandler`. The command checks ownership before cleanup and leaves user-owned bindings unchanged. It preserves a binding that the user replaced after enabling the handlers. For the enable command's default chords, the command restores the completion bindings. It assigns `TabCompleteNext` to Tab and `TabCompletePrevious` to Shift+Tab. The command removes bindings for custom chords. The command doesn't restore a custom binding that `Enable-SnippetPredictorKeyHandler` overwrote. PSReadLine doesn't expose the original script block required to restore an arbitrary custom action. Removing the SnippetPredictor module performs the same cleanup automatically. Calling this command more than once is safe.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Disable-SnippetPredictorKeyHandler</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Object</maml:name> </dev:type> <maml:description> <maml:para>No output.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>The binding state applies to the current PowerShell session. This command doesn't manage key bindings created by user code. This includes bindings that use handlers returned by `New-SnippetPredictorKeyHandler`. User code controls those bindings.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> <maml:para>```powershell Disable-SnippetPredictorKeyHandler ```</maml:para> <maml:para>€</maml:para> <maml:para>Removes the current SnippetPredictor completion bindings.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/Disable-SnippetPredictorKeyHandler.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Enable-SnippetPredictorKeyHandler</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/Enable-SnippetPredictorKeyHandler.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-SnippetPredictorKeyHandler</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/New-SnippetPredictorKeyHandler.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>SnippetPredictor.md</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/SnippetPredictor.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Enable-SnippetPredictorKeyHandler</command:name> <maml:description> <maml:para>Registers opt-in PSReadLine key bindings for SnippetPredictor.</maml:para> </maml:description> <command:verb>Enable</command:verb> <command:noun>SnippetPredictorKeyHandler</command:noun> </command:details> <maml:description> <maml:para>Registers PSReadLine key bindings that invoke SnippetPredictor completion handlers. A chord is the key or sequence of keys assigned to a handler. For `:` or a partial identifier, the handlers complete `:snp` and matching group identifiers. The `:tip` identifier isn't included. For an exact `:snp` or group identifier, the handlers complete matching snippets. Repeated Tab or Shift+Tab cycles through matching candidates. For one candidate, the next Tab or Shift+Tab starts a new lookup using the replaced input. For example, press Tab twice after `:sn`. The first press completes `:snp`; the second starts snippet completion. The handlers require the cursor at the end of the line. Every character before the identifier must be whitespace. Unsupported input delegates to standard PSReadLine completion. The command doesn't change the prediction ListView bindings. Use the standard PSReadLine UpArrow and DownArrow bindings to navigate the ListView. The command overwrites existing bindings for the selected chords. It doesn't preserve an arbitrary custom action for later restoration. Enabling the handlers again first cleans up bindings from the previous call. Use `Disable-SnippetPredictorKeyHandler` to remove the registered bindings explicitly. Removing the SnippetPredictor module performs the same cleanup automatically. The bindings apply to the current PowerShell session.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Enable-SnippetPredictorKeyHandler</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>NextChord</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases="none"> <maml:name>PreviousChord</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>NextChord</maml:name> <maml:description> <maml:para>Specifies the key or sequence of keys to bind to the next completion handler.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases="none"> <maml:name>PreviousChord</maml:name> <maml:description> <maml:para>Specifies the key or sequence of keys to bind to the previous completion handler.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Object</maml:name> </dev:type> <maml:description> <maml:para>No output.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>The command doesn't change the PSReadLine prediction source or view style. Identifier matching is case-sensitive. Snippet matching follows the `SearchCaseSensitive` configuration value. Input such as `x :` isn't handled because a non-whitespace character precedes the identifier. During cleanup, the command assigns `TabCompleteNext` to Tab and `TabCompletePrevious` to Shift+Tab. The command removes bindings for other registered chords. A binding replaced by the user after this command runs isn't changed during cleanup.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> <maml:para>```powershell Enable-SnippetPredictorKeyHandler ```</maml:para> <maml:para>€</maml:para> <maml:para>Registers completion bindings for the default Tab and Shift+Tab chords. Type `:` and press Tab to cycle through `:snp` and configured group identifiers.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2 ---------</maml:title> <maml:introduction> <maml:para>```powershell Enable-SnippetPredictorKeyHandler -NextChord Ctrl+j -PreviousChord Ctrl+k Disable-SnippetPredictorKeyHandler ```</maml:para> <maml:para>€</maml:para> <maml:para>Registers and then removes completion bindings for custom chords.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/Enable-SnippetPredictorKeyHandler.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Disable-SnippetPredictorKeyHandler</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/Disable-SnippetPredictorKeyHandler.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>New-SnippetPredictorKeyHandler</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/New-SnippetPredictorKeyHandler.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>SnippetPredictor.md</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/SnippetPredictor.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Get-Snippet</command:name> <maml:description> <maml:para>Retrieves a saved snippets.</maml:para> </maml:description> <command:verb>Get</command:verb> <command:noun>Snippet</command:noun> </command:details> <maml:description> <maml:para>Retrieves a saved snippets. The save snippets stored in the snippet configuration. The snippet configuration resides in `~/.snippet-predictor.json`.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-Snippet</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>SnippetPredictor.SnippetEntry</maml:name> </dev:type> <maml:description> <maml:para>A record containing a snippet and its tooltip.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-Snippet ```</maml:para> <maml:para>€</maml:para> <maml:para>Retrieves a saved snippets.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/Get-Snippet.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>SnippetPredictor.md</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/SnippetPredictor.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>New-SnippetPredictorKeyHandler</command:name> <maml:description> <maml:para>Returns a composable SnippetPredictor key handler for custom key bindings.</maml:para> </maml:description> <command:verb>New</command:verb> <command:noun>SnippetPredictorKeyHandler</command:noun> </command:details> <maml:description> <maml:para>Returns a fixed script block for the selected SnippetPredictor action. The script block returns `$true` when SnippetPredictor handles the current input. It returns `$false` when the input is outside the supported scope. In that case, it doesn't invoke fallback completion. The Tab completion actions complete `:snp` and configured group identifiers. They accept `:` or a partial identifier. They complete snippets after an exact `:snp` or group identifier. The `:tip` identifier isn't included. For one candidate, the handler ends the candidate session. The next Tab or Shift+Tab starts a new completion lookup. The caller must consume the Boolean result and decide which fallback action to invoke. Do not register the returned script block directly with `Set-PSReadLineKeyHandler`. `Enable-SnippetPredictorKeyHandler` doesn't register the prediction navigation actions. `Disable-SnippetPredictorKeyHandler` doesn't manage key bindings registered by user code. The caller controls bindings that use a returned script block.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-SnippetPredictorKeyHandler</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Action</maml:name> <maml:description /> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">TabCompleteNext</command:parameterValue> <command:parameterValue required="false" variableLength="false">TabCompletePrevious</command:parameterValue> <command:parameterValue required="false" variableLength="false">NextSuggestion</command:parameterValue> <command:parameterValue required="false" variableLength="false">PreviousSuggestion</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Action</maml:name> <maml:description> <maml:para>Specifies the SnippetPredictor action implemented by the returned script block.</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">TabCompleteNext</command:parameterValue> <command:parameterValue required="false" variableLength="false">TabCompletePrevious</command:parameterValue> <command:parameterValue required="false" variableLength="false">NextSuggestion</command:parameterValue> <command:parameterValue required="false" variableLength="false">PreviousSuggestion</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Object</maml:name> </dev:type> <maml:description> <maml:para>A fixed `System.Management.Automation.ScriptBlock`. The script block returns whether SnippetPredictor handled the input.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>The returned script block belongs to the SnippetPredictor script module. It shares the module's handler state. Tab completion requires the cursor at the end of the line. Every character before the identifier must be whitespace. Identifier matching is case-sensitive. Snippet matching follows the `SearchCaseSensitive` configuration value.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> <maml:para>```powershell $handler = New-SnippetPredictorKeyHandler -Action NextSuggestion ```</maml:para> <maml:para>€</maml:para> <maml:para>Returns the fixed handler for selecting the next prediction.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2 ---------</maml:title> <maml:introduction> <maml:para>```powershell $snippetHandler = New-SnippetPredictorKeyHandler -Action TabCompleteNext $userAction = { param($key, $arg)</maml:para> <maml:para>€</maml:para> <maml:para>[Microsoft.PowerShell.PSConsoleReadLine]::Insert((Get-Date -Format 'yyyy-MM-dd')) } $composedHandler = { param($key, $arg)</maml:para> <maml:para>€</maml:para> <maml:para>if (-not (& $snippetHandler $key $arg)) { & $userAction $key $arg } }.GetNewClosure()</maml:para> <maml:para>€</maml:para> <maml:para>Set-PSReadLineKeyHandler ` -Chord Ctrl+Alt+d ` -ScriptBlock $composedHandler ` -BriefDescription 'SnippetPredictorOrUserAction' ` -Description 'Complete SnippetPredictor input or run the user action' ```</maml:para> <maml:para>€</maml:para> <maml:para>Registers a caller-owned key binding for the composed handler. The composed handler first tries SnippetPredictor completion. When the input isn't supported, it invokes the user action. The user action inserts the current date into the command line. The wrapper forwards the PSReadLine key and argument to the SnippetPredictor handler. When completion isn't supported, it forwards them to the user action. It uses `GetNewClosure()` to keep both script blocks accessible after registration. `Set-PSReadLineKeyHandler` replaces any existing `Ctrl+Alt+d` binding. The caller removes or replaces that binding.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/New-SnippetPredictorKeyHandler.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Disable-SnippetPredictorKeyHandler</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/Disable-SnippetPredictorKeyHandler.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Enable-SnippetPredictorKeyHandler</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/Enable-SnippetPredictorKeyHandler.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>SnippetPredictor.md</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/SnippetPredictor.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Remove-Snippet</command:name> <maml:description> <maml:para>Remove specified snippets from the snippet configuration.</maml:para> </maml:description> <command:verb>Remove</command:verb> <command:noun>Snippet</command:noun> </command:details> <maml:description> <maml:para>Remove specified snippets from the snippet configuration. The snippet configuration resides in `~/.snippet-predictor.json`.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-Snippet</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Snippet</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="0" aliases="none"> <maml:name>Snippet</maml:name> <maml:description> <maml:para>The text of the snippet to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para>The snippet string to remove.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Object</maml:name> </dev:type> <maml:description> <maml:para>No output.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> <maml:para>```powershell Remove-Snippet "echo hello" ```</maml:para> <maml:para>€</maml:para> <maml:para>Remove the snippet.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2 ---------</maml:title> <maml:introduction> <maml:para>```powershell {echo hello} | Remove-Snippet ```</maml:para> <maml:para>€</maml:para> <maml:para>Remove the snippet. You can pass code blocks. Code blocks are implicitly converted to strings through the pipeline.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 3 ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-Snippet | ? tooltip -like *test* | Remove-Snippet ```</maml:para> <maml:para>€</maml:para> <maml:para>Remove snippets whose tooltip contains "test".</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/Remove-Snippet.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>SnippetPredictor.md</maml:linkText> <maml:uri>https://github.com/krymtkts/SnippetPredictor/blob/main/docs/SnippetPredictor/SnippetPredictor.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |