PowerShellFar — Windows PowerShell host for Far Manager

Анонсы новых плагинов. Обсуждение плагинов ведется ниже.
Post Reply
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

Latest post of the previous page:

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.1 =

*) $Psf.Settings.PluginStartupJobs (profile code for jobs) is removed from the
code and the configuration. It's a long story to explain; this way gives less
surprises and unexpected effects. After all, jobs or callers can run the same
code themselves. You may remove the registry value PluginStartupJobs from
Plugins\PowerShellFar.

*) Script Edit-Descript-.ps1 is renamed into Edit-FarDescription-.ps1 to follow
file system items property name - FarDescription.

*) Minor fixes and tweaks.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.2 =

----- ANNOUNCEMENT: PowerShell V2 RC (XP, Vista, ..) and V2 RTM (Win7) -----

As usual, PowerShellFar will support only the latest versions. V2 CTP3 should
still work basically fine right now, but it is recommended to upgrade: quite
soon PowerShellFar will use new PowerShell features and V2 CTP3 will not work.

*) PowerShell.hrc for Colorer is updated for V2 RC syntax changes, new and
removed cmdlets, and reserved keywords.

*) Removed script Panel-FileTransfer-.ps1 (it is only for PS V2 CTP3). Use the
recently added script Panel-BitsTransfer-.ps1.

-----

*) New script Invoke-Environment.ps1: it is somewhat similar to plugin FarCall:
it invokes a cmd shell command (a batch file) and imports its environment vars
to the calling process. It can be used not only in PowerShellFar.

*) Removed Show-Balloon.ps1: it does not look very useful for Far. It still
works fine, keep it yourself if you need it.

*) Text link scripts
-- Edit-Link-.ps1 is renamed into Edit-TextLink-.ps1, 'Link' is too general.
-- Edit-TextLink-.ps1: Improved recognition of links in the source text.
-- Edit-TextLink-.ps1: VS links with text work with nearest text search.
-- New script Get-TextLink-.ps1 gets a VS link with the line text.
-- Menu-More-.ps1 calls these scripts in the editor.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.3 =

*) Adapted to Far 2.0.1145+: Far does not set the current directory to the
active panel path (a step to long paths support). Still, remember that .NET
itself and many other external tools do not like long paths. _090929_061740

*) Menu-More-.ps1: added a few demo (but still useful) commands for panels
including "Set the current directory" which may be needed in Far 2.0.1145+.

*) ObjectPanel: formatting of trivial types: if the first object has a trivial
type (string, enum, and etc.) then trivial formatting is used for all objects
(assuming that all objects are trivial).

*) Editor consoles default code page is Unicode now (Far 2.0.1144+).

*) TabExpansion.ps1 expands start '.' or '.XYZ' in a line into help comments
.SYNOPSIS, .DESCRIPTION, .PARAMETER, and etc.

*) PowerShell.hrc for Colorer: script help comments and cosmetic changes.

*) Fix: Set-SynopsisDescription-.ps1 fails is a processed script has syntax
errors. Found interesting side effect: Get-Help also checks script syntax.

*) Out-FarPanel: added parameter -Title.

*) New scripts: Add-Path.ps1, Panel-Shortcut-.ps1, see comments.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

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.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.4.1 (small but useful patch; FarNet is not changed) =
http://farnet.googlecode.com/files/Powe ... 2.2.4.1.7z

*) Async editor consoles: fix: TabExpansion should work in the runspace of a
console, not in the default runspace, because runspace states are completely
different (location, commands, variables, and etc.).

*) Directory Panels was not included into the sources by mistake.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.5 =

*) Menu "Snap-ins..." is replaced with "Modules+..." which shows available
modules and registered snap-ins and allows to import/remove them to/from the
session. Modules are new PowerShell V2 alternative of snap-ins; modules are
basically easier to use, develop, and can be also written as scripts (*.psm1).

*) Background jobs are now almost semantically the same as PS V2 jobs. Still,
internally Far jobs are completely different and often more effective because
of simpler implementation. Cmdlet Start-FarJob and class Job are upgraded with
a few breaking changes. See API help for details and scripts Test-Job-.ps1,
Search-Regex-.ps1, and the others with Start-FarJob.

