Clear the input from the start of the current word to the cursor. If the cursor is
between words, the input is cleared from the start of the previous word to the
cursor. The cleared text is placed in the kill ring.

Function is unbound.

ShellKillWord:

Clear the input from the cursor to the end of the current word. If the cursor is
between words, the input is cleared from the cursor to the end of the next word. The
cleared text is placed in the kill ring.

Clear the input from the start of the current word to the cursor. If the cursor is
between words, the input is cleared from the start of the previous word to the
cursor. The cleared text is placed in the kill ring.

Emacs: <Ctrl+w>

ValidateAndAcceptLine:

Attempt to execute the current input. If the current input is incomplete (for
example there is a missing closing parenthesis, bracket, or quote, then the
continuation prompt is displayed on the next line and PSReadLine waits for keys to
edit the current input.

Emacs: <Ctrl+m>

ViAcceptLine:

Accept the line and switch to Insert mode.

Vi command mode: <Enter>

ViAcceptLineOrExit:

Like DeleteCharOrExit in Emacs mode, but accepts the line instead of deleting a character.

Vi insert mode: <Ctrl+d>
Vi command mode: <Ctrl+d>

ViAppendLine:

A new line is inserted below the current line.

Vi command mode: <o>

ViBackwardDeleteGlob:

Deletes the previous word, using only white space as the word delimiter.

Vi command mode: <d,B>

ViBackwardGlob:

Moves the cursor back to the beginning of the previous word, using only white space
as delimiters.

Vi command mode: <B>

ViDeleteBrace:

Find the matching brace, paren, or square bracket and delete all contents within,
including the brace.

Vi command mode: <d,%>

ViDeleteEndOfGlob:

Delete to the end of the word.

Vi command mode: <d,E>

ViDeleteGlob:

Delete the next glob (white space delimited word).

Vi command mode: <d,W>

ViDeleteToBeforeChar:

Deletes until given character.

Vi command mode: <d,t>

ViDeleteToBeforeCharBackward:

Deletes until given character.

Vi command mode: <d,T>

ViDeleteToChar:

Deletes until given character.

Vi command mode: <d,f>

ViDeleteToCharBackward:

Deletes backwards until given character.

Vi command mode: <d,F>

ViInsertAtBegining:

Switch to Insert mode and position the cursor at the beginning of the line.

Vi command mode: <I>

ViInsertAtEnd:

Switch to Insert mode and position the cursor at the end of the line.

Vi command mode: <A>

ViInsertLine:

A new line is inserted above the current line.

Vi command mode: <O>

ViInsertWithAppend:

Append from the current line position.

Vi command mode: <a>

ViInsertWithDelete:

Delete the current character and switch to Insert mode.

Vi command mode: <s>

ViJoinLines:

Joins the current line and the next line.

Vi command mode: <J>

ViReplaceLine:

Erase the entire command line.

Vi command mode: <S>, <c,c>

ViReplaceToBeforeChar:

Replaces until given character.

Vi command mode: <c,t>

ViReplaceToBeforeCharBackward:

Replaces until given character.

Vi command mode: <c,T>

ViReplaceToChar:

Deletes until given character.

Vi command mode: <c,f>

ViReplaceToCharBackward:

Replaces until given character.

Vi command mode: <c,F>

ViYankBeginningOfLine:

Yank from the beginning of the buffer to the cursor.

Vi command mode: <y,0>

ViYankEndOfGlob:

Yank from the cursor to the end of the WORD(s).

Vi command mode: <y,E>

ViYankEndOfWord:

Yank from the cursor to the end of the word(s).

Vi command mode: <y,e>

ViYankLeft:

Yank character(s) to the left of the cursor.

Vi command mode: <y,h>

ViYankLine:

Yank the entire buffer.

Vi command mode: <y,y>

ViYankNextGlob:

Yank from cursor to the start of the next WORD(s).

Vi command mode: <y,W>

ViYankNextWord:

Yank the word(s) after the cursor.

Vi command mode: <y,w>

ViYankPercent:

Yank to/from matching brace.

Vi command mode: <y,%>

ViYankPreviousGlob:

Yank from beginning of the WORD(s) to cursor.

Vi command mode: <y,B>

ViYankPreviousWord:

Yank the word(s) before the cursor.

Vi command mode: <y,b>

ViYankRight:

Yank character(s) under and to the right of the cursor.

Vi command mode: <y,l>, <y,Space>

ViYankToEndOfLine:

Yank from the cursor to the end of the buffer.

Vi command mode: <y,$>

ViYankToFirstChar:

Yank from the first non-whitespace character to the cursor.

Vi command mode: <y,^>

Yank:

Add the most recently killed text to the input.

Emacs: <Ctrl+y>

YankLastArg:

Yank the last argument from the previous history line. With an argument, the first
time it is invoked, behaves just like YankNthArg. If invoked multiple times, instead
it iterates through history and arg sets the direction (negative reverses the
direction.)

Cmd: <Alt+.>
Emacs: <Alt+.>, <Alt+_>, <Escape,.>, <Escape,_>

YankNthArg:

Yank the first argument (after the command) from the previous history line. With an
argument, yank the nth argument (starting from 0), if the argument is negative,
start from the last argument.

Emacs: <Ctrl+Alt+y>, <Escape,Ctrl+y>

YankPop:

If the previous operation was Yank or YankPop, replace the previously yanked text
with the next killed text from the kill ring.

Emacs: <Alt+y>, <Escape,y>

Cursor movement functions
-------------------------

BackwardChar:

Move the cursor one character to the left. This may move the cursor to the previous
line of multi-line input.

If the input has multiple lines, move to the start of the current line, or if
already at the start of the line, move to the start of the input. If the input has a
single line, move to the start of the input.

Attempt to perform completion on the text surrounding the cursor. If there are
multiple possible completions, the longest unambiguous prefix is used for
completion. If trying to complete the longest unambiguous completion, a list of
possible completions is displayed.

Emacs: <Tab>

MenuComplete:

Attempt to perform completion on the text surrounding the cursor. If there are
multiple possible completions, the longest unambiguous prefix is used for
completion. If trying to complete the longest unambiguous completion, a list of
possible completions is displayed.

Repeat the last recorded character search, but in the opposite direction.

Vi command mode: <,>

RepeatSearch:

Repeat the last search in the same direction as before.

Vi command mode: <n>

RepeatSearchBackward:

Repeat the last search in the same direction as before.

Vi command mode: <N>

SearchChar:

Read the next character and then find it, going forward, and then back off a
character. This is for 't' functionality.

Vi command mode: <f>

SearchCharBackward:

Read the next character and then find it, going backward, and then back off a
character. This is for 'T' functionality.

Vi command mode: <F>

SearchCharBackwardWithBackoff:

Read the next character and then find it, going backward, and then back off a
character. This is for 'T' functionality.

Vi command mode: <T>

SearchCharWithBackoff:

Read the next character and then find it, going forward, and then back off a
character. This is for 't' functionality.

Vi command mode: <t>

SearchForward:

Prompts for a search string and initiates search upon AcceptLine.

Vi insert mode: <Ctrl+s>
Vi command mode: <?>, <Ctrl+s>

Custom Key Bindings
-------------------

PSReadLine supports custom key bindings using the cmdlet Set-PSReadLineKeyHandler. Most
custom key bindings will call one of the above functions, for example:

Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward

You can bind a ScriptBlock to a key. The ScriptBlock can do pretty much anything you want.
Some useful examples include:

* edit the command line
* opening a new window (e.g. help)
* change directories without changing the command line

The ScriptBlock is passed two arguments:

* $key - A [ConsoleKeyInfo] that is the key that triggered the custom binding. If you bind
the same ScriptBlock to multiple keys and need to perform different actions depending
on the key, you can check $key. Many custom bindings ignore this argument.
* $arg - An arbitrary argument. Most often, this would be an integer argument that the user
passes from the key bindings DigitArgument. If your binding doesn't accept arguments,
it's reasonable to ignore this argument.

Let's take a look at an example that adds a command line to history without executing it. This is
useful when you realize you forgot to do something, but don't want to re-enter the command line
you've already entered.

Set-PSReadLineKeyHandler -Key Alt+w `
-BriefDescription SaveInHistory `
-LongDescription "Save current line in history but do not execute" `
-ScriptBlock {
param($key, $arg) # The arguments are ignored in this example

These two functions retrieve useful information about the current state of
the input buffer. The first is more commonly used for simple cases. The
second is used if your binding is doing something more advanced with the Ast.