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...") |
|||
Line 14: | Line 14: | ||
=== How to make it persistent === | === How to make it persistent === | ||
Edit your profile: | Edit your profile: | ||
− | echo Set-PSReadlineOption -EditMode Emacs >> $PROFILE | + | echo 'Set-PSReadlineOption -EditMode Emacs' >> $PROFILE |
Revision as of 19:33, 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