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)

= 2.2.16 =

*) Tree panels (e.g. Folder tree): available view modes are:
[Ctrl0] - view mode: tree and description columns (start mode).
[Ctrl1] - view mode: tree column and description status.
Note: any FarNet panel can switch full screen mode by FarNet menu command.
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.17 =

*) Added section PROBLEMS AND SOLUTIONS to the Readme.txt; discribed a rare
problem of loading PowerShell core in x86 Far on x64 machines and a possible
workaround. The PSF error message points to this section as well.

*) TabExpansion: added expansion of process names for a few *-Process cmdlets.
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.18 =

CHRISTMAS-BOX FEATURE: AUTOMATED UPDATE

This version is mostly designed for easy updates of PowerShellFar + FarNet +
API help by a script. Not standard plugin locations and folder names are not
supported. If you want to update everything easily then read both Readme.txt
and ensure your locations and names are standard:

STANDARD ITEMS IN %FARHOME%:
FOLDERS
-- Lib
-- Plugins\FarNet
-- Plugins.NET\PowerShellFar
FILES
-- Far.exe.config
-- Plugins.NET\PowerShellFar.chm

RELATED CHANGES AND NOTES

*) Version numbers: as far as FarNet and PowerShellFar are always built and
released together, from now on their version numbers will be the same.

*) Archive changes: plugin files are now in "Plugins.NET\PowerShellFar", so
that you should copy this folder to "%FARHOME%\Plugins.NET\PowerShellFar". The
location and name can be changed but it is recommended to use exactly this way.

*) New script Update-PowerShellFar.ps1: updates PowerShellFar + FarNet + API
help from the site or already downloaded archives. Keep the last downloaded
archives, then the script can be used simply to check for updates, it does
nothing if files already exist. See the script for details.

*) If you want other distributed files and folders to be updatable as well then
create and use an extra script which calls Update-PowerShellFar.ps1 and then
extracts extra files to your personal locations. Update-PowerShellFar.ps1
returns actual version number that may be used to find out archive 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.19 =

CHRISTMAS-BOX FEATURE: AUTOMATED UPDATE (modified and hopefully improved)

*) Archive structure: LICENSE, History.txt, Bench, Extras moved to the plugin
folder "Plugins.NET\PowerShellFar".

*) Folders Bench (scripts and demos) and Extras (for Colorer) are extracted to
the plugin folder "Plugins.NET\PowerShellFar". It is decided that for a calling
script it is easier to delete\move something after update than to extract extra
items from downloaded archives.

*) Script Update-PowerShellFar.ps1:
-- It does not return version number anymore: with new approach it is useless.
Output of the script should be ignored.
-- If -FARHOME is UNC then that machine has to be configured for PS remoting.
This allows to update remote machines safely (i.e. waiting for Far exit if it
is running 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)

= 4.2.20 =

*) List panels (MemberPanel, PropertyPanel): [ShiftDel], [ShiftF8] assign null
to selected properties (kind of "delete values"). It was not easy to enter
nulls. To delete dynamic properties, as usual, use [Del], [F8].

*) Object panel: in case of unknown objects it finds (euristically) a name of a
property for display, it tries: Name, Id, Key, *Key, *Name, *Id.

*) Export-Clixml dialog (called on [CtrlS] in some PSF panels): the default
encoding is Unicode, the same as in Export-Clixml cmdlet. BTW: PS help says the
default is UTF8 but it looks like a mistake.

*) PSF prompt dialog: enabled autocomplete from history because in latest Far
it works more or less as expected (defects will be hopefully fixed soon).

*) Update-FarManager.ps1 and Update-PowerShellFar.ps1 do not use a temp file
for version requests, they download needed text directly.

*) Invoke-Shortcut-.ps1: new switch -Panel: to view\edit shortcut properties in a
panel. If you change data it asks you to save changes on exit or you can use
[CtrlS] to save data at any moment.

*) Tweaks in scripts and help.

==

HAPPY NEW YEAR!
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.21 =

*) FarNet: IPluginPanel: property DataComparison (class Comparison<object>) is
replaced with easier to use and more natural property DataId (delegate Getter).
PSF: DataComparison is replaced with DataId (scripts Panel-BitsTransfer-.ps1,
Panel-Process-.ps1, cmdlet Start-FarPanel).

*) [PowerShellFar.UserPanel]: method SetGetData() is replaced with two new:
-- SetGetFiles() - basically it is exactly the same as the old SetGetData(); it
is renamed to make it clear that scripts operate on panel files directly. The
script Panel-Process-.ps1 still uses this way (mostly for demo).
-- SetGetObjects() - this new method provides more natural way of getting data
for panels: scripts simply return objects to be shown. See Panel-Job-.ps1,
Panel-BitsTransfer-.ps1.

*) New script Panel-Job-.ps1: Operates on PowerShell background jobs in a panel
and updates these data periodically when idle. See comments for details.

*) Removed script Panel-Shortcut-.ps1: Its functionality is now covered and
extended by Invoke-Shortcut-.ps1 with the -Panel switch.

Reminder for those who uses Update-PowerShellFar.ps1: read History.txt on
updates, mind removed and renamed files: for example on this update you may
want to remove Panel-Shortcut-.ps1 manually.
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.22 =

*) Cmdlet Find-FarFile: new parameters -Where and -Up: allow to go to the next
(down\up) panel file which matches the specified -Where boolean scriptblock.
See also new script Select-FarFile-.ps1.

*) New script Select-FarFile-.ps1: Selects active or passive panel files by the
specified scriptblock filter. See also Find-FarFile cmdlet with new parameters
-Where and -Up.

*) New script Menu-Favorites-.ps1: Shows Windows Favorites as a menu and
invokes items. -Flat mode may be useful with [CtrlAltF] menu filter.

*) Profile-.ps1: added call of Menu-Favorites-.ps1 to the PSF main menu.

*) New script Test-Panel-Job-.ps1 to play with Panel-Job-.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)

= 4.2.23 =
= 4.2.24 =

*** Far 2.0.1311+ ***

*) Win7 taskbar icon: PowerShellFar uses new FarNet methods SetProgressState()
and SetProgressValue():
-- Running commands and scripts normally show their activity during execution
(at least Indeterminate icon state).
-- Internal WriteProgress() calls SetProgressValue() to display percentage.
As a result, the cmdlet Write-Progress updates the icon. NOTE: after use call
Write-Progress -Completed: you are responsible for cleaning the icon.
-- Finished PSF background jobs show green\red state depending on their state.
So that if there are finished jobs you are notified via the icon in addition
to the console title.

*) Menu-Favorites-.ps1: [Space]: It works as [Enter] but the menu is not closed
after opening a file.

*) PowerShell.hrc: + new V2 number suffixes: TB and PB (tera\peta bytes).
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.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.
Post Reply

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