all repos — NoPaste @ ad688e0acc0360cf52f5ee4d90c4767d1804e7a3

Resurrected - The PussTheCat.org fork of NoPaste

scripts/CodeMirror/mode/powershell/index.html (view raw)

  1<!doctype html>
  2<html>
  3  <head>
  4    <meta charset="utf-8">
  5    <title>CodeMirror: Powershell mode</title>
  6    <link rel="stylesheet" href="../../doc/docs.css">
  7    <link rel="stylesheet" href="../../lib/codemirror.css">
  8    <script src="../../lib/codemirror.js"></script>
  9    <script src="../../addon/edit/matchbrackets.js"></script>
 10    <script src="powershell.js"></script>
 11    <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
 12  </head>
 13  <body>
 14    <div id=nav>
 15      <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a>
 16
 17      <ul>
 18        <li><a href="../../index.html">Home</a>
 19        <li><a href="../../doc/manual.html">Manual</a>
 20        <li><a href="https://github.com/codemirror/codemirror">Code</a>
 21      </ul>
 22      <ul>
 23        <li><a href="../index.html">Language modes</a>
 24        <li><a class=active href="#">JavaScript</a>
 25      </ul>
 26    </div>
 27    <article>
 28      <h2>PowerShell mode</h2>
 29
 30      <div><textarea id="code" name="code">
 31# Paths
 32cd c:\
 33c:\windows\calc.exe
 34
 35# Number Literals
 360 12345
 3712kb 12mb 12gB 12Tb 12PB 12L 12D 12lkb 12dtb
 381.234 1.234e56 1. 1.e2 .2 .2e34
 391.2MB 1.kb .1dTb 1.e1gb
 400x1 0xabcdef 0x3tb 0xelmb
 41
 42# String Literals
 43'Literal escaping'''
 44'Literal $variable'
 45"Escaping 1`""
 46"Escaping 2"""
 47"Escaped `$variable"
 48"Text, $variable and more text"
 49"Text, ${variable with spaces} and more text."
 50"Text, $($expression + 3) and more text."
 51"Text, $("interpolation $("inception")") and more text."
 52
 53@"
 54Multiline
 55string
 56"@
 57# --
 58@"
 59Multiline
 60string with quotes "'
 61"@
 62# --
 63@'
 64Multiline literal
 65string with quotes "'
 66'@
 67
 68# Array and Hash literals
 69@( 'a','b','c' )
 70@{ 'key': 'value' }
 71
 72# Variables
 73$Variable = 5
 74$global:variable = 5
 75${Variable with spaces} = 5
 76
 77# Operators
 78= += -= *= /= %=
 79++ -- .. -f * / % + -
 80-not ! -bnot
 81-split -isplit -csplit
 82-join
 83-is -isnot -as
 84-eq -ieq -ceq -ne -ine -cne
 85-gt -igt -cgt -ge -ige -cge
 86-lt -ilt -clt -le -ile -cle
 87-like -ilike -clike -notlike -inotlike -cnotlike
 88-match -imatch -cmatch -notmatch -inotmatch -cnotmatch
 89-contains -icontains -ccontains -notcontains -inotcontains -cnotcontains
 90-replace -ireplace -creplace
 91-band	-bor -bxor
 92-and -or -xor
 93
 94# Punctuation
 95() [] {} , : ` = ; .
 96
 97# Keywords
 98elseif begin function for foreach return else trap while do data dynamicparam
 99until end break if throw param continue finally in switch exit filter from try
100process catch
101
102# Built-in variables
103$$ $? $^ $_
104$args $ConfirmPreference $ConsoleFileName $DebugPreference $Error
105$ErrorActionPreference $ErrorView $ExecutionContext $false $FormatEnumerationLimit
106$HOME $Host $input $MaximumAliasCount $MaximumDriveCount $MaximumErrorCount
107$MaximumFunctionCount $MaximumHistoryCount $MaximumVariableCount $MyInvocation
108$NestedPromptLevel $null $OutputEncoding $PID $PROFILE $ProgressPreference
109$PSBoundParameters $PSCommandPath $PSCulture $PSDefaultParameterValues
110$PSEmailServer $PSHOME $PSScriptRoot $PSSessionApplicationName
111$PSSessionConfigurationName $PSSessionOption $PSUICulture $PSVersionTable $PWD
112$ShellId $StackTrace $true $VerbosePreference $WarningPreference $WhatIfPreference
113$true $false $null
114
115# Built-in functions
116A:
117Add-Computer Add-Content Add-History Add-Member Add-PSSnapin Add-Type
118B:
119C:
120Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item
121Clear-ItemProperty Clear-Variable Compare-Object Complete-Transaction Connect-PSSession
122ConvertFrom-Csv ConvertFrom-Json ConvertFrom-SecureString ConvertFrom-StringData
123Convert-Path ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString
124ConvertTo-Xml Copy-Item Copy-ItemProperty
125D:
126Debug-Process Disable-ComputerRestore Disable-PSBreakpoint Disable-PSRemoting
127Disable-PSSessionConfiguration Disconnect-PSSession
128E:
129Enable-ComputerRestore Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration
130Enter-PSSession Exit-PSSession Export-Alias Export-Clixml Export-Console Export-Counter
131Export-Csv Export-FormatData Export-ModuleMember Export-PSSession
132F:
133ForEach-Object Format-Custom Format-List Format-Table Format-Wide
134G:
135Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-ComputerRestorePoint
136Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date
137Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-FormatData Get-Help
138Get-History Get-Host Get-HotFix Get-Item Get-ItemProperty Get-Job Get-Location Get-Member
139Get-Module Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive
140Get-PSProvider Get-PSSession Get-PSSessionConfiguration Get-PSSnapin Get-Random Get-Service
141Get-TraceSource Get-Transaction Get-TypeData Get-UICulture  Get-Unique Get-Variable Get-Verb
142Get-WinEvent Get-WmiObject Group-Object
143H:
144help
145I:
146Import-Alias Import-Clixml Import-Counter Import-Csv Import-LocalizedData Import-Module
147Import-PSSession ImportSystemModules Invoke-Command Invoke-Expression Invoke-History
148Invoke-Item Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod
149J:
150Join-Path
151K:
152L:
153Limit-EventLog
154M:
155Measure-Command Measure-Object mkdir more Move-Item Move-ItemProperty
156N:
157New-Alias New-Event New-EventLog New-Item New-ItemProperty New-Module New-ModuleManifest
158New-Object New-PSDrive New-PSSession New-PSSessionConfigurationFile New-PSSessionOption
159New-PSTransportOption New-Service New-TimeSpan New-Variable New-WebServiceProxy
160New-WinEvent
161O:
162oss Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String
163P:
164Pause Pop-Location prompt Push-Location
165Q:
166R:
167Read-Host Receive-Job Receive-PSSession Register-EngineEvent Register-ObjectEvent
168Register-PSSessionConfiguration Register-WmiEvent Remove-Computer Remove-Event
169Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-Module
170Remove-PSBreakpoint Remove-PSDrive Remove-PSSession Remove-PSSnapin Remove-TypeData
171Remove-Variable Remove-WmiObject Rename-Computer Rename-Item Rename-ItemProperty
172Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service
173Restore-Computer Resume-Job Resume-Service
174S:
175Save-Help Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias
176Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item
177Set-ItemProperty Set-Location Set-PSBreakpoint Set-PSDebug
178Set-PSSessionConfiguration Set-Service Set-StrictMode Set-TraceSource Set-Variable
179Set-WmiInstance Show-Command Show-ControlPanelItem Show-EventLog Sort-Object
180Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-Transaction
181Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Transcript
182Suspend-Job Suspend-Service
183T:
184TabExpansion2 Tee-Object Test-ComputerSecureChannel Test-Connection
185Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Trace-Command
186U:
187Unblock-File Undo-Transaction Unregister-Event Unregister-PSSessionConfiguration
188Update-FormatData Update-Help Update-List Update-TypeData Use-Transaction
189V:
190W:
191Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog
192Write-Host Write-Output Write-Progress Write-Verbose Write-Warning
193X:
194Y:
195Z:</textarea></div>
196      <script>
197        var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
198          mode: "powershell",
199          lineNumbers: true,
200          indentUnit: 4,
201          tabMode: "shift",
202          matchBrackets: true
203        });
204      </script>
205
206      <p><strong>MIME types defined:</strong> <code>application/x-powershell</code>.</p>
207    </article>
208  </body>
209</html>