http://code.google.com/p/farnet/
(+ latest FAR.NET and documentation)
1.1.44
First debugging features (new in V2 CTP)
- New scripts Set-Breakpoint-.ps1 and Test-Debugger-.ps1 uses new PS debugging
features. Function, command and variable breakpoints look working fine already,
line breakpoints sometimes do not work (perhaps due to PS beta issues). More
info: see scripts or just run Test-Debugger-.ps1 and press F1 in the dialog.
Running scripts from the editor (also for debugging)
- F5 in the .ps1 script editor invokes this script in the current PowerShell
runspace. Key F5 is hardcoded for now, but you can assign another key to
$Psf.InvokeScriptFromEditor() via PSF User Menu and a macro.
- Output is written into a tmp file and an external viewer is started to view it.
Why external? - to be able to view output and at the same time perform some
operations with modal UI, e.g. debugging.
- New $Psf.Settings settings: ExternalViewerFileName and ExternalViewerArguments
allow to set alternative viewer and its arguments, see more in .CHM and example
in Profile-.ps1 (e.g. if you use FAR with ConEmu).
- Invoke-Editor-.ps1 - changed processing of *-.ps1 scripts - it sets error mode
to 'Inquire' and calls new $Psf.InvokeScriptFromEditor().
$Host.UI.
- .ReadLine() - implemented.
- .Prompt() - re-implemented as a dialog with several input fields. E.g. it is
good for script cmdlets with several missed mandatory parameters; in fact it is
a very simple way to make auto-generated input data dialogs (also with history
automatically stored by cmdlet parameter names). Note: script cmdlets are new in
V2 CTP. Silly example: run Trace-Command without parameters and you will get a
dialog with 2 input fields.
TabExpansion and Complete-Word-
- '*' is added automatically to the end of the initial pattern, so that you can
type any remaining substring, e.g. for GET-PSJOB you may type only g[TAB]jo, not
g[TAB]*jo. Note: '*' can be undone by backspace.
- TabExpansion expands all variable names, not global only; it is useful when
execution is suspended and you deal with the current scope variables.
- TabExpansion expands 'win32..[TAB]' as WMI classes from ROOT\CIMV2, e.g.
win32_des[TAB] -> Win32_DesktopMonitor, Win32_Desktop.
- Fixed expansion of script parameters with default values.
Refactoring (perhaps breaking)
- For better performance and to avoid misuse: type of $Psf.*Items, $Psf.*Items2,
$Psf.*Paths, $Psf.*Paths2 and .*Items of AnyPanel and derived panels were
converted from Collection<> to IEnumerable<>. If you already use them
effectively then you will not notice this change. Otherwise you have to improve
your scripts:
*) use them as pipeline input: '$Psf.Items | ...';
*) use them with 'foreach($item ...', not with 'for($index ...';
*) and if you REALLY need them as arrays then use @(): @($Psf.Items).
Misc
- New script Clear-Session.ps1, see its comments for details.
- $Psf and $Far are constant for all scopes, i.e. they really never change now.
- $Host.PrivateData is not supported any more; exception on any access.
- Panel-Macro-.ps1 - fixed a few multiline sequence editor issues.
- Fix: IEditor.Open(): if a file is already opened then start position, if any,
was not set (e.g. you could not go to error line from "PowerShell errors" list,
if a file is already in the editor).