Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can I set Powershell as the default shell of Far Manager?

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

With PowerShellFar in Far Manager you can invoke PowerShell commands right from the command line with the prefix ps:. That is:

Commands with console output, prefix ps:

    ps: Get-Date
    ps: 3.14 / 3
    ps: [math]::pi / 3

Commands with viewer output, prefix vps:

    vps: Get-Process
    vps: Get-ChildItem C:\TEMP\LargeFolder -Recurse -Force

Commands starting UI or background jobs normally use prefix ps:

    ps: $Far.Msg("Hello world!")
    ps: Get-Process | Out-FarList -Text Name | Open-FarPanel
    ps: Start-FarJob { Remove-Item C:\TEMP\LargeFolder -Recurse -Force }

If you expect lengthy output consider to start Far Manager as Far.exe /w.

Finally see built-in PowerShellFar help, sections Command line and FAQ. You can define some accelerators. For example I use [Space] which inserts ps: into the empty command line. Thus, actually I have to type just 1 more symbol. This is a little bit inconvenient but it is perfectly compensated by the standard CMD shell at hands, CMD is not dead, especially in Far Manager.


UPDATE

PowerShellFar v5.0.60 introduces the "Command console" mode, the genuine console with the prompt implemented as one line input box with Far history completion, PowerShell completion with [Tab], PowerShell help with [F1], etc. It is like the standard PowerShell console but in many ways more powerful with Far UI behind. This mode is started from the menu in panels. [Esc] in the empty line exits back to panels.

share|improve this answer
    
hi @RomanKuzmin, i try to set the accelerators as is explained in the help but when i write ">: Set-FarMacro Shell Space '> : Space' 'Easy prefix' -CommandLine 0" it trows that Set-FarMacro isn't found. When i execute >: gcm far i see all the far cmdlet but Set-FarMacro is missing. What i'm doing wrong? –  mjsr Apr 15 '11 at 22:13
    
You should at first invoke Import-Module FarMacro (or F11 \ PSF \ Modules \ FarMacro). I should have mentioned this in help (will do, thanks). –  Roman Kuzmin Apr 16 '11 at 1:45
    
Thanks Roman that was the missing step, :). I have only two more thing that bothers me about Farmanager but i'm going to search where to ask that, maybe you could give some light...(after working with it, if i return to the console the actual character mark dissapear and the insert mode is on (overwrite mode), and what is more incredible is that if i press insert to deactivate the insert mode, after entering a line, the insert mode appears again) –  mjsr Apr 16 '11 at 15:27
add comment

PowerShellFar allows you to integrate PowerShell into Far Manager.

PowerShellFar combines the rich console based user interface of Far Manager with full power of Windows PowerShell perfectly integrated into this original text friendly environment.

share|improve this answer
    
yea i know but how the default shell could work with powershell. That extensions allows me to execute powershell commands trough the menu f11..powershellfar..invoke.... i want to execute posh without doing all of that, if you look in the bottom of powershell far there is a command line, but for default works with cmd, :( i wanna change that –  mjsr Apr 4 '11 at 13:49
    
Its simply not possible. –  Justin Dearing Apr 4 '11 at 20:21
add comment

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.