From LedHed's Wiki
(Created page with "== Overview == '''First off I have to say I love you Joseph Napoli, this find changed my life.''' One of my biggest complaints about using PowerShell is that Microsoft fail...") |
(No difference)
|
Revision as of 19:30, 20 November 2020
Overview
First off I have to say I love you Joseph Napoli, this find changed my life.
One of my biggest complaints about using PowerShell is that Microsoft failed to add some useful command sequences, particularly CTRL+D. If you're a Linux admin you use this key sequence hundreds of times a day. Its by far the easiest way to exit a shell / ssh session.
Enabling EMACS mode in PowerShell
Set-PSReadlineOption -EditMode Emacs
This command enables a user to exit PowerShell with CTRL+D, as well as a few other common key sequences like CTRL+A / CTRL+E (jump to beginning/end of a line).
How to make it persistent
Edit your profile:
echo Set-PSReadlineOption -EditMode Emacs >> $PROFILE