Addendum – the full PowerShell $profile file
We've covered a lot of commands and settings throughout this chapter, many of which require updating the PowerShell $profile
file. Here's a full $profile
file that makes use of all these options, all in one place:
# only apply to terminals, don't apply to e.g. ISE. if ($host.Name -eq 'ConsoleHost') {     Import-Module PSReadLine     # use vi bindings, but selectively re-enable others     Set-PSReadLineOption -EditMode Vi     Set-PSReadLineKeyHandler -Key Ctrl+a -Function       SelectAll     Set-PSReadLineKeyHandler -Key Ctrl+c -Function       CopyOrCancelLine     Set-PSReadLineKeyHandler -Key Ctrl+x -Function Cut     Set-PSReadLineKeyHandler -Key Ctrl+v -Function Paste     Set-PSReadLineKeyHandler...