[gtksourceview: 3/5] powershell.lang: Add and fix definitions




commit bb0973dfcbc73e3d5e30eb1566a4da1ca51bb0d7
Author: awsr <alexwiser outlook com>
Date:   Tue Apr 21 21:51:18 2020 +0000

    powershell.lang: Add and fix definitions
    
    * Added new cmdlets, keywords, aliases, parameters, and datatypes.
    * Removed invalid keywords (case, then).
    * Fixed incorrect operator syntax.

 data/language-specs/powershell.lang | 150 ++++++++++++++++++++++++++++++++++--
 1 file changed, 142 insertions(+), 8 deletions(-)
---
diff --git a/data/language-specs/powershell.lang b/data/language-specs/powershell.lang
index a0f7f468..af97116a 100644
--- a/data/language-specs/powershell.lang
+++ b/data/language-specs/powershell.lang
@@ -76,22 +76,26 @@
     </context>
 
     <context id="keywords" style-ref="keyword">
-      <keyword>begin</keyword>
-      <keyword>break</keyword>
-      <keyword>case</keyword>
+      <keyword>Begin</keyword>
+      <keyword>Break</keyword>
       <keyword>Catch</keyword>
+      <keyword>Class</keyword>
       <keyword>Continue</keyword>
+      <keyword>Data</keyword>
       <keyword>Default</keyword>
       <keyword>Do</keyword>
+      <keyword>DynamicParam</keyword>
       <keyword>Else</keyword>
       <keyword>Elseif</keyword>
       <keyword>End</keyword>
+      <keyword>Enum</keyword>
       <keyword>Exit</keyword>
       <keyword>Filter</keyword>
       <keyword>Finally</keyword>
       <keyword>For</keyword>
       <keyword>Foreach</keyword>
       <keyword>Function</keyword>
+      <keyword>Hidden</keyword>
       <keyword>If</keyword>
       <keyword>In</keyword>
       <keyword>Parallel</keyword>
@@ -101,11 +105,11 @@
       <keyword>Prompt</keyword>
       <keyword>Return</keyword>
       <keyword>Switch</keyword>
-      <keyword>Then</keyword>
       <keyword>Throw</keyword>
       <keyword>Trap</keyword>
       <keyword>Try</keyword>
       <keyword>Until</keyword>
+      <keyword>Using</keyword>
       <keyword>While</keyword>
       <keyword>Workflow</keyword>
     </context>
@@ -131,7 +135,6 @@
       <keyword>ValidateSet</keyword>
       <keyword>ValueFromPipeline</keyword>
       <keyword>ValueFromPipelineByPropertyName</keyword>
-      <keyword>ValueFromPipelineByPropertyName</keyword>
     </context>
 
     <define-regex id="operator" extended="true">
@@ -139,8 +142,8 @@
       ( b?and | b?not | b?or | b?xor | (I|C)?eq | (I|C)?ge | (I|C)?gt |
         (I|C)?le | (I|C)?lt | (I|C)?ne |
         (I|C)?(not)?contains | (I|C)?(not)?like | (I|C)?(not)?match | (I|C)?replace |
-        shr | shl | (not)?in |      # add in powershell 3.0
-        (not)?is | as
+        shr | shl | (not)?in |
+        is(not)? | as
       )
       \b
     </define-regex>
@@ -184,35 +187,51 @@
       <keyword>Clear-Content</keyword>
       <keyword>Clear-EventLog</keyword>
       <keyword>Clear-History</keyword>
+      <keyword>Clear-Host</keyword>
       <keyword>Clear-Item</keyword>
       <keyword>Clear-ItemProperty</keyword>
       <keyword>Clear-Variable</keyword>
       <keyword>Compare-Object</keyword>
       <keyword>Complete-Transaction</keyword>
+      <keyword>Compress-Archive</keyword>
+      <keyword>Connect-PSSession</keyword>
       <keyword>Connect-WSMan</keyword>
       <keyword>Convert-Path</keyword>
       <keyword>ConvertFrom-CSV</keyword>
