Filled out list of built in functions.
This commit is contained in:
parent
9cb8889801
commit
4dcc3742a5
1 changed files with 41 additions and 6 deletions
|
|
@ -13,9 +13,47 @@ var PowershellHighlightRules = function() {
|
|||
);
|
||||
|
||||
var builtinFunctions = lang.arrayToMap(
|
||||
// TODO: fill out this list
|
||||
("Write-Host").split("|")
|
||||
);
|
||||
("Get-Alias|Import-Alias|New-Alias|Set-Alias|Get-AuthenticodeSignature|Set-AuthenticodeSignature|" +
|
||||
"Set-Location|Get-ChildItem|Clear-Item|Get-Command|Measure-Command|Trace-Command|" +
|
||||
"Add-Computer|Checkpoint-Computer|Remove-Computer|Restart-Computer|Restore-Computer|Stop-Computer|" +
|
||||
"Reset-ComputerMachinePassword|Test-ComputerSecureChannel|Add-Content|Get-Content|Set-Content|Clear-Content|" +
|
||||
"Get-Command|Invoke-Command|Enable-ComputerRestore|Disable-ComputerRestore|Get-ComputerRestorePoint|Test-Connection|" +
|
||||
"ConvertFrom-CSV|ConvertTo-CSV|ConvertTo-Html|ConvertTo-Xml|ConvertFrom-SecureString|ConvertTo-SecureString|" +
|
||||
"Copy-Item|Export-Counter|Get-Counter|Import-Counter|Get-Credential|Get-Culture|" +
|
||||
"Get-ChildItem|Get-Date|Set-Date|Remove-Item|Compare-Object|Get-Event|" +
|
||||
"Get-WinEvent|New-Event|Remove-Event|Unregister-Event|Wait-Event|Clear-EventLog|" +
|
||||
"Get-Eventlog|Limit-EventLog|New-Eventlog|Remove-EventLog|Show-EventLog|Write-EventLog|" +
|
||||
"Get-EventSubscriber|Register-EngineEvent|Register-ObjectEvent|Register-WmiEvent|Get-ExecutionPolicy|Set-ExecutionPolicy|" +
|
||||
"Export-Alias|Export-Clixml|Export-Console|Export-Csv|ForEach-Object|Format-Custom|" +
|
||||
"Format-List|Format-Table|Format-Wide|Export-FormatData|Get-FormatData|Get-Item|" +
|
||||
"Get-ChildItem|Get-Help|Add-History|Clear-History|Get-History|Invoke-History|" +
|
||||
"Get-Host|Read-Host|Write-Host|Get-HotFix|Import-Clixml|Import-Csv|" +
|
||||
"Invoke-Command|Invoke-Expression|Get-Item|Invoke-Item|New-Item|Remove-Item|" +
|
||||
"Set-Item|Clear-ItemProperty|Copy-ItemProperty|Get-ItemProperty|Move-ItemProperty|New-ItemProperty|" +
|
||||
"Remove-ItemProperty|Rename-ItemProperty|Set-ItemProperty|Get-Job|Receive-Job|Remove-Job|" +
|
||||
"Start-Job|Stop-Job|Wait-Job|Stop-Process|Update-List|Get-Location|" +
|
||||
"Pop-Location|Push-Location|Set-Location|Send-MailMessage|Add-Member|Get-Member|" +
|
||||
"Move-Item|Compare-Object|Group-Object|Measure-Object|New-Object|Select-Object|" +
|
||||
"Sort-Object|Where-Object|Out-Default|Out-File|Out-GridView|Out-Host|" +
|
||||
"Out-Null|Out-Printer|Out-String|Convert-Path|Join-Path|Resolve-Path|" +
|
||||
"Split-Path|Test-Path|Get-Pfxcertificate|Pop-Location|Push-Location|Get-Process|" +
|
||||
"Start-Process|Stop-Process|Wait-Process|Enable-PSBreakpoint|Disable-PSBreakpoint|Get-PSBreakpoint|" +
|
||||
"Set-PSBreakpoint|Remove-PSBreakpoint|Get-PSDrive|New-PSDrive|Remove-PSDrive|Get-PSProvider|" +
|
||||
"Set-PSdebug|Enter-PSSession|Exit-PSSession|Export-PSSession|Get-PSSession|Import-PSSession|" +
|
||||
"New-PSSession|Remove-PSSession|Disable-PSSessionConfiguration|Enable-PSSessionConfiguration|Get-PSSessionConfiguration|Register-PSSessionConfiguration|" +
|
||||
"Set-PSSessionConfiguration|Unregister-PSSessionConfiguration|New-PSSessionOption|Add-PsSnapIn|Get-PsSnapin|Remove-PSSnapin|" +
|
||||
"Get-Random|Read-Host|Remove-Item|Rename-Item|Rename-ItemProperty|Select-Object|" +
|
||||
"Select-XML|Send-MailMessage|Get-Service|New-Service|Restart-Service|Resume-Service|" +
|
||||
"Set-Service|Start-Service|Stop-Service|Suspend-Service|Sort-Object|Start-Sleep|" +
|
||||
"ConvertFrom-StringData|Select-String|Tee-Object|New-Timespan|Trace-Command|Get-Tracesource|" +
|
||||
"Set-Tracesource|Start-Transaction|Complete-Transaction|Get-Transaction|Use-Transaction|Undo-Transaction|" +
|
||||
"Start-Transcript|Stop-Transcript|Add-Type|Update-TypeData|Get-Uiculture|Get-Unique|" +
|
||||
"Update-Formatdata|Update-Typedata|Clear-Variable|Get-Variable|New-Variable|Remove-Variable|" +
|
||||
"Set-Variable|New-WebServiceProxy|Where-Object|Write-Debug|Write-Error|Write-Host|" +
|
||||
"Write-Output|Write-Progress|Write-Verbose|Write-Warning|Set-WmiInstance|Invoke-WmiMethod|" +
|
||||
"Get-WmiObject|Remove-WmiObject|Connect-WSMan|Disconnect-WSMan|Test-WSMan|Invoke-WSManAction|" +
|
||||
"Disable-WSManCredSSP|Enable-WSManCredSSP|Get-WSManCredSSP|New-WSManInstance|Get-WSManInstance|Set-WSManInstance|" +
|
||||
"Remove-WSManInstance|Set-WSManQuickConfig|New-WSManSessionOption").split("|"));
|
||||
|
||||
var binaryOperatorsRe = "eq|ne|ge|gt|lt|le|like|notlike|match|notmatch|replace|contains|notcontains|" +
|
||||
"ieq|ine|ige|igt|ile|ilt|ilike|inotlike|imatch|inotmatch|ireplace|icontains|inotcontains|" +
|
||||
|
|
@ -92,9 +130,6 @@ var PowershellHighlightRules = function() {
|
|||
}
|
||||
]
|
||||
};
|
||||
|
||||
this.embedRules(DocCommentHighlightRules, "doc-",
|
||||
[ new DocCommentHighlightRules().getEndRule("start") ]);
|
||||
};
|
||||
|
||||
oop.inherits(PowershellHighlightRules, TextHighlightRules);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue