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.1.7 =

*) Go-Head-.ps1 uses new panel property ShownList (more effective) and works
for plugin panels, too.

*) PowerShell.hrc - constants and auto and user variables should be different
in expandable strings (e.g. in "text $true $this $user" 4 words should have
differnt colors)

*) Start-FarPnel. Parameter Id is renamed into TypeId.
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.1.8 =

*) New script Test-SubsetForm-.ps1 demonstrates new FarNet feature: ISubsetForm
used for selection of a subset of items.

*) FarName revision (breaking, but hopefully not much)
- Artificial extra property 'FarName' in objects is not used anymore. Practice
shows that this way is not natural and also expensive. Panel property 'FarName'
should be used instead, where appropriate.
- Import-Panel-.ps1: parameter -Name is renamed into -FarName, i.e. the same
name as ObjectPanel's property has.
- Cmdlet New-FarObjectPanel: added parameters -FarName and -FarDescription.
- Simplified related internal procedures.

*) Panel-DbTable-.ps1
- Fix: it did not work with PostgreSQL databases (Npgsql ADO.NET data
provider) with tables with case sensitive names.
- Internal DataRow data are removed from show => much better performance.

*) Test-Dialog-.ps1: some more tests, demos and 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.1.9 =

----- Changes for PowerShell V2 RC (Vista) and RTM (Win7) -----

*) Fixed minor issues and incompatibilities in scripts and the code. Basically
all latest versions should work now: CTP3 (XP), RC (Vista), RTM (Win7).

*) Added new script Panel-BitsTransfer-.ps1 - replacement of not working in RTM
Panel-FileTransfer-.ps1 which is still distributed while we use V2 CTP3 (XP).

----- Standard and user columns in PowerShellFar panels and scripts -----

The idea was to use standard and custom columns and to minimize internal use of
slow Format-Table for better data look and much better performance. It's done.

*) All panels are designed to start in AlternativeFull mode (0).

*) Main rule: if property Columns is set then columns are shown exactly
according to it and slow Format-Table is not used internally.

*) Removed method SetBind(). It is useless now, Columns defines binding.

*) Removed property FarDescription. Again, Columns does the job instead.

*) Removed properties FarName and ExcludeColumns from DataPanel. Other panels
still may use them if Columns is not defined.

*) Removed static property DataPanel.MaxFormattedRows because Format-Table is
not used internally any more. Performance on large tables is much better now.
Still, it would be nice to have some reasonable limits - to be continued.

*) Panel-DbData-.ps1: ditto: removed parameters FarName, FarDescription, and
ExcludeColumns.

*) Provider settings ($Psf.Providers) now also use the same approach, see the
script Profile-.ps1 for examples for the most of standard providers.

*) Object panels by default still use Format-Table internally. As far as data
are not described then let's PowerShell cares of formatting. A panel now uses
only one column to show output. No horisontal scrolling is needed. Quick search
(Alt-letter) works for a property 'Name', if any, or for a property defined by
FarName.

*) All scripts were updated according to the new panel column architechture.

----- Other changes -----

*) New static class PowerShellFar.Wrap will contain wrappers for types
difficult to create in PowerShell scripts (e.g. delegates or generics).
Example from Test-SubsetForm-.ps1:
... = [PowerShellFar.Wrap]::ConverterToString({ "Item $_" })

*) Added helper scripts for MS Access and SQL Server Compact databases:
Connect-Mdb-.ps1 and Connect-Sdf-.ps1
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.1.10 =

*) Fixed startup issues causing TabExpansion problems (reported by GMax).

*) Fixed display issues of Format-Table (used by default in table panels).
Added new property FormatPanel.AutoSize and cmdlet switch Out-FarPanel
-AutoSize: this mode is slower but often formatted data look better or
formatting is only possible in this mode.

*) Cmdlet Out-FarPanel: parameter Columns is positional (goes first), so that
we can omit its name:
>: Get-Process | Out-FarPanel Name, Company

*) PSF panels now have a help menu called on [F1]. Its commands depend on a
panel. Method AddMenuItem() was removed; called once event MenuCreated should
be used instead for adding user commands, see Test-Panel-Menu-.ps1. All this is
experimental, to be continued, changed or even removed.