*) Test-Job-.ps1: upgraded old tests; added a few new tests to show various new
scenarious. The very first test shows how to use parallel jobs and compares
performance of 3 different scenarios:
a) invoke two tasks one by one
b) invoke same tasks as parallel Far jobs
c) invoke same tasks as parallel PowerShell jobs

*) Search-Regex-.ps1: option "Background input" was kind of broken since Far
2.0.1145. Now we set the job PS location to the current in the default session
before evaluating the input command.

*) Improved and corrected internal procedures for editing various data
(provider item content and property, object property value, and etc.).
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.6 =

*) FarNet 4.2.6 introduces a useful feature: on Close() panels normally restore
the original Far file panels state: the current and even selected items. All
PSF panels get this feature automatically, no changes are needed. Still, some
panels may be slightly updated (e.g. Search-Regex-.ps1 does not have to use
ActivePath, it just calls Close()).

*) Folder tree panel: fixed minor issues on closing, fixed incorrect current
item after [CtrlPgUp]; added processing of [Ctrl\].

*) Minor internal fixes and tweaks.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.7 =

*) From now on the plugin sources are in the SVN repository together with the
FarNet sources. Scripts are released as usual.

*) A few weeks of work with Far 2.0.1145+ show confusing effects of difference
between the current process directory and the active panel path. It is decided
to sync these paths before calling PowerShell with user commands/scripts.

*) New script Show-Image.ps1 for simple viewing of pictures. It is a standard
PowerShell script, but in Far it is easier to use: associations, user menu. It
is also an example of how to drive windows forms from PowerShell.

*) Folder tree panel: hidden file system folders are processed in a standard
Far way ([CtrlH]).

*) Job list: fix: some jobs were not removed automatically from the list.

*) Closing a panel together with parents by opening another panel: parent
panels are notified (basically for correct disposal of their resources).

*) Closing a panel together with parents by [ShiftEsc]: implemented in a right
way: parent panels are asked before closing and notified after closing.

*) Menu-More.ps1: removed the action "Sync the current directory". The same
effect you now get on any PowerShell command, even empty.

*) TabExpansion: this should work, too (e.g. in definition of a hashtable):
Name = Split-Path -l[Tab]

*) Internal: command execution engine migrated from the 'Pipeline' interface to
the modern 'PowerShell' interface introduced in PS V2.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.8 =

*** Requires Far 2.0.1181+ and FarNet 4.2.8+ ***

INVOKING USER COMMANDS AND SCRIPTS

*) Before invoking: process current directory is set to $Far.ActivePath;
provider location is usually set to $Far.ActivePath, too, but for provider
panels (ItemPanel, FolderTree) it is set to their current location paths.

*) After invoking: process current directory is restored. If it is not, please,
report as a bug. Provider location is not restored (or is it really needed?).

*) If the plugin cannot change provider location or current directory then it
shows actual current location and directory and asks how to proceed. This is
for safety: PowerShell commands can be dangerous if they are used incorrectly,
for example when current paths are not what a user expects on invoking.

OTHER CHANGES

*) Show-Image.ps1: [Enter] switches maximized / normal state.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.9 =

*) This is the first version for just released PowerShell V2 RTM. Nothing is
changed in the plugin for this; it is simply "officially tested" with V2 RTM.

*) Invoking (see 2.2.8): if the plugin cannot set location or directory and a
macro is in progress then instead of Far message boxes GUI message boxes are
used, so that a macro is safely suspended and then, depending on a choice,
stopped or resumed. GUI can be disabled in Far.exe.config but this is not
recommended.

*) Clear-Session.ps1: changed scenario of variable removal:
-- updated the hardcoded exclude name list for PS V2
-- an attribute is not a reason to keep a variable
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.10 =

*) Output of invoked console applications is not written to the console but
merged with other PS output. Thus, in most cases it is allowed now to use these
commands in editor consoles and in background jobs directly with no tricks like
"... | Out-Default". Still, as usual, applications operating on the console
directly should not be called in PSF, run them in Far or Cmd.

*) New FarNet.SetColumn (see FarNet) is used in the plugin code and in the
scripts: see Test-Panel-.ps1, Search-Regex-.ps1.

*) TabExpansion
-- Revised and updated.
-- Expands available module names right after 'Import-Module', 'ipmo',
'Remove-Module', 'rmo', and optional '-Name'. E.g.:
Import-Module b[Tab] -> BitsTransfer
-- Expands #<pattern> as command history entries (not exactly the same as in
PS because PSF history is different, e.g. #<id> is not supported).