+      <keyword>ConvertFrom-Json</keyword>
+      <keyword>ConvertFrom-Markdown</keyword>
       <keyword>ConvertFrom-SecureString</keyword>
       <keyword>ConvertFrom-StringData</keyword>
       <keyword>ConvertTo-CSV</keyword>
       <keyword>ConvertTo-Html</keyword>
+      <keyword>ConvertTo-Json</keyword>
       <keyword>ConvertTo-SecureString</keyword>
       <keyword>ConvertTo-XML</keyword>
       <keyword>Copy-Item</keyword>
       <keyword>Copy-ItemProperty</keyword>
+      <keyword>Debug-Job</keyword>
       <keyword>Debug-Process</keyword>
+      <keyword>Debug-Runspace</keyword>
       <keyword>Disable-ComputerRestore</keyword>
+      <keyword>Disable-ExperimentalFeature</keyword>
       <keyword>Disable-PSBreakpoint</keyword>
       <keyword>Disable-PSSessionConfiguration</keyword>
+      <keyword>Disable-RunspaceDebug</keyword>
       <keyword>Disable-WSManCredSSP</keyword>
+      <keyword>Disconnect-PSSession</keyword>
       <keyword>Disconnect-WSMan</keyword>
       <keyword>Enable-ComputerRestore</keyword>
+      <keyword>Enable-ExperimentalFeature</keyword>
       <keyword>Enable-PSBreakpoint</keyword>
       <keyword>Enable-PSRemoting</keyword>
       <keyword>Enable-PSSessionConfiguration</keyword>
+      <keyword>Enable-RunspaceDebug</keyword>
       <keyword>Enable-WSManCredSSP</keyword>
+      <keyword>Enter-PSHostProcess</keyword>
       <keyword>Enter-PSSession</keyword>
+      <keyword>Exit-PSHostProcess</keyword>
       <keyword>Exit-PSSession</keyword>
+      <keyword>Expand-Archive</keyword>
       <keyword>Export-Alias</keyword>
       <keyword>Export-Clixml</keyword>
       <keyword>Export-Console</keyword>
@@ -221,8 +240,16 @@
       <keyword>Export-FormatData</keyword>
       <keyword>Export-ModuleMember</keyword>
       <keyword>Export-PSSession</keyword>
+      <keyword>Find-Command</keyword>
+      <keyword>Find-DSCResource</keyword>
+      <keyword>Find-Module</keyword>
+      <keyword>Find-Package</keyword>
+      <keyword>Find-PackageProvider</keyword>
+      <keyword>Find-RoleCapability</keyword>
+      <keyword>Find-Script</keyword>
       <keyword>ForEach-Object</keyword>
       <keyword>Format-Custom</keyword>
+      <keyword>Format-Hex</keyword>
       <keyword>Format-List</keyword>
       <keyword>Format-Table</keyword>
       <keyword>Format-Wide</keyword>
@@ -230,45 +257,69 @@
       <keyword>Get-Alias</keyword>
       <keyword>Get-AuthenticodeSignature</keyword>
       <keyword>Get-ChildItem</keyword>
+      <keyword>Get-Clipboard</keyword>
       <keyword>Get-Command</keyword>
+      <keyword>Get-ComputerInfo</keyword>
       <keyword>Get-ComputerRestorePoint</keyword>
       <keyword>Get-Content</keyword>
       <keyword>Get-Counter</keyword>
       <keyword>Get-Credential</keyword>
+      <keyword>Get-CredsFromCredentialProvider</keyword>
       <keyword>Get-Culture</keyword>
       <keyword>Get-Date</keyword>
+      <keyword>Get-DscResource</keyword>
+      <keyword>Get-Error</keyword>
       <keyword>Get-Event</keyword>
       <keyword>Get-EventLog</keyword>
       <keyword>Get-EventSubscriber</keyword>
       <keyword>Get-ExecutionPolicy</keyword>
+      <keyword>Get-ExperimentalFeature</keyword>
+      <keyword>Get-FileHash</keyword>
       <keyword>Get-FormatData</keyword>
       <keyword>Get-Help</keyword>
       <keyword>Get-History</keyword>
       <keyword>Get-Host</keyword>
       <keyword>Get-HotFix</keyword>
+      <keyword>Get-InstalledModule</keyword>
+      <keyword>Get-InstalledScript</keyword>
       <keyword>Get-Item</keyword>
       <keyword>Get-ItemProperty</keyword>
+      <keyword>Get-ItemPropertyValue</keyword>
       <keyword>Get-Job</keyword>
       <keyword>Get-Location</keyword>
+      <keyword>Get-MarkdownOption</keyword>
       <keyword>Get-Member</keyword>
       <keyword>Get-Module</keyword>
+      <keyword>Get-Package</keyword>
+      <keyword>Get-PackageProvider</keyword>
+      <keyword>Get-PackageSource</keyword>
       <keyword>Get-PfxCertificate</keyword>
       <keyword>Get-Process</keyword>
       <keyword>Get-PSBreakpoint</keyword>
       <keyword>Get-PSCallStack</keyword>
       <keyword>Get-PSDrive</keyword>
+      <keyword>Get-PSHostProcessInfo</keyword>
       <keyword>Get-PSProvider</keyword>
+      <keyword>Get-PSReadLineKeyHandler</keyword>
+      <keyword>Get-PSReadLineOption</keyword>
+      <keyword>Get-PSRepository</keyword>
       <keyword>Get-PSSession</keyword>
       <keyword>Get-PSSessionConfiguration</keyword>
       <keyword>Get-PSSnapin</keyword>
       <keyword>Get-Random</keyword>
+      <keyword>Get-Runspace</keyword>
+      <keyword>Get-RunspaceDebug</keyword>
       <keyword>Get-Service</keyword>
       <keyword>Get-Services</keyword>
+      <keyword>Get-TimeZone</keyword>
       <keyword>Get-TraceSource</keyword>
       <keyword>Get-Transaction</keyword>
+      <keyword>Get-TypeData</keyword>
       <keyword>Get-UICulture</keyword>
       <keyword>Get-Unique</keyword>
+      <keyword>Get-Uptime</keyword>
       <keyword>Get-Variable</keyword>
+      <keyword>Get-Verb</keyword>
       <keyword>Get-WinEvent</keyword>
       <keyword>Get-WmiObject</keyword>
       <keyword>Get-WSManCredSSP</keyword>
@@ -280,31 +331,47 @@
       <keyword>Import-CSV</keyword>
       <keyword>Import-LocalizedData</keyword>
       <keyword>Import-Module</keyword>
+      <keyword>Import-PackageProvider</keyword>
+      <keyword>Import-PowerShellDataFile</keyword>
       <keyword>Import-PSSession</keyword>
+      <keyword>Install-Module</keyword>
+      <keyword>Install-Package</keyword>
+      <keyword>Install-PackageProvider</keyword>
+      <keyword>Install-Script</keyword>
       <keyword>Invoke-Command</keyword>
+      <keyword>Invoke-DscResource</keyword>
       <keyword>Invoke-Expression</keyword>
       <keyword>Invoke-History</keyword>
       <keyword>Invoke-Item</keyword>
+      <keyword>Invoke-RestMethod</keyword>
+      <keyword>Invoke-WebRequest</keyword>
       <keyword>Invoke-WmiMethod</keyword>
       <keyword>Invoke-WSManAction</keyword>
       <keyword>Join-Path</keyword>
+      <keyword>Join-String</keyword>
       <keyword>Limit-EventLog</keyword>
       <keyword>Measure-Command</keyword>
       <keyword>Measure-Object</keyword>
       <keyword>Move-Item</keyword>
       <keyword>Move-ItemProperty</keyword>
       <keyword>New-Alias</keyword>
+      <keyword>New-DscChecksum</keyword>
       <keyword>New-Event</keyword>
       <keyword>New-EventLog</keyword>
+      <keyword>New-Guid</keyword>
       <keyword>New-Item</keyword>
       <keyword>New-ItemProperty</keyword>
       <keyword>New-Module</keyword>
       <keyword>New-ModuleManifest</keyword>
       <keyword>New-Object</keyword>
       <keyword>New-PSDrive</keyword>
