Page 6 of 20

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Thu 12 Mar, 2009 13:50
by NightRoman

Latest post of the previous page:
(+ latest FarNet and documentation)

= 2.0.6 =

*) New UI debugger tools, mostly dealing with various breakpoints. See the new
plugin menu item "9. Debugger...", select it and press [F1] for more details.
You can now add, view, enable, disable and remove breakpoints of 3 types: line,
command and variable. Each breakpoint can be either standard (breakes into the
debugger) or with action (triggers a piece of your code).

*) Removed the helper script Set-Breakpoint-.ps1 because its functionality is
completely covered by new built-in breakpoint tools.

*) Download-FarUpdate.ps1
- it can now download x64 builds, too
- adapted to new download list format

*) PowerShellFar.DataPanel - normally you have to set Factory property even if
you use known Odbc, OleDb or SqlClient database factory. Using a factory the
DataPanel is now able to work with any database provider.

*) Fixed a few issues with table names in Panel-DbData-.ps1, Panel-DbTable-.ps1

*) Start-MSBuild-.ps1 uses Microsoft.NET\Framework\v3.5\MSBuild.exe if found.
It allows to build *.*proj and *.sln files from VS 2008.

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Tue 17 Mar, 2009 11:40
by NightRoman
(+ latest FarNet and documentation)

= 2.0.7 =

*) Design. FarNet entry point was completely detached from $Psf as the new
class Entry. It is public but it cannot be created or accessed from scripts.
This approach protects against accidental mistakes. $Psf (Actor instance)
exposes only PowerShellFar tools now. $Far still exposes IFar instance. This
change is not breaking if scripts do not use $Psf.Far; if they do then simply
replace $Psf.Far with $Far there.

*) Fix. Message box about errors in startup code (e.g. Profile-.ps1) was not
shown due to a CTP3 breaking change that was not yet found.

*) Fix. Debugger menu. Editor for line breakpoints (F4) was opened at the line
after required.

*) Fix. DataPanel. Unwanted switching to slow full table formatting mode on
exit from a child record data panel when MaxFormattedRows limit is exceeded.

*) Fix. Panel-DbTable-.ps1. Table with spaces in name could not be opened for
some database providers.

*) New. Event PowerShellFar.Actor.Exiting is invoked on Far exit (normally) or
on the plugin unloading (abnormally). You can add one or more handlers for some
shutdown tasks.

*) Removed method $Psf.Prompt(); it was TEST ONLY.

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Sun 22 Mar, 2009 15:41
by NightRoman
(+ FarNet and API documentation)

= 2.0.8 =

*) Search-Regex-.ps1
- uses new FarNet panel Escaping event for an exit confirmation dialog;
- exit confirmation: new button 'Push' pushes the panel for later use.

*) Test-Panel-.ps1 - some more tutorial code including demo of new FarNet panel
Escaping event.

*) Minor fixes in tests.

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Sun 29 Mar, 2009 17:10
by NightRoman
(+ FarNet and API documentation)

= 2.0.9 =

This version is all about "super-macros". It is not a new concept but it is
improved and made easier for practical tasks, unit testing in the first place.

*) Revision of [PowerShellFar.Stepper]. It still works with step sequences as
usual, but in addition it supports so called step units. Step unit is usually a
script that returns steps to be processed immediately after invocation. Several
units can be posted into the unit queue. See API help and samples below.
- Stepper is not exposed as $args[0] to steps, use $Psf.Stepper instead;
- Stepper.Data is removed because it is useless in multi-unit scenario; use
global variables, better with the same prefix, remove them in the last step.

*) Test-Stepper-.ps1 was completely remade. Now it shows how to invoke several
step units. Basically it is an example of a simple test monitor. This technique
is used for internal testing of FarNet and PowerShellFar. Two test examples are
included (see *+.ps1 files), because they are interesting themselves as demos.
Many other tests are technical and boring, they are not published.

*) Introduced new recommended suffix '+' for step unit scripts. See help topic
'Suffixes', it tells how to associate a command to such files.

*) New script (step unit) Test-Stepper+.ps1 contains steps that originally were
in Test-Stepper-.ps1. Plus some new minor changes. How to see its work: run
Test-Stepper-.ps1 which first of all plays Test-Stepper+.ps1 steps.

*) New script (step unit) Test-Dialog+.ps1 - steps for testing Test-Dialog-.ps1
dialog. How to see its work: run Test-Dialog-.ps1, push the button [Test] there
and watch the steps one by one.

*) Test-All-.ps1 (assorted tests) is removed because it is rather obsolete and
messy with new testing tools. Its test cases are covered by tests internally.

*) Clear-Session.ps1 - added more PS variables that should not be removed:
$this, $StackTrace, $LASTEXITCODE.

*) Generate-Dialog-.ps1 - output: a) $env:USERPROFILE\GeneratedDialog-.ps1
instead of C:\TEMP\Dialog-.ps1; b) Unicode instead of ASCII.

