Can I use a multi-line function or control flow segment into the PowerShellFar editor console

Posted by Justin Dearing on Super User See other posts from Super User or by Justin Dearing
Published on 2011-02-24T04:52:14Z Indexed on 2011/02/24 7:27 UTC
Read the original article Hit count: 545

If I am running farmanager with FarNet and PowerShellFar I can bring up a console of sorts by selecting F11 | .NET PowerShell | Editor Console. This console is based on the far editor. I can paste snippets of powershell scripts into this console and edit them.

The only problem is if I want to use a multi-line function or control flow segment in the console. If I paste it in it has no effect. If I attempt to type one in I get an error similar to:

ERROR: IncompleteParseException:
Missing closing '}' in statement block.
At line:1 char:42
+ foreach ($number in 1..10 ) { $number * 7 <<<<
    + CategoryInfo          : ParserError: (CloseBraceToken:TokenId) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingEndCurlyBrace

Is this simply a limitation of PowerShellFar?

© Super User or respective owner

Related posts about powershell

Related posts about far-manager