I am trying to make
CTRL + D - exit Powershell console
and
CTRL + L - clear the screen
like in bash.
So far, I have seen that we can define
function ^D {exit}
but that means I have to do CTRL+D and then hit enter for it to work.
Also, it doesn't even let me define
function ^L {exit}
Is there anyway to add these key bindings in the default Powershell console?
There is a new library PSReadline
for Powershell v3.0 that emulates the GNU Bash tab completion and key bindings. Even CTRL + R for reverse incremental search works. Exactly what I wanted.