Enhancing interaction with quotes and brackets by using PSReadline

In this article we will continue exploring content of the SamplePSReadLineProfile.ps1 from the PSReadline module.

In many code editors interaction with brackets – () {} [] – and quotes – "" '' – goes like this – you type the first one and the second one is added automatically, if you then delete the first bracket or quote using the Backspace key, the second one is also deleted. When you finished entering the content, you type the right bracket or quote and the editor doesn’t add another one but just steps over the existing one.

The same we can say about PowerShell console.

Continue reading

Saving a PowerShell command for later use

Let’s suppose the following. You are working with PowerShell console and just finished typing a long and complex command. This second it occurs to you, that you forgot to define a variable, create a remote session or something else. You delete the command, execute some required actions, and type the command again.

Sounds familiar?

In this article we will talk about some techniques, that can help us out.

Continue reading