PowerShellFar — Windows PowerShell host for Far Manager

Анонсы новых плагинов. Обсуждение плагинов ведется ниже.
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)

= 4.2.25 =

*) Test-Panel-.ps1: IPluginPanel event MakingDrectory is fixed in FarNet and
the test now shows how actually this event is used.
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)

= 4.2.26 =

*) ETS (Extended Type System): in addition to FarDescription property: added
code methods FarMoveTo() (files and directories) and FarCopyTo(), FarDelete()
(files only). They call .NET methods MoveTo(), CopyTo(), Delete() and move,
copy, delete the descriptions. Test-Descript-.ps1 shows how they all work.

*) New script Rename-FarFile-.ps1 uses new FarMoveTo() to rename the current
item on the file panel. New name can be defined as a string (boring, can be
done manually) or a scriptblock (handy, can be in the user menu or a script)
with $_ = the current FileInfo or DirectoryInfo, see an example there.

*) PowerShellFar UI editboxes use new FarNet IEdit.IsPath where appropriate:
"Invoke input code ~ Code", "Breakpoint ~ Script", "Export-Clixml ~ Path".

*) New script Show-KeyName-.ps1: Shows internal Far names of pressed keys.
Why? E.g. on writing macros some key names are difficult to remember.

*) Invoke-Editor-.ps1: *.*proj files are started by Start-MSBuild-.ps1.

*) Updates for FarNet 4.2.26:
-- Generate-Dialog-.ps1: Password -> IsPassword.
-- Install-Macro-.ps1, Panel-Macro-.ps1, Show-KeyMap-.ps1: updated 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)

= 4.2.27 =

*) Fixed unexpected effects with IsPath = true in some dialogs (4.2.26).

*) At last implemented [Halt command] in core "prompt for choice" dialogs:
-- Console host: [CtrlC] halts the command;
-- ISE host: [Esc] halts the command;
-- Far host: for compartibility with other hosts: [Esc] opens a dialog with
extra options: [Halt command], [Cancel]. Example: press [Esc] after this:
>: Remove-Variable Host -Confirm

*) Removed $Psf.ShowCallStack() and calls of it. Why?
1) In PS V2 there is a built-in cmdlet Get-PSCallStack.
2) $Psf.ShowCallStack() is not found very useful but may have issues.
3) It is a wrapper of a script, you can use the original script instead:
http://code.google.com/p/farnet/source/ ... gs/4.2.26/
PowerShellFar/Resources/Show-CallStack.ps1

*) Test-CallStack-.ps1: it tells how to use the built-in cmdlet Get-PSCallStack
instead of the removed $Psf.ShowCallStack().

*) Menu-Favorites-.ps1: fix: [BS] did not work in empty submenus.
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)

+ Fixed Show-KeyMap-.ps1 for PowerShellFar 4.3.0
http://farnet.googlecode.com/files/Show-KeyMap-.7z

= 4.3.0 =

NEW WAY FOR MACROS WITH EMBEDDED CODE

*) "Invoke input code" dialog is now suitable for macros with embedded code.
Namely, when a macro is in progress this action works in a special way:
-- an input box is used instead of the dialog;
-- commands are not stored in the history;
-- commands output is discarded.
Thus, now it is convenient to put some code into a macro.

Example: [F10] (exactly!) in Panels: safe exit with background jobs check:
F11 X 1 "$Far.Quit()" Enter
(X is the PowerShellFar hotkey in the plugins menu)

.. or hotkey independent version with native F10 if PSF is not installed:
F11 $If (Menu.Select("PowerShellFar", 2) > 0) Enter 1 "$Far.Quit()" Enter $Else Esc F10 $End

NEW FEATURE: SCRIPTING FAR EXIT

*) A few tips about new method $Far.Quit() in addition to above examples. Some
update, backup, restore commands waits for Far exit:
-- Update-FarManager.ps1
-- Update-PowerShellFar.ps1
-- Export-FarSettings.ps1
-- Import-FarSettings.ps1
-- ...

They all can be started from the command line or the user menu like this:
>: Start-Process powershell.exe "-noexit Update-FarManager"; $Far.Quit()
("-noexit" is to keep a new console opened, it's up to you)

POWERSHELL HELP IN EDITORS

*) Main menu: new action "&-. Help": For the current code token in an editor
line (editor, editbox, cmdline) it gets and shows in the viewer available help
information. In code editors (*.ps1, *.psm1, *.psd1, *.psfconsole, input code
boxes) this action is associated with [ShiftF1]. It is exposed for scripting as
$Psf.ShowHelp().