*) Read-Host uses for history SavedDialogHistory\PowerShellFarPrompt key,
not its subkeys; you may remove not used subkeys, if any, by this command:
>: ri HKCU:\Software\Far2\SavedDialogHistory\PowerShellFarPrompt\* -Confirm

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Thu 02 Apr, 2009 18:25
by NightRoman
(+ FarNet and API documentation)

= 2.0.10 =

*) New scripts Export-FarSettings.ps1 and Import-FarSettings.ps1 allow to
export and import only those Far Manager settings that normally should be the
same for any machine of the same user. Many other settings like history data
normally should not be exported/imported. The key Users (if any) is also not
exported for a few reasons.
WARNING: this approach is very useful and works perfectly for the author for
more than a year and many machines. But please, do test it, at least make and
keep for a while a full copy of your HKCU:\Software\Far2

*) Edit-Descript-.ps1 - when description is opened in the editor its text is
selected now. It looks like a common scenario when description is copied and
pasted, not actually edited. Pre-selected text makes this a bit easier.

*) Profile-Editor-.ps1 - adapted to recent mouse changes in Far:
- Fixed unwanted selection of a single char by left click.
- Fixed dynamic text selection by dragging with left button.
- As far as mouse double click in editor is now processed by Far itself, there
is no need to do this in PSF. Removed.

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Mon 06 Apr, 2009 10:46
by NightRoman
(+ FarNet and API documentation)

= 2.0.11 =

*) [PowerShellFar.TreePanel] starts in [Ctrl0] view mode and supports [Ctrl1]
mode - full screen. Quick search Alt+[Letter] should work now as usual, '+' and
'-' in tree node names are 'ignored'.

*) Test-Panel-.ps1 shows how to use new FarNet PanelModeInfo and
IPluginPanelInfo.Modes to describe plugin panel view modes (column types,
widths, titles, status line and etc.).

*) Profile-Editor-.ps1 - avoided global handler functions, removed obsolete
features, other refactoring. Note: selection by Click + ShiftClick on some
machines works only for second ShiftClick at the same position, for unknown

*) Generate-Dialog-.ps1: 1) added parameter OutputPath; 2) when dialog code is
generated then the output file is opened in the editor; 3) width and height are
used for generated CreateDialog(), not coordinates.

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Sun 12 Apr, 2009 12:52
by NightRoman
(+ FarNet and API documentation)

= 2.0.12 =

*) New class PowerShellFar.FolderTree - replacement of ProviderTree which was
rather experimental. Menu: F11 > PSF > Power Panel > Folder tree. It works for
all "navigation" providers: FileSystem, Registry, Feeds, Certificate and etc.
(depends on installed PS snap-ins). In brief: it shows expandable folder tree
of directories, registry keys, etc. See more in .hlf: "Folder Tree".

*) List panels member panel (object properties, [CtrlPgDn]) and property panel
(provider item properties, [CtrlA], [ShiftEnter]) start in 'Descriptions' mode
[Ctrl6] with two equal width columns Name and Value.

*) Table panels and tree panels use custom 'Descriptions' mode, so that it does
not depend now on Far view mode settings.

*) Fix. PSF debugger dialog - shown in the debugger source code lines was read
with incorrect encoding.

*) Fix. Profile-Editor-.ps1 - editor text selection by Click + ShiftClick did
not work sometimes.

*) Show-History-.ps1 - folder history depends on the active panel type:
standard Far file panel ~ file system directories; plugin panel ~ plugin paths.

*) Test-Panel-.ps1 - adapted to FarNet changes (SetMode()). Shows how to use
new method Clone() for creation of a mode similar to another one.

*) Refactoring: replaced some code originally designed for PS V1 with newer. As
a result, removed some code from the internal startup script PowerShellFar.ps1.

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Mon 27 Apr, 2009 11:55
by NightRoman
(+ FarNet and API documentation)

= 2.0.13 =

*) New cmdlet Trace-Far - for tracing tasks. It is a helper for .NET class
Trace methods. "Test-Stepper-.ps1" and "Test-Stepper+.ps1" show how to use it.
Tracing output normally depends on configuration "Far.exe.config", it can be
sent to a debugger (default listener), a file ("c:\Far.exe.trace.log") and etc.

*) Documentation of PSF cmdlets moved from .hlf to .chm - it is more useful for
many reasons. See classes *Command in PowerShellFar.Commands namespace.

*) Search-Regex-.ps1 uses custom modes Descriptions and LongDescriptions
independent on Far panel modes.

*) Export-FarSettings.ps1 - S_And_R history values are exluded from export.

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Mon 18 May, 2009 11:39
by NightRoman
(+ FarNet and API documentation)

= 2.1.0 =

*) Breaking changes in FarNet 4.1.0 in almost 100% cases should not affect
scripts. Nevertheless: a) if you use the name IFile directly, replace it with
FarFile or SetFile; b) $Far.CreatePanelItem() will be removed soon, replace it
with New-Object FarNet.FarFile or, even better, with New-FarFile.

