en-us/psreadlinehelper-help.xml
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh"> <command:command 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" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-MyPSReadline</command:name> <command:verb>Get</command:verb> <command:noun>MyPSReadline</command:noun> <maml:description> <maml:para>Get my PSReadline customizations</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Use this command to display your customizations to PSReadline</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-MyPSReadline</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></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></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Get-MyPSReadline Name Value ---- ----- ForegroundColor Cyan TokenKind String ContinuationPromptBackgroun... Magenta HistoryNoDuplicates True ErrorForegroundColor Green DingTone 440 MaximumHistoryCount 1000 DingDuration 300 ContinuationPromptForegroun... White HistorySaveStyle SaveIncrementally</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Get-PSReadlineOption</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-PSReadlineColorOptions</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command 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" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-MyPSReadlineKey</command:name> <command:verb>Get</command:verb> <command:noun>MyPSReadlineKey</command:noun> <maml:description> <maml:para>Get your custom key handlers</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Use this command to display a list of your customized PSReadline key handlers.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-MyPSReadlineKey</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></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></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Get-MyPSReadlineKey Key Function Description --- -------- ----------- Ctrl+h Open PSReadlineHistory View PSReadline history file with the associated application. [Jeff] Ctrl+Alt+f Function Menu Display all functions as menu using Out-GridView. [Jeff] F7 HistoryList Show command history with Out-Gridview. [Jeff] Shift+F1 OnlineCommandHelp Open online help for the current command. [Jeff] Alt+w SaveInHistory Save current line in history but do not execute. [Jeff] Ctrl+Alt+j MarkDirectory Mark the current directory. [Jeff] Ctrl+j JumpDirectory Goto the marked directory.[Jeff] Alt+j ShowDirectoryMarks Show the currently marked directories in a popup. [Jeff] F11 ListMyHandlers List my PSReadlineHandlers [Jeff]</dev:code> <dev:remarks> <maml:para>These are key handlers added with this module.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Get-PSReadlineKeyHandler</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command 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" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-PSReadlineColorOptions</command:name> <command:verb>Get</command:verb> <command:noun>PSReadlineColorOptions</command:noun> <maml:description> <maml:para>Get current PSReadline color settings.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Use this command to view your current color options for PSReadline. You might want to export this to a CSV file, edit colors and then use Import-PSReadlineColorOptions to configure your console.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-PSReadlineColorOptions</maml:name> <command:parameter required="false" variableLength="true" globbing="true" pipelineInput="False" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:Description> <maml:para>The name of a color option.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="true" pipelineInput="False" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:Description> <maml:para>The name of a color option.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></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></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Get-PSReadLineColorOptions Option TokenKind Setting Value ------ --------- ------- ----- ContinuationPromptForegroundColor ContinuationPrompt ForegroundColor White ContinuationPromptBackgroundColor ContinuationPrompt BackgroundColor Magenta DefaultTokenForegroundColor None ForegroundColor DarkYellow CommentForegroundColor Comment ForegroundColor Green KeywordForegroundColor Keyword ForegroundColor Green StringForegroundColor String ForegroundColor Cyan OperatorForegroundColor Operator ForegroundColor Blue VariableForegroundColor Variable ForegroundColor Green CommandForegroundColor Command ForegroundColor Yellow ParameterForegroundColor Parameter ForegroundColor Blue TypeForegroundColor Type ForegroundColor Gray NumberForegroundColor Number ForegroundColor White MemberForegroundColor Member ForegroundColor White DefaultTokenBackgroundColor None BackgroundColor DarkCyan CommentBackgroundColor Comment BackgroundColor DarkCyan KeywordBackgroundColor Keyword BackgroundColor DarkCyan StringBackgroundColor String BackgroundColor DarkCyan OperatorBackgroundColor Operator BackgroundColor DarkCyan VariableBackgroundColor Variable BackgroundColor DarkCyan CommandBackgroundColor Command BackgroundColor DarkCyan ParameterBackgroundColor Parameter BackgroundColor DarkCyan TypeBackgroundColor Type BackgroundColor DarkCyan NumberBackgroundColor Number BackgroundColor DarkCyan MemberBackgroundColor Member BackgroundColor DarkCyan EmphasisForegroundColor Emphasis ForegroundColor Cyan EmphasisBackgroundColor Emphasis BackgroundColor DarkCyan ErrorForegroundColor Error ForegroundColor Red ErrorBackgroundColor Error BackgroundColor DarkCyan</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-PSReadlineColorOptions -Name comment* Option TokenKind Setting Value ------ --------- ------- ----- CommentForegroundColor Comment ForegroundColor Green CommentBackgroundColor Comment BackgroundColor DarkCyan</dev:code> <dev:remarks> <maml:para>Get color options for comments.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Get-PSReadlineOption</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Show-PSReadlineColor</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Import-PSReadlineColorOptions</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command 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" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Import-PSReadlineColorOptions</command:name> <command:verb>Import</command:verb> <command:noun>PSReadlineColorOptions</command:noun> <maml:description> <maml:para>Import a CSV of customized color options.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Use this command to customize your PowerShell session with a specified color scheme. It is assumed you will use Get-PSReadlineColorOptions and export to a CSV file, which you will then modify.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Import-PSReadlineColorOptions</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:Description> <maml:para>The path to the CSV file.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:Description> <maml:para>The path to the CSV file.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></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></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Import-PSReadlineColorOptions -path c:\scripts\cyan.csv</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Get-PSReadlineColorOptions</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command 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" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Optimize-PSReadLineHistory</command:name> <command:verb>Optimize</command:verb> <command:noun>PSReadLineHistory</command:noun> <maml:description> <maml:para>Optimize the PSReadline history file</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The PSReadline module can maintain a persistent command-line history. However, there are no provisions for managing the file. When the file gets very large, performance starting PowerShell can be affected. This command will trim the history file to a specified length as well as removing any duplicate entries.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Optimize-PSReadLineHistory</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none"> <maml:name>MaximumLineCount</maml:name> <maml:Description> <maml:para>Set the maximum number of lines to store in the history file.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>$MaximumHistoryCount</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Passthru</maml:name> <maml:Description> <maml:para>By default this command does not write anything to the pipeline. Use -Passthru to get the updated history file.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none"> <maml:name>MaximumLineCount</maml:name> <maml:Description> <maml:para>Set the maximum number of lines to store in the history file.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>$MaximumHistoryCount</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Passthru</maml:name> <maml:Description> <maml:para>By default this command does not write anything to the pipeline. Use -Passthru to get the updated history file.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>PS C:\> Optimize-PSReadelineHistory</dev:code> <dev:remarks> <maml:para>Trim the PSReadlineHistory file to default maximum number of lines.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>PS C:\> Optimize-PSReadelineHistory -maximumlinecount 500 -passthru Directory: C:\Users\Jeff\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 11/2/2017 8:21 AM 1171 ConsoleHost_history.txt</dev:code> <dev:remarks> <maml:para>Trim the PSReadlineHistory file to 500 lines and display the file listing.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Get-PSReadlineOption</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Set-PSReadlineOption</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command 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" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Show-PSReadlineColor</command:name> <command:verb>Show</command:verb> <command:noun>PSReadlineColor</command:noun> <maml:description> <maml:para>Display a colorized version of PSReadline color settings.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command will display the current color settings for PSReadline using the corresponding foreground and background colors. Use Set-PSReadlineOption to change anything that is difficult to read.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Show-PSReadlineColor</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <command:returnValues /> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>PS C:\> show-psreadlinecolor Comment [ DarkGreen on Blue ] Operator [ White on Blue ] Number [ White on Blue ] Command [ Yellow on Blue ] Type [ Gray on Blue ] Keyword [ Green on Blue ] None [ DarkYellow on Blue ] Parameter [ White on Blue ] Emphasis [ Cyan on Blue ] Variable [ Green on Blue ] Error [ Red on Blue ] String [ DarkCyan on Blue ] Member [ White on Blue ] ContinuationPrompt [ DarkYellow on Blue ]</dev:code> <dev:remarks> <maml:para>The actual output would be colorized based on the foreground and background color settings.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Get-PSReadlineOption</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Set-PSReadLineOption</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |