PowerShellFar — Windows PowerShell host for Far Manager

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

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Mon 30 Dec, 2013 19:24

Latest post of the previous page:

THE PACKAGE MOVED TO NUGET
https://www.nuget.org/packages/FarNet.PowerShellFar

See HOW TO GET AND INSTALL

= 5.0.57 =

Update-FarPackage.ps1

New script Update-FarPackage.ps1 replaces Update-FarNet.ps1. The new script
installs or updates any NuGet package with special structure for Far Manager.
For now there are two packages "FarNet" and "FarNet.PowerShellFar". Other
FarNet modules will move to NuGet soon.

The script needs only PowerShell. It downloads packages by System.Net.WebClient
and unzips them by COM Shell.Application.

NOTE: Other authors can push their packages designed for Far to NuGet and use
this script for updates. This will work for native plugins, too. NuGet is for
.NET libraries in first place but packages can be created from any files, not
necessarily .NET related.

OTHER CHANGES

Removed the helper PowerShellFar.Wrap with methods ConverterToString and
Comparison. The first was needed for SubsetForm.ItemToString (not needed
anymore, script blocks can be used directly, see Test-SubsetForm-.ps1).
The second is not used, presumably.

Amended documentation comments for FarNetAPI.chm

RENAMED:
- Test-Dialog+.ps1 -> Test-Dialog!.ps1
- Test-Stepper+.ps1 -> Test-Stepper!.ps1

REASON: OPC packages (NuGet) escape some characters (e.g. "+" becomes "%2B").
Update-FarPackage.ps1 and NuGet.exe decode such names correctly but on manual
unzipping such names will be problematic. We better avoid "+" and use another
symbol which is not escaped, say, "!".

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Wed 01 Jan, 2014 23:24

The NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar
HOW TO GET AND INSTALL: viewtopic.php?f=11&t=2258

= 5.0.58 =

Slightly simplified the NuGet package. It is recommended to update it by the
upgraded script Update-FarPackage.ps1:
https://farnet.googlecode.com/svn/trunk ... ackage.ps1

Upgraded Update-FarPackage.ps1. See the help comments for details and examples.
Summary:
- Revised and simplified parameter names.
- It can just get and return the latest version.
- It can just download and unpack without updating.
- Much faster unpacking by System.IO.Packaging (instead of Shell.Application).

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Sun 12 Jan, 2014 17:10

The NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar
HOW TO GET AND INSTALL: viewtopic.php?f=11&t=2258

= 5.0.59 =

Fixed an error on TabExpansion in a weird case (looks like a PS issue).

Update-FarPackage.ps1

- The script supports automatic updates using "Update.*.info" files.
- Added new parameter Source (Default: the NuGet gallery).
- Added new switch Remove which removes installed files.
- Improved potential error messages.
Подробнее...

Internal. Replaced delegate GetValues with a Func<>.

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Sun 02 Mar, 2014 08:55

The NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar
HOW TO GET AND INSTALL: viewtopic.php?f=11&t=2258

= 5.0.60 =

Requires FarNet 5.0.41

New feature/mode: "Command console"

The genuine console with the prompt implemented as one line input box with Far
history completion, PowerShell completion with [Tab], PowerShell help with
[F1], etc. It is like the standard PowerShell console but in many ways more
powerful with Far UI behind. This mode is started from the menu in panels.
[Esc] in the empty line exits back to panels.

You can run Far Manager with this mode started:
Far.exe /w ps:$Psf.StartConsole()

This mode is useful already. But a few touches will make it even better and
looking more like the standard console, with less surprises.

OTHER CHANGES

Simplified menu names. Hotkeys are not changed.

Improved processing of the debugger command "Quit".

Connect-SQLite-.ps1 requires System.Data.SQLite.1.0.91.0

Go-Head-.ps1 now always goes to the first file, not directory.

Test-Debugger.ps1 moved to https://github.com/nightroman/PowerShelf

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Wed 05 Mar, 2014 03:30

The NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar
HOW TO GET AND INSTALL: viewtopic.php?f=11&t=2258

= 5.0.61 =

Implemented internals of "Read-Host -AsSecureString" properly with a password
edit box in UI and SecureString returned as a result.

Command console

The input line is shown at the line before the last in order to be there always
regardless of the key bar presence. As a result the last line is always empty,
for now. Later we can make it either the status line with some dynamic custom
information or maybe the special console mode tool bar.
** Suggestions and ideas are welcome **

Other tweaks:
- [F1] in empty command lines opens the help topic "Command input line".
- $Psf.StartConsole() throws an error if it is called not from panels.
- Key and menu bars are hidden/restored, as panels.

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Sat 08 Mar, 2014 14:30

The NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar
HOW TO GET AND INSTALL: viewtopic.php?f=11&t=2258

= 5.0.62 =

Requires FarNet 5.0.42

Command console:
- UI (prompt, confirmation, choice) is mostly the same as in the MS PS console.
- Clicks outside of the input line are ignored (for now?) and do not exit.
- Too long prompts are not truncated but shown as read only edit boxes.
- [F4] Opens the modal editor for editing/pasting multiline code.
- Removed some AI on errors.

Complete-Word-.ps1: checks IsReadOnly.
Reformat-Selection-.ps1: checks IsLocked.

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Mon 10 Mar, 2014 08:44

The NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar
HOW TO GET AND INSTALL: viewtopic.php?f=11&t=2258

= 5.0.63 =

