Friday, December 28, 2007

To QuickEdit or not? that's the question

 

In QuickEdit mode, users can cut and paste text, to and from the command shell by using the mouse. There are three ways to change this behavior:

1. Enable/Disable it from the console properties and choose whether to change the behavior for the current window only or to modify the shortcut that started the window (shell).

 

CONSOLE1 copy

 

Clipboard01

 

2. Modify the shortcut that launched the shell.

Clipboard01

If you modify the PowerShell shortcut it will create a new registry key for the PowerShell console.

regedit

 

3. Directly edit the relevant registry values.

 

QuickEdit is a two blade knife. Although it makes your life easier by letting you copy/paste text from/to the console, you can encounter strange behavior situations when you find that you need to press ENETR over and over again to 'wake up the console'.

 

Here's a sample scenario to describe the 'gotcha' when QuickEdit is enabled:

1. Enable QuickEdit
2. Run in PowerShell: 1..100 | foreach  { $_; start-sleep 1 }
3. Let the command loop run once or twice then click with your mouse inside the console window.



CONSOLE3 copy


4. Notice that the command/script pauses when you click in the Powershell console window, the console title also indicates it by preceding the title text with the "Select" word, meaning you're in Quick Edit mode. To make the command run to end you need to press the ENTER key.

I'm sure you don't want this kind of behavior when you run a heavy task script, go to lunch and find out that you accidentally pressed the mouse inside the console window before walking out the office. Sometimes it is hard to spot it if your command/script doesn't write to the console.

 

So, Enable or disable it? That's for you to decide, just be aware of the consequences.

2 comments:

Anonymous said...

Rather than having to press the ENTER key, just right-click in the Console window to stop the Quick Edit.

Anonymous said...

Quickedit, Can't PoSH without it.

so a vote here !

Greetings /\/\o\/\/

PS. My favorive is double-click a word and than "double-rightclick"

great to fill propertylists for the select or format-* cmdlets