You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<maml:para>Returns the values for the options that can be configured.</maml:para>
69
+
</maml:description>
70
+
<maml:copyright>
71
+
<maml:para />
72
+
</maml:copyright>
73
+
<command:verb>Get</command:verb>
74
+
<command:noun>PSReadlineOption</command:noun>
75
+
<dev:version />
76
+
</command:details>
77
+
<maml:description>
78
+
<!--This is the Description section-->
79
+
<maml:para>Get-PSReadlineOption returns the current state of the settings that can be configured by Set-PSReadlineOption.
80
+
81
+
The object returned can be used to change PSReadline options. This provides a slightly simpler way of setting syntax coloring options for multiple kinds of tokens.</maml:para>
<maml:para>Binds or rebinds keys to user defined or PSReadline provided key handlers.</maml:para>
69
132
</maml:description>
70
133
<maml:copyright>
71
134
<maml:para />
@@ -76,32 +139,34 @@
76
139
</command:details>
77
140
<maml:description>
78
141
<!--This is the Description section-->
79
-
<maml:para></maml:para>
142
+
<maml:para>This cmdlet is used to customize what happens when a particular key or sequence of keys is pressed while PSReadline is reading input.
143
+
144
+
With user defined key bindings, you can do nearly anything that is possible from a PowerShell script. Typically you might just edit the command line in some novel way, but because the handlers are just PowerShell scripts, you can do interesting things like change directories, launch programs, etc.</maml:para>
<maml:para>Specifies the key to be bound.</maml:para>
152
+
<maml:para>The key or sequence of keys to be bound to a Function or ScriptBlock. A single binding is specified with a single string. If the binding is a sequence of keys, the keys are separated with a comma, e.g. "Ctrl+X,Ctrl+X". Note that this parameter accepts multiple strings. Each string is a separate binding, not a sequence of keys for a single binding.</maml:para>
<maml:para>Specifies a ScriptBlock to be called when the bound key is pressed.</maml:para>
162
+
<maml:para>The ScriptBlock is called when the Chord is entered. The ScriptBlock is passed one or sometimes two arguments. The first argument is the key pressed (a ConsoleKeyInfo.) The second argument could be any object depending on the context.</maml:para>
<maml:para>The name of an existing key handler provided by PSReadline. This parameter allows one to rebind existing key bindings or to bind a handler provided by PSReadline that is currently unbound.
193
+
194
+
Using the ScriptBlock parameter, one can achieve equivalent functionality by calling the method directly from the ScriptBlock. This parameter is preferred though - it makes it easier to determine which functions are bound and unbound.</maml:para>
<maml:para>Specifies the key to be bound.</maml:para>
204
+
<maml:para>The key or sequence of keys to be bound to a Function or ScriptBlock. A single binding is specified with a single string. If the binding is a sequence of keys, the keys are separated with a comma, e.g. "Ctrl+X,Ctrl+X". Note that this parameter accepts multiple strings. Each string is a separate binding, not a sequence of keys for a single binding.</maml:para>
<maml:para>Specifies a ScriptBlock to be called when the bound key is pressed.</maml:para>
216
+
<maml:para>The ScriptBlock is called when the Chord is entered. The ScriptBlock is passed one or sometimes two arguments. The first argument is the key pressed (a ConsoleKeyInfo.) The second argument could be any object depending on the context.</maml:para>
<maml:para>The name of an existing key handler provided by PSReadline. This parameter allows one to rebind existing key bindings or to bind a handler provided by PSReadline that is currently unbound.
253
+
254
+
Using the ScriptBlock parameter, one can achieve equivalent functionality by calling the method directly from the ScriptBlock. This parameter is preferred though - it makes it easier to determine which functions are bound and unbound.</maml:para>
<maml:para>This command binds the up arrow key to the function HistorySearchBackward which will use the currently entered command line as the beginning of the search string when searching through history.</maml:para>
239
341
</dev:remarks>
@@ -243,6 +345,25 @@
243
345
</command:commandLine>
244
346
</command:commandLines>
245
347
</command:example>
348
+
<command:example>
349
+
<maml:title>-------------- Example 2 --------------</maml:title>
<maml:para>This example binds the key Ctrl+Shift+B to a script block that clears the line, inserts build, then accepts the line. This example shows how a single key can be used to execute a command.</maml:para>
<maml:para>Specifies the minimum length command to save in PSReadline history. Note that PSReadline history is separate from PowerShell history. </maml:para>
<maml:para>Specifies the maximum number of commands to save in PSReadline history. Note that PSReadline history is separate from PowerShell history.</maml:para>
465
+
<maml:para>Specifies the maximum number of commands to save in PSReadline history. Note that PSReadline history is separate from PowerShell history.</maml:para>
<maml:para>Specifies the minimum length command to save in PSReadline history. Note that PSReadline history is separate from PowerShell history. </maml:para>
<maml:para>Specifies the maximum number of commands to save in PSReadline history. Note that PSReadline history is separate from PowerShell history.</maml:para>
659
+
<maml:para>Specifies the maximum number of commands to save in PSReadline history. Note that PSReadline history is separate from PowerShell history.</maml:para>
<maml:para>Specifies the minimum length command to save in PSReadline history. Note that PSReadline history is separate from PowerShell history.</maml:para>
0 commit comments