+      <keyword>New-PSRoleCapabilityFile</keyword>
       <keyword>New-PSSession</keyword>
       <keyword>New-PSSessionOption</keyword>
+      <keyword>New-PSTransportOption</keyword>
+      <keyword>New-ScriptFileInfo</keyword>
       <keyword>New-Service</keyword>
+      <keyword>New-TemporaryFile</keyword>
       <keyword>New-TimeSpan</keyword>
       <keyword>New-Variable</keyword>
       <keyword>New-WebServiceProxy</keyword>
@@ -318,13 +385,20 @@
       <keyword>Out-Printer</keyword>
       <keyword>Out-String</keyword>
       <keyword>Pop-Location</keyword>
+      <keyword>Publish-Module</keyword>
+      <keyword>Publish-Script</keyword>
       <keyword>Push-Location</keyword>
       <keyword>Read-Host</keyword>
       <keyword>Receive-Job</keyword>
+      <keyword>Receive-PSSession</keyword>
+      <keyword>Register-ArgumentCompleter</keyword>
       <keyword>Register-EngineEvent</keyword>
       <keyword>Register-ObjectEvent</keyword>
+      <keyword>Register-PackageSource</keyword>
+      <keyword>Register-PSRepository</keyword>
       <keyword>Register-PSSessionConfiguration</keyword>
       <keyword>Register-WmiEvent</keyword>
+      <keyword>Remove-Alias</keyword>
       <keyword>Remove-Computer</keyword>
       <keyword>Remove-Event</keyword>
       <keyword>Remove-EventLog</keyword>
@@ -334,8 +408,11 @@
       <keyword>Remove-Module</keyword>
       <keyword>Remove-PSBreakpoint</keyword>
       <keyword>Remove-PSDrive</keyword>
+      <keyword>Remove-PSReadLineKeyHandler</keyword>
       <keyword>Remove-PSSession</keyword>
       <keyword>Remove-PSSnapin</keyword>
+      <keyword>Remove-Service</keyword>
+      <keyword>Remove-TypeData</keyword>
       <keyword>Remove-Variable</keyword>
       <keyword>Remove-WmiObject</keyword>
       <keyword>Remove-WSManInstance</keyword>
@@ -347,6 +424,10 @@
       <keyword>Restart-Service</keyword>
       <keyword>Restore-Computer</keyword>
       <keyword>Resume-Service</keyword>
+      <keyword>Save-Help</keyword>
+      <keyword>Save-Module</keyword>
+      <keyword>Save-Package</keyword>
+      <keyword>Save-Script</keyword>
       <keyword>Select-Object</keyword>
       <keyword>Select-String</keyword>
       <keyword>Select-XML</keyword>
@@ -354,29 +435,38 @@
       <keyword>Set-Acl</keyword>
       <keyword>Set-Alias</keyword>
       <keyword>Set-AuthenticodeSignature</keyword>
+      <keyword>Set-Clipboard</keyword>
       <keyword>Set-Content</keyword>
       <keyword>Set-Date</keyword>
       <keyword>Set-ExecutionPolicy</keyword>
       <keyword>Set-Item</keyword>
       <keyword>Set-ItemProperty</keyword>
       <keyword>Set-Location</keyword>
+      <keyword>Set-MarkdownOption</keyword>
+      <keyword>Set-PackageSource</keyword>
       <keyword>Set-PSBreakpoint</keyword>
       <keyword>Set-PSDebug</keyword>
+      <keyword>Set-PSReadLineKeyHandler</keyword>
+      <keyword>Set-PSReadLineOption</keyword>
+      <keyword>Set-PSRepository</keyword>
       <keyword>Set-PSSessionConfiguration</keyword>
       <keyword>Set-Service</keyword>
       <keyword>Set-StrictMode</keyword>
+      <keyword>Set-TimeZone</keyword>
       <keyword>Set-TraceSource</keyword>
       <keyword>Set-Variable</keyword>
       <keyword>Set-WmiInstance</keyword>
       <keyword>Set-WSManInstance</keyword>
       <keyword>Set-WSManQuickConfig</keyword>
       <keyword>Show-EventLog</keyword>
+      <keyword>Show-Markdown</keyword>
       <keyword>Sort-Object</keyword>
       <keyword>Split-Path</keyword>
       <keyword>Start-Job</keyword>
       <keyword>Start-Process</keyword>
       <keyword>Start-Service</keyword>
       <keyword>Start-Sleep</keyword>
+      <keyword>Start-ThreadJob</keyword>
       <keyword>Start-Transaction</keyword>
       <keyword>Start-Transcript</keyword>
       <keyword>Stop-Computer</keyword>
@@ -388,17 +478,31 @@
       <keyword>Tee-Object</keyword>
       <keyword>Test-ComputerSecureChannel</keyword>
       <keyword>Test-Connection</keyword>
+      <keyword>Test-Json</keyword>
       <keyword>Test-ModuleManifest</keyword>
       <keyword>Test-Path</keyword>
+      <keyword>Test-ScriptFileInfo</keyword>
       <keyword>Test-WSMan</keyword>
       <keyword>Trace-Command</keyword>
+      <keyword>Unblock-File</keyword>
       <keyword>Undo-Transaction</keyword>
+      <keyword>Uninstall-Module</keyword>
+      <keyword>Uninstall-Package</keyword>
+      <keyword>Uninstall-Script</keyword>
       <keyword>Unregister-Event</keyword>
+      <keyword>Unregister-PackageSource</keyword>
+      <keyword>Unregister-PSRepository</keyword>
       <keyword>Unregister-PSSessionConfiguration</keyword>
       <keyword>Update-FormatData</keyword>
+      <keyword>Update-Help</keyword>
       <keyword>Update-List</keyword>
+      <keyword>Update-Module</keyword>
+      <keyword>Update-ModuleManifest</keyword>
+      <keyword>Update-Script</keyword>
+      <keyword>Update-ScriptFileInfo</keyword>
       <keyword>Update-TypeData</keyword>
       <keyword>Use-Transaction</keyword>
+      <keyword>Wait-Debugger</keyword>
       <keyword>Wait-Event</keyword>
       <keyword>Wait-Job</keyword>
       <keyword>Wait-Process</keyword>
@@ -407,6 +511,7 @@
       <keyword>Write-Error</keyword>
       <keyword>Write-EventLog</keyword>
       <keyword>Write-Host</keyword>
+      <keyword>Write-Information</keyword>
       <keyword>Write-Output</keyword>
       <keyword>Write-Progress</keyword>
       <keyword>Write-Verbose</keyword>
@@ -426,6 +531,7 @@
       <keyword>clp</keyword>
       <keyword>cls</keyword>
       <keyword>clv</keyword>
+      <keyword>cnsn</keyword>
       <keyword>compare</keyword>
       <keyword>copy</keyword>
       <keyword>cp</keyword>
@@ -436,6 +542,7 @@
       <keyword>del</keyword>
       <keyword>diff</keyword>
       <keyword>dir</keyword>
+      <keyword>dnsn</keyword>
       <keyword>ebp</keyword>
       <keyword>echo</keyword>
       <keyword>epal</keyword>
@@ -445,6 +552,7 @@
       <keyword>etsn</keyword>
       <keyword>exsn</keyword>
       <keyword>fc</keyword>
+      <keyword>fhx</keyword>
       <keyword>fl</keyword>
       <keyword>foreach</keyword>
       <keyword>ft</keyword>
@@ -452,22 +560,27 @@
       <keyword>gal</keyword>
       <keyword>gbp</keyword>
       <keyword>gc</keyword>
+      <keyword>gcb</keyword>
       <keyword>gci</keyword>
       <keyword>gcm</keyword>
       <keyword>gcs</keyword>
       <keyword>gdr</keyword>
+      <keyword>gerr</keyword>
       <keyword>ghy</keyword>
       <keyword>gi</keyword>
+      <keyword>gin</keyword>
       <keyword>gjb</keyword>
       <keyword>gl</keyword>
       <keyword>gm</keyword>
       <keyword>gmo</keyword>
       <keyword>gp</keyword>
       <keyword>gps</keyword>