*) Search-Regex-.ps1: found file paths are right aligned now.

*) PowerShellFar.chm: PowerShellFar.Commands: removed noisy inherited members.

----- Revision of Far descriptions support -----

*) For better performance and incapsulation built-in PS functions *-Descript
implemented in C# and removed from the internal profile. Descriptions are
exposed by FarDescription properties (get/set).

*) Extension properties Description of classes FileSystemInfo (FileInfo and
DirectoryInfo) are renamed into FarDescription to minimize risk of clashes
(name "Description" is too general).

*) Script Edit-Descript-.ps1 is updated to use only FarDescription properties
for all actions.

*) New cmdlet Update-FarDescription updates a description file for a directory:
removes orphan descriptions, sorts existing by file names.
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.1.11 =

*) Simplified type rules for TablePanel.Columns (and -Columns of Out-FarPanel
cmdlet). Only needed types can be specified, missed types will be used from
remaining default types automatically.

*) Improved data conversion on mapping data to panel columns (basically PS
conversion procedure is used).

*) Work around PowerShell bug(?) leading to occasional failures of FormatPanel
with ExcludeColumns for some types. Now it looks more stable. Note that use of
ExcludeColumns is not recommended anyway, use of Columns is much better.

*) Minor fixes and improvements here and there.
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.0 =

----- FarNet 4.2.0 menu items revision -----

See FarNet 4.2.0 History.txt for details. Steps to update your scripts:

*) Replace '$Far.CreateMenuItem()' with 'New-Object FarNet.FarItem' or, even
better, use cmdlet New-FarItem. Also, if you use IMenuItem name in scripts
(unlikely) then replace it with FarItem.

*) Event IMenuItem.OnClick is replaced with a single handler property Click.
You should replace 'add_OnClick({...})' with 'Click = {...}' in scripts.

*) Cmdlet New-FarItem: parameter -OnClick is renamed into -Click.

----- PowerShellFar user menu revision -----

*) Removed $Psf.UserMenu and related code everywhere. User menu items (actions)
are now added by $Psf.Action(), see API help and Profile-.ps1.

*) Removed $Psf.Settings.PluginUserCommand ("user command" or "user code"). PSF
provides enough ways to do the same without this special support. You may
delete the value Plugins\PowerShellFar\PluginUserCommand in the registry.

*) Script UserCode-.ps1 (demo for removed PluginUserCommand) is renamed into
Menu-More-.ps1 and Profile-.ps1 adds the action "More..." that calls it.

----- PowerShellFar background jobs revision -----

*) In couple of words: all jobs (included into the list or not) are started
only by the new cmdlet Start-FarJob.

*) 'Start-FarJob -Pipeline' gets a started job for direct reading (instead of
removed class Invoker). Examples: Test-Job-.ps1, Search-Regex-.ps1

*) See API help and test and demo scripts: Test-Job.ps1, Job-RemoveItem-.ps1.
Note that Robocopy-.ps1 was removed, it seems to be better to run Robocopy
for massive operations outside of Far, not as a job inside.

----- Descriptions support -----

*) New script Set-SynopsisDescription-.ps1: useful for keeping descriptions in
sync with script synopses (as it is in Bench). Read comments, use carefully.

*) Fixed Description cache issue on using both Edit-Descript-.ps1 (PSF, editor)
and [CtrlZ] (native, input box) description editors.

*) Theoretically Description code is thread safe now, so that jobs may use
FarDescription properties safely.

----- Other features/changes -----

*) Panel Columns support FormatString (just like Format-Table), e.g. this
command makes a column 'Length' with width 15 and right aligned numbers with
thousand separators (e.g. 3,230,649)
>: Get-ChildItem | Out-FarPanel Name, @{ e='Length'; f='{0,15:n0}'; w=15 }

*) New cmdlets Find-FarFile, Get-FarFile (mostly to reduce typing on testing,
but they can be used for real jobs too).

*) $Psf.Providers is now settable, see how Profile-.ps1 uses this. It seems to
be easier than it was before. Old way should work too.

*) AnyPanel: renamed event MenuCreated -> MenuCreating (more logically correct)

*) Editor console:
-- atomic undo of commands output
-- greatly improved performance of output to the editor (faster than 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.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
Post Reply

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