Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

The powershell console has line editing capabilities described here:

http://technet.microsoft.com/en-us/magazine/ff678293.aspx

I'm really used to using bash in a Linux environment. Is there a way to map the control-a to the Home key? If so I could map some of the most-used bash editing commands to the powershell console.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

it's possible to create a powershell host that uses bash or pretty much any way you want How To: Host the PowerShell Runtime. However I don;t think anyones done so for a number of reasons, most noteably is that developement of a powershell script is a little more iterative than with text based scritpting, meaning that the most common command used is up arrow, to bring back the last line, and much less inline editing. Additionally the command used in bash are already mapped in the windows OS (eg even though powershell doesn't recongnize ctrl-a at all ctrl-a is used in most windows apps as select all and it does select all in the integrated scripting editor).

There is no way to change the behaviour of the built in scripting environment

share|improve this answer

I'm working on a drop-in readline replacement for powershell 3.0 that will allow you to customize your key bindings and editing experience for the console mode shell (including ctrl+r inline reverse history search, a la gnu readline/bash). Unfortunately this is not going to work with Powershell 2.0 or 1.0. Keep an eye on my blog (see my profile.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.