+      <keyword>gpv</keyword>
       <keyword>group</keyword>
       <keyword>gsn</keyword>
       <keyword>gsnp</keyword>
       <keyword>gsv</keyword>
+      <keyword>gtz</keyword>
       <keyword>gu</keyword>
       <keyword>gv</keyword>
       <keyword>gwmi</keyword>
@@ -481,8 +594,10 @@
       <keyword>ipcsv</keyword>
       <keyword>ipmo</keyword>
       <keyword>ipsn</keyword>
+      <keyword>irm</keyword>
       <keyword>ise</keyword>
       <keyword>iwmi</keyword>
+      <keyword>iwr</keyword>
       <keyword>kill</keyword>
       <keyword>lp</keyword>
       <keyword>ls</keyword>
@@ -509,6 +624,7 @@
       <keyword>r</keyword>
       <keyword>rbp</keyword>
       <keyword>rcjb</keyword>
+      <keyword>rcsn</keyword>
       <keyword>rd</keyword>
       <keyword>rdr</keyword>
       <keyword>ren</keyword>
@@ -531,17 +647,21 @@
       <keyword>sasv</keyword>
       <keyword>sbp</keyword>
       <keyword>sc</keyword>
+      <keyword>scb</keyword>
       <keyword>select</keyword>
       <keyword>set</keyword>
+      <keyword>shcm</keyword>
       <keyword>si</keyword>
       <keyword>sl</keyword>
       <keyword>sleep</keyword>
+      <keyword>sls</keyword>
       <keyword>sort</keyword>
       <keyword>sp</keyword>
       <keyword>spjb</keyword>
       <keyword>spps</keyword>
       <keyword>spsv</keyword>
       <keyword>start</keyword>
+      <keyword>stz</keyword>
       <keyword>sv</keyword>
       <keyword>swmi</keyword>
       <keyword>tee</keyword>
@@ -557,6 +677,8 @@
       <keyword>Debug</keyword>
       <keyword>ErrorAction</keyword>
       <keyword>ErrorVariable</keyword>
+      <keyword>InformationAction</keyword>
+      <keyword>InformationVariable</keyword>
       <keyword>OutBuffer</keyword>
       <keyword>OutVariable</keyword>
       <keyword>PipelineVariable</keyword>
@@ -567,14 +689,21 @@
       <keyword>BackgroundColor</keyword>
       <keyword>Certificate</keyword>
       <keyword>ComObject</keyword>
+      <keyword>Exclude</keyword>
+      <keyword>Force</keyword>
       <keyword>ForegroundColor</keyword>
+      <keyword>Hours</keyword>
+      <keyword>Include</keyword>
       <keyword>InputObject</keyword>
+      <keyword>LiteralPath</keyword>
       <keyword>MemberType</keyword>
+      <keyword>Minutes</keyword>
       <keyword>Name</keyword>
       <keyword>NoNewline</keyword>
       <keyword>Object</keyword>
       <keyword>PassThru</keyword>
-      <keyword>PassThru</keyword>
+      <keyword>Path</keyword>
+      <keyword>Property</keyword>
       <keyword>Seconds</keyword>
       <keyword>TypeName</keyword>
       <keyword>Value</keyword>
@@ -594,20 +723,25 @@
       <keyword>bool</keyword>
       <keyword>byte</keyword>
       <keyword>char</keyword>
+      <keyword>datetime</keyword>
       <keyword>decimal</keyword>
       <keyword>double</keyword>
       <keyword>hashtable</keyword>
       <keyword>int32</keyword>
       <keyword>int</keyword>
       <keyword>long</keyword>
+      <keyword>pscustomobject</keyword>
+      <keyword>psobject</keyword>
       <keyword>single</keyword>
       <keyword>string</keyword>
+      <keyword>timespan</keyword>
       <keyword>void</keyword>
       <keyword>xml</keyword>
     </context>
 
     <context id="powershell" class="no-spell-check">
       <include>
+        <!-- Order will affect styling behavior -->
         <context ref="line-comment"/>
         <context ref="multiline-comment"/>
         <context ref="string"/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]