*) Added internal function Get-History: for now it simply returns all entries
as strings. N.B.: for compatibility with PS history entries some code may use
.ToString() instead of .CommandLine: then results are the same in PS and PSF.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.11 =

*) History:
-- $Psf: .GetHistory() is replaced with .GetHistory(int count)
-- Command Get-History: added parameter -Count, default is 32.
-- Command Invoke-History: simply calls $Psf.ShowHistory().

*) TabExpansion
-- Fixed a few issues with #<pattern> (history expansion).
-- cd x[tab] expands only folder names

*) PowerShellFar.AnyPanel.ShowAsChild(<panel>): it is OK now to send null as
<panel>, even if there is no active PSF panel (why not?): in this case it is
the same as Show().
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.12 =

*) Extra error message on exceptions in the plugin user startup code (see
configuration dialog). Otherwise it was not clear enough where an error was.
Note: it is GUI, because initialization is performed in a background thread.

*) ObjectPanel (and derived) supports Edit operation [F4] for MatchInfo items:
an editor is opened at a match position and matched text is selected. What are
these MatchInfo items? They are results of Select-String, so that you can do:
>: dir | Select-String foo | Out-FarPanel
or even slightly better:
>: dir | Select-String foo | Out-FarPanel FileName, LineNumber, Line
and [F4] on items opens an editor at the found match with its text selected.

*) Removed event 'Exiting' from $Psf. In PS V2 there is a native way:
>: Register-EngineEvent -SourceIdentifier PowerShell.Exiting -Action { ... }
This way works for any workspace where Register-EngineEvent is called, so that
it can be used by background jobs (PSF and PS), async consoles (local and
remote), and etc.

*) Removed workaround $Psf.WrapEventHandler() and $Psf.WrapPanelEvent(). You
should remove them from your panel scripts. If some problems still exist now
(in PS V2) without them, please, report.

*) PowerShell.hrc, Clear-Session.ps1: added yet missed automatic variables.

*) Revised .hlf help, corrected obsolete information, added some new.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.13 =

*** Far 2.0.1209+ ***

*) Description tools (FarDescription property, Update-FarDescription cmdlet)
work according to Far 2.0.1206 (see changelog). After changing Far settings
"ANSI by default" and "Save in UTF8" you should restart Far or save settings
[ShiftF9] => PSF works with new settings.

*) Edit-FarDescription-.ps1 saves an intermediate file in Unicode, so that data
are not lost on convertion. Final description encoding depends on Far settings.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.14 =

*) Fixed external viewer bugs and temporary file issues (encoding, removal).
Hmm, bugs were there for ages and nobody found them... Just in case: external
viewer is used on [F5] = invoke scripts from editor in the current session and
on debugging to be able to see output in an outside Far window because this Far
window is used by the debugger dialog.

*) Profile-.ps1: removed custom external viewer settings. Let's external viewer
be really default by default (i.e. Far.exe /m /p /v ...).

*) Invoke-Editor-.ps1: fixed invocation of .ps1 files. FYI: this way is very
different from [F5]: a script is invoked outside of Far by PowerShell.exe, not
by the Far host. So far it is done by a script, in contrast to built-in [F5].
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: PowerShellFar - Windows PowerShell host for Far Manager

Post by NightRoman »

http://code.google.com/p/farnet/
(+ FarNet and API documentation)

= 2.2.15 =

*) List panel: improved presentation and processing of properties of PSObject
type (e.g. deserialized from .clixml properties are PSObject-s).

*) Power panel: if an object "looks like" a full path of an existing file then
[F3], [F4] allow to view, edit that file. This is by default, real actions may
depend on a panel.

*) New script Set-Console.ps1. It is the next version of this script:
http://nightroman.spaces.live.com/blog/ ... !129.entry
1) It can be called from any of these consoles: Far, PowerShell, or Cmd.
2) In Far it must be invoked by PowerShell.exe, not by the PSF host.
3) Do not use with console emulators.

*) Update-FarManager.ps1: You can remove not used .hlf and .lng files from Far
home; they will be also removed after updating from an archive.
Post Reply

Return to “Анонсы новых плагинов”