Recently I have found myself doing more and more powershell scripting. Some of
the things PSPad seems not to be able to recognise are:

1. Variables which start with $
2. Strongly typed variables named like [array]$var
3. Function attributes and arguments

With 3, these are as follows
Attributes - inside square brackets separated by commas eg: 
[Parameter(Mandatory = $False, HelpMessage="Enter one or more computer names
separated by commas.")]

So [Parameter] is the attribute and Mandatory and HelpMessage are arguments.

The thing is there is no definitive list of strongly typed variables as these
change when statements such as using namespace System.Collections
are used which adds additional types

I thought maybe preprocessors might be the answer to recognise these (see 
https://forum.pspad.com/read.php?6,49176,49228#msg-49228) however there seems to
have been no movement on this.

I know labels are defined as a line starting with a colon : so I doubt that can
be used?

So far I have started using [KeyWords3] but as mentioned above it is not ideal.

See
[url]https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.cor
e/about/about_functions_advanced_parameters?view=powershell-7[/url] for a list
of function parameters and arguments.

I am wondering if labels/preprocessors can be used to recognise these things or
perhaps someone else already has a solution.

-- 
<https://forum.pspad.com/read.php?2,73447,73447>
PSPad freeware editor https://www.pspad.com

Odpovedet emailem