Command console:
- As in MS console, [F7] shows PowerShell command history.
- PromptForChoice: fixed formatting of long items.

PowerShell history:
- Default MaximumHistoryCount: 512 -> 1000.
- [Enter] inserts to command lines or a new command input box.
- [CtrlEnter] is not used.

Other:
- Added /w- to the default external viewer, i.e. Far /w- ...

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Tue 11 Mar, 2014 09:32

The NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar
HOW TO GET AND INSTALL: viewtopic.php?f=11&t=2258

= 5.0.64 =

Command console:
- Read-Host and Prompt(): fixed history and password.
- Show-FarTranscript uses the external viewer by default.
- Transcribing is off by default, use Start-Transcript, Show-FarTranscript.
- Start-Transcript, Stop-Transcript work like in MS with minor differences.

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Wed 12 Mar, 2014 07:31

The NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar
HOW TO GET AND INSTALL: viewtopic.php?f=11&t=2258

= 5.0.65 =

Command console and "ps:" commands:
- Console apps with interaction and colors work as expected. In particular,
...|more works fine, git.exe commands work with colors and interaction, etc.

Execution policy:
- The module does not require Set-ExecutionPolicy in PowerShell.

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Sat 15 Mar, 2014 05:50

The NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar
HOW TO GET AND INSTALL: viewtopic.php?f=11&t=2258

= 5.0.66 =

Command console:
- Fix: output from console apps could override prompt echo.
- Read-Host and Prompt(): prompt and echo use ":" in a new line.
- Like in MS, empty text exits prompts for multiple values (e.g. string[]).

TabExpansionProfile.ps1: Replaced demo completer of Far switches with more
practical completer of git commands, e.g. git [Tab]->all, git a[Tab]->a...

HLF file uses new syntax (Mantis#0002619). Recommended Far 3.0.3831.

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Mon 17 Mar, 2014 08:56

The NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar
HOW TO GET AND INSTALL: viewtopic.php?f=11&t=2258

= 5.0.67 =

Command console:
- Nested prompt and debugger console also use command console prompt.
- Editor consoles are not used in command console mode (i.e. denied).

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Tue 18 Mar, 2014 08:23

The NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar
HOW TO GET AND INSTALL: viewtopic.php?f=11&t=2258

= 5.0.68 =

Use FarNet 5.0.45

Command console:
- Fixed missing cursor on cls.
- Fixed extra empty line on Read-Host.
- Fixed a conflict between console app output and prompt. _140317_205620

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Fri 21 Mar, 2014 08:49

The NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar
HOW TO GET AND INSTALL: viewtopic.php?f=11&t=2258

= 5.0.69 =

Use FarNet 5.0.46

Stepper: "Ask" mode shows step prompts at the top right corner of the window.

Removed menu "F11 \ PowerShellFar \ Modules+" as not useful anymore. In PS
v3.0+ modules does not have to be explicitly loaded for using commands. For
analysis of modules this command is more useful than the old menu:
ps: Get-Module -ListAvailable | Out-FarPanel

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Wed 26 Mar, 2014 08:20

The NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar
HOW TO GET AND INSTALL: viewtopic.php?f=11&t=2258

= 5.0.70 =

Update-FarPackage.ps1:
- Omitted FarHome is resolved to the current location if Far.exe is there.
- Verbose messages are replaced with Write-Host and always written.

Invoke-Editor-.ps1:
- amended current task recognition in *.{build|test}.ps1
- removed *-.ps1, redundant because there is [F5]

Invoke-Shortcut-.ps1: minor tweaks.

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Tue 01 Apr, 2014 07:23

NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar

= 5.0.71 =

Command line and box: enabled path completion in both.

Menu "Errors": replaced \r\n\t in messages with spaces.

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Sun 06 Apr, 2014 14:29

NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar

= 5.0.72 =

As far as Mantis#2635 is not going to be fixed, implemented a kludge.

NEW UPDATE TOOLS

Update-FarPackage.ps1 is replaced with the module FarPackage:
FarNet\Modules\PowerShellFar\Modules\FarPackage
See about_FarPackage.help.txt there.

Instead of one script with many not trivial parameters and rules these four
commands with simple parameters are used:

* Install-FarPackage - installs/updates one package from web
* Restore-FarPackage - installs one package from a file
* Update-FarPackage - updates all installed packages
* Uninstall-FarPackage - removes one installed package

Intermediate unpacked directories "<PackageID>.<version>" are not used, you do
not have to clean after updates. Files are extracted from packages directly to
destinations.

Some packages slightly changed their structure, e.g. FarNet and PowerShellFar
moved information files to other directories.

If somebody wants some files to be excluded on unpacking we can support, say, a
file "Update.Exclude.txt" with relative paths and file masks to be excluded.
Think, suggest.

User avatar
NightRoman
Posts: 5849
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 8 times
Been thanked: 8 times
Contact:

Re: PowerShellFar — Windows PowerShell host for Far Manager

Post by NightRoman » Sun 13 Apr, 2014 07:08

NuGet package: https://www.nuget.org/packages/FarNet.PowerShellFar

= 5.0.73 =

STOPPING COMMANDS ON USER INPUT

In MS PS console [CtrlC] stops all commands on user input, i.e. on read host,
prompt for choice, etc. The same ability is added to PSF. But in PSF [Esc] is
used instead in various prompts. Unlike in PS, it also asks a user to confirm.

Post Reply

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