http://code.google.com/p/farnet/
(+ FarNet and API documentation)
= 2.2.4 =
EDITOR CONSOLES WITH NEW LOCAL OR REMOTE ASYNCHRONOUS SESSIONS
#Enter# (As usual)
Opens a new or selected existing console file in the default global PowerShell
session. Commands are invoked synchronously in the default global runspace. All
consoles opened by [Enter] share the same workspace.
#ShiftEnter# (New!)
Opens a new or selected existing console file in a new local PowerShell
session. Commands are invoked asynchronously in a private runspace.
#CtrlEnter# (New!)
Opens a new or selected existing console file in a new remote PowerShell
session. Commands are invoked asynchronously in a private remote runspace. You
are prompted to enter a computer name and a user domain\name. If a user name is
specified then a password is also requested.
MAIN ASYNCHRONOUS CONSOLE FEATURES
An async console opens a separate runspace with its private session state:
provider locations, variables, aliases, and many other settings.
Commands are invoked asyncronously in background threads, so that console
editors and Far itself are not blocked: you can switch to panels or other
editors while a command is running. Moreover, you can open several async
consoles, invoke parallel commands and still continue other work in Far.
Limitations: objects $Far and $Psf are not exposed; cmdlets *-Far* are exposed
but in fact you must not use them unless it is explicitly allowed; PowerShell
UI should be avoided (Read-Host, Write-Progress, confirmations).
EXAMPLE
You can play for example with these "slow" commands with some output:
1..1000 | %{ $_; Start-Sleep 1 }
Get-ChildItem c:\ -Recurse | %{ $_; Start-Sleep 1 }
Open a few async editor consoles (by [ShiftEnter]), run a command, switch
between console editors and panels: you should see work of all commands in
progress and Far is still available for other tasks. [CtrlC] in a console
breaks the running command or you may simply exit the editor as usual, the
command will be stopped internally.
OTHER CHANGES
*) Cmdlet Get-Credential works now due to implemented required host methods.
Internally this is used for getting a password on opening a remote console.