*) Concept of TreePanel and related features is almost completely reworked with
use of new FarNet capabilities. Everything works fine and it seems that tree
panels will be supported, but implementation is still in progress.

*) PowerShellFar.AnyPanel.Items is renamed into ShownItems to avoid confusion
and to follow FarNet <-> PSF names correspondence. That is, ShownItems are
derived from ShownFiles, SelectedItems are derived from SelectedFiles,
CurrentItem is derived from CurrentFile.

*) Show-History-.ps1 - when a panel is a plugin panel, it shows all paths from
history, not only plugin paths.

*) Download-FarUpdate.ps1 - parameter 'Platform' default value depends on the
current process. So that if you run it from x86/x64 Far and want to download
x86/x64 version (i.e. the same), then you do not have to use this parameter.

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Sun 31 May, 2009 17:36
by NightRoman
(+ FarNet and API documentation)

= 2.1.1 =

*) As it was announced, methods $Far.CreatePanelItem() were removed from
FarNet. Scripts should create instances of SetFile directly by New-Object or

*) Far updates. Due to recent Far changes scripts "Download-FarUpdate.ps1",
"Install-FarUpdate.ps1" are replaced with one script "Update-FarManager.ps1".
ONLY Far 2.x is supported, both x86 and x64. See comments for details.

*) Minor improvements in TabExpansion.

*) Minor changes in "Export-FarSettings.ps1" and "Import-FarSettings.ps1".

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Sat 06 Jun, 2009 14:50
by NightRoman
(+ FarNet and API documentation)

= 2.1.2 =

*) Update-FarManager.ps1
- Checks for new archives only, exits if none.
- Asks to exit Far only when it starts extraction.
- Searches for extra items in top home directories, too.
- New parameter - switch Stable - to get only stable builds.

*) New script Format-Chart.ps1. Formats output as a table with the last chart
column. This script should work for any host, e.g. in PS console, too. Example:
just run Test-Watch-Output-.ps1 - it shows chart of process working sets (but
you can make charts of anything you want, of course). Note: Format-Chart.ps1
has to be in the system path for this demo.

*) New script Go-Link-.ps1 opens a file in editor by a text link in the current
line. Recognised text link types: Visual Studio, PowerShell. To be continued.

*) $Psf.HotText - for practical reasons it is changed. It is now the selected
text or the current line text in the current editor or an edit line. (get|set)

*) Minor tweaks in others scripts.

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Mon 08 Jun, 2009 09:26
by NightRoman
(+ FarNet and API documentation)

= 2.1.3 =

*) Fixed the "Power panel" call from the disk menu (FarNet fix).

*) Update-FarManager.ps1 - with -Stable switch URL was not correct.

*) Watch-Output-.ps1
Avoided use of a global function. New parameter Seconds specifies update
frequency, default: 1.0 second (it was too frequent before). Details: it uses
new FarNet feature [FarNet.IdledHandler], it is an example in the editor.

*) Test-Panel-Tree-.ps1, Test-Watch-Output-.ps1 - minor tweaks and fixes.

*) Test-Dialog-.ps1 uses new FarNet feature [FarNet.IdledHandler]: time in the
console title is updated every 2 seconds, it is an example in the dialog.

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Mon 15 Jun, 2009 14:02
by NightRoman
(+ FarNet and API documentation)

= 2.1.4 =

*) New-FarFile cmdlet supports custom columns by the parameter -Columns (see
FarFile.Columns, SetFile.Columns).

*) Test-Panel-.ps1 shows how to use just implemented in FarNet custom panel
columns (use [Ctrl0] mode in this demo).

*) Edit-Link-.ps1 is the renamed Go-Link-.ps1. New: it also recognizes some
full and relative file system paths and opens that files, paths with spaces
should be quoted. To be continued.

P.S. TablePanel and derived DataPanel, ItemPanel, ObjectPanel, UserPanel do not
use yet custom panel columns. To be continued.

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Tue 16 Jun, 2009 10:15
by NightRoman
(+ FarNet and API documentation)

= 2.1.5 =

Updated for Far 2.0.997 (breaking changes in Far Editor and Window API)

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Wed 24 Jun, 2009 13:55
by NightRoman
(+ FarNet and API documentation)

= 2.1.6 =

*) Scripts Indent-Selection-.ps1, Reformat-Selection-.ps1,
Reindent-Selection-.ps1 now use BeginUndo\EndUndo to make operations atomic.

*) Script Watch-Output-.ps1 was kind of "memory leaking" because of growing
undo data, though undo is not actually needed. Far 2.0.1010 provides some
workarounds. Unfortunately it is not yet possible to turn Undo off.

Re: PowerShellFar - Windows PowerShell host for Far Manager

Posted: Sun 12 Jul, 2009 17:21
by NightRoman
(+ 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.