*) Script Get-Usage.ps1 is replaced with internal function Get-FarHelp and
removed. Keep or remove it yourself. Old version will be in here:
http://code.google.com/p/farnet/source/ ... gs/4.2.26/
PowerShellFar/Bench/Get-Usage.ps1

TWEAKS AND FIXES

*) TabExpansion.ps1: reduced conflicts with internal variable names used by
TabExpansion itself (e.g. "Line", this should work correctly: $Line.[Tab]).

*) Macros:
-- New cmdlet New-FarMacro;
-- Script Panel-Macro-.ps1: updated;
-- Script Install-Macro-.ps1: uses new cmdlet New-FarMacro.

*) PowerShellFar.hrc for Colorer: missed operator -bnot and new New-FarMacro.

*) Minor tweaks and new features in psfconsole UI.
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)

= 4.3.1 =

!! This time update manually, do not use Update-PowerShellFar.ps1 and read
about FarNet folder structure changes. In short: PSF folder now is:
%FARHOME%\FarNet\Modules\PowerShellFar

REFACTORING: PLUGINS -> MODULES AND OTHER NAME FIXES

*) See breaking name changes in FarNet History.txt; your scripts that use
changed names should be updated. In PSF, in addition:
-- Show-FarMsg -> Show-FarMessage
-- Removed script Debug-Msg-.ps1. In fact, it was not very useful since the
debugger was implemented.

*) Removed the term "plugin" from two properties\options. Rename:
2 properties in $Psf.Settings (just in case if scripts use them) and
2 registry values of HKEY_CURRENT_USER\Software\Far2\Plugins\PowerShellFar:
-- PluginStartupCode -> StartupCode
-- PluginStartupEdit -> StartupEdit

POWERSHELL MODULES
(Yes, modules, just like in FarNet, the same approach but for PowerShell)

*) These modules are standard PowerShell modules. But they:
-- are normally designed for FarNet and used with the PSF FarHost;
-- do not use PowerShellFar directly (at least this is not recommended)

*) Default Modules directory
Directory "$($Psf.AppHome)\Modules" is added to $env:PSModulePath on loading,
so that all modules in this directory are available at runtime. As usual,
import them by Import-Module. In UI there is also the "Modules+" menu.

NEW MODULE FARMACRO
(Actually the first for the FarHost)

Cmdlet New-FarMacro moved there from the PSF core (it's good to keep some not
frequently used tools like this in modules: they are loaded only when needed).
Switch -Install is removed, instead a new cmdlet is added: Set-FarMacro.

New provider FarMacro with its default drive FarMacro:\. Provider panels work
for FarMacro automatically: edit, copy, move, rename, create, remove, and etc.

NOTE: The script Panel-Macro-.ps1 is not yet upgraded, it still works directly
with "old" Registry provider, not yet with "modern" FarMacro. To be continued.

For more details:
>: Import-Module FarMacro; man about_FarMacro

NEW MODULE FARDESCRIPTION
(Actually works for any host)

Though it is designed for Far it does not depend on Far or FarNet, it works in
any PS host (i.e. you can work on descriptions using standard Console and ISE
hosts or any others). But it uses Far description settings from the registry:
HKEY_CURRENT_USER\Software\Far2\Descriptions

All the code dealing with descriptions, including the Update-FarDescription
cmdlet, moved to this module.

For more details:
>: Import-Module FarDescription; man about_FarDescription

OTHER CHANGES

*) Menu action "Help" did not work in the cmdline with PSF prefixes. Fixed.

*) Provider panels: improvements for "unknown" not configured providers.

*) Show-KeyMap-.ps1: updated for FarNet 4.3.0 changes; added the dialog key
map; added more special keys; added area names to key names.

*) Reformat-Selection-.ps1: added detection of comments for some known file
types of PowerShell, Perl, Python, Ruby, PHP, SQL, Lua, Cmd, Basic.
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)

= 4.3.2 =

TABLE PANELS: TRUE COLUMNS AND PS FORMATS

All table panels show data in true columns now. Pseudo-columns of Format-Table
are not used. Columns are defined: 1) manually by property Columns; 2) auto by
object types and related PS formats (TableControl); 3) auto by properties for
mono type object sets; 4) three column mode for mixed type object sets: index,
value, and type.

PS TableControl formats are now found heuristically by object types in the
Get-FormatData list. Next versions will allow to specify formats manually.

Option AutoSize is not used now but it is kept for the future. Built-in PS
formats are good only if panel width is about 80, like default console (Far
width is about 164 with two such panels). Next versions will be able to fix
formats for too narrow panels dynamically.

*) Removed obsolete properties and parameters FarName, ExcludeColumns from
panel classes, cmdlets and all scripts. Only Columns or PS formats are used.

*) New option $Psf.Settings.MaximumPanelColumnCount (3-13, default is 8).

*) UserPanel: two methods SetGet*() are replaced with one SetGetData().

OTHER CHANGES

*) Provider panels (ItemPanel, FolderTree) are now more robust on internal PS
core failures. They ignore faulty items and still return other items.

*) Object panels on [F7] prompt a user to enter a command that gets new panel
objects. Old action was actually almost useless (add an empty PSCustomObject).

*) Object panels do not prompt on [Esc] any more. [Esc] closes panels.

*) Removed cmdlets New-FarObjectPanel and New-FarUserPanel because they do not
add any value to New-Object PowerShellFar.ObjectPanel, PowerShellFar.UserPanel

*) Start-FarPanel cmdlet: renamed confusing parameter OrderBy to SortMode and
View to ViewMode. Added these parameters to Out-FarPanel, too.

*) Renamed $Psf.Settings.MaxHistoryCount -> MaximumHistoryCount.

*) Fixed Rename-FarFile-.ps1: Added import of the FarDescription module.

*) Removed Set-SynopsisDescription-.ps1 because it does not depend on Far.
Instead, use a new function Update-FarDescriptionSynopsis exported by the
FarDescription module (see its definition in FarDescription.psm1).
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)

= 4.3.3 =

*) "PowerShellFar" item was removed from the disk menu for 3 reasons:
1) It looks like many users are not happy due to extra items in disks;
2) This menu has some known peculiarities for opening panels;
3) This item can be added for example from the profile script:
$null = $Far.RegisterTool($null, "PSF panel", { $Psf.ShowPanel() }, "Disk")

*) Table panels: added simple procedures that "fix" built-in PS table formats
for narrow panels, at least to make more columns visible. Right aligned data
may look funny. Tip: use wider panels (80+) or set Columns by a script.

*) FarNet: FarColumn, SetColumn: Width type changed from 'string' to 'int'.
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)

= 4.3.4 =

*) Panel Columns: new attribute Alignment: Alignment='Right' can be used
together with positive column widths.

*) Table panels: better adjustment of built-in table formats for narrow panels.
For now we just drop preset widths and ignore alignments. Right aligned data
are not funny any more after that, they are just shown as they are.

*) Panel-Macro-.ps1: [F4] or "Panel-Macro- <key> <area>" (edit macro sequence
in the editor): on exit from the editor IMacro.Check() is called to check the
sequence, show errors and prompt to continue or discard. This is better than
nothing. To be continued.
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)

= 4.3.5 =

*) Module FarMacro: New cmdlet Edit-FarMacro allows to edit macro sequences in
the editor with syntax coloring (Colorer plugin) and syntax checks on saving
($Far.Macro.Check()). See also about_FarMacro.help.txt

*) Script Panel-Macro-.ps1: it is now based on the FarModule completely. In
particular the -Editor mode is removed, use new Edit-FarMacro cmdlet instead.
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)

= 4.3.6 =

UPDATE STEPS

Remove the registry key "Far2\Plugins\FarNet" and make sure you do not start
old FarNet after that, otherwise you will get never used FarNet registry data.

The PowerShellFar registry settings moved from: "Far2\Plugins\PowerShellFar" to
"Far2\Plugins\FarNet.Modules\PowerShellFar.dll". You should reset configuration
or move the old registry properties, for example, using the registry panel.

See FarNet History.txt for changes there, some scripts may be affected.
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)

= 4.3.7 =

See FarNet History.txt for changes there, some scripts may be affected.

Registry: PSF command history moved from "SavedDialogHistory\PowerShellFarHistory"
to its module data location: "Plugins\FarNet.Modules\PowerShellFar.dll\CommandHistory"
Move\rename it using two registry provider panels (or maybe just remove the old location).

New cmdlet Assert-Far: the helper for testing and debugging. If the conditions
fail it breaks execution and prompts for choices: one is to break into the PSF
debugger (may continue), another is to open a script in the editor at the
assertion line (stops).

In fact, "Assert-Far $false" (same as "Assert-Far") is a hardcoded breakpoint.

Assert-Far with the parameter -Title is designed for production scripts:
it shows a simple message and stops in a friendly way without much noise:
Assert-Far ($Far.Window.Kind -eq 'Editor') "Run from editor!" -Title "Oops"

Debugger dialog:
-- New button [Break] stops the pipeline (throws PipelineStoppedException).
-- Replaced [Goto] with [Edit] and [Goto] buttons and fixed a [Goto] bug.

FarMacro module: added support of Consts and Vars areas. Cmdlet Edit-FarMacro
and script Panel-Macro-.ps1 also support these areas and allow to work there.
All standard Far data types are supported: text, dword, qword.

ObjectPanel: fix: when it is used as a temp panel for any objects it should be
updated on copying objects from another panel.

Panels: obsolete and not used property and parameter "AutoSize" was removed
from panels and cmdlets. There are no plans to use it in the future: default
columns are good enough for data preview.
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)

= 4.3.8 =

Improved TabExpansion of type and namespace names. Changed the global type
cache $TabExpansionCache from DataTable to Hashtable. Some of improvements:
-- more names are covered, this works now: [mi[Tab] -> [Microsoft. ...
-- A dot is added automatically to namespace names (ready for the next [Tab])

Other new TabExpansion features:
[*...[Tab] -- global search: the type cache is not used; example: [*farmac[Tab]
is expanded to type names with 'farmac'; it should always work after loading of
the FarMacro module.
[...*[Tab] -- '*' tells to update the global cache before expansion; example:
[farmac*[Tab] should always work after loading of the FarMacro module; compare:
[farmac[Tab] does not work if FarMacro is loaded after $TabExpansionCache
creation.

Export-FarSettings.ps1 and Import-FarSettings.ps1 use the file FarSettings.xml
where PSF commands are exported to and imported from. On import PSF commands
are merged with existing in the registry.

Fix: Complete-Word-.ps1 was not updated for recent FarNet changes.
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)

= 4.3.9 =

Technical build for FarNet 4.3.9.
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)

= 4.3.10 =

PanelKeyEventArgs.Preprocess was removed, see FarNet news. Affected scripts
should be updated. Updated scripts in PSF: Search-Regex-.ps1, Test-Panel-.ps1.

Test-Panel-.ps1: added demo handler of the new event KeyPressing.

The $Psf.Settings.FormatEnumerationLimit (default is $FormatEnumerationLimit)
is used for object panel columns and list panel values display. Example: invoke
this command:
>: Get-ChildItem hkcu:\ | Out-FarPanel
.. and see that only a few first items is shown in the Property column. Compare
with standard PowerShell output:
>: Get-ChildItem hkcu:\
.. results should look more or less the same (visually, of course, panel output
is not text output, it shows live objects in the panel, not dead text).

Fix: Module FarMacro: a few issues with paths with end '\'.
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)

= 4.3.11 =

DATA PREVIEW IN PANELS

Improved preview of enumerable types and some frequently used types in panels.

Simplified internal procedures of column set selection from properties. Default
column sets now may be not the same as in previous versions. Preview is preview.

Default column set selection in table panels: if there are too many properties
(more than $Psf.Settings.MaximumPanelColumnCount) then best candidates for N, Z
and O columns are moved to the left. Example:
>: Get-WmiObject Win32_PnPEntity | Out-FarPanel
.. the first columns are Name, Description, Status. Compare: in the old version
the column Name was not shown at all.

OTHER CHANGES

Copy objects from an object panel to another object panel: the target panel
should be updated automatically.
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)

= 4.3.12 =

The PSF core and several scripts were adapted to the recent FarNet refactoring
changes in editor and editor lines API. See FarNet history for details. Scripts
working with that API have to be updated, more likely.

In addition: $Psf property HotText was renamed into ActiveText (just to be more
formal and to follow ILine.ActiveText). HotLines was removed as not really used.
Post Reply

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