Mercurial
comparison .cms/lib/codemirror/mode/powershell/index.html @ 0:78edf6b517a0 draft
24.10
author | Coffee CMS <info@coffee-cms.ru> |
---|---|
date | Fri, 11 Oct 2024 22:40:23 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:78edf6b517a0 |
---|---|
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/5"><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/codemirror5">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 | |
32 cd c:\ | |
33 c:\windows\calc.exe | |
34 | |
35 # Number Literals | |
36 0 12345 | |
37 12kb 12mb 12gB 12Tb 12PB 12L 12D 12lkb 12dtb | |
38 1.234 1.234e56 1. 1.e2 .2 .2e34 | |
39 1.2MB 1.kb .1dTb 1.e1gb | |
40 0x1 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 @" | |
54 Multiline | |
55 string | |
56 "@ | |
57 # -- | |
58 @" | |
59 Multiline | |
60 string with quotes "' | |
61 "@ | |
62 # -- | |
63 @' | |
64 Multiline literal | |
65 string 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 | |
98 elseif begin function for foreach return else trap while do data dynamicparam | |
99 until end break if throw param continue finally in switch exit filter from try | |
100 process 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 | |
116 A: | |
117 Add-Computer Add-Content Add-History Add-Member Add-PSSnapin Add-Type | |
118 B: | |
119 C: | |
120 Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item | |
121 Clear-ItemProperty Clear-Variable Compare-Object Complete-Transaction Connect-PSSession | |
122 ConvertFrom-Csv ConvertFrom-Json ConvertFrom-SecureString ConvertFrom-StringData | |
123 Convert-Path ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString | |
124 ConvertTo-Xml Copy-Item Copy-ItemProperty | |
125 D: | |
126 Debug-Process Disable-ComputerRestore Disable-PSBreakpoint Disable-PSRemoting | |
127 Disable-PSSessionConfiguration Disconnect-PSSession | |
128 E: | |
129 Enable-ComputerRestore Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration | |
130 Enter-PSSession Exit-PSSession Export-Alias Export-Clixml Export-Console Export-Counter | |
131 Export-Csv Export-FormatData Export-ModuleMember Export-PSSession | |
132 F: | |
133 ForEach-Object Format-Custom Format-List Format-Table Format-Wide | |
134 G: | |
135 Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-ComputerRestorePoint | |
136 Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date | |
137 Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-FormatData Get-Help | |
138 Get-History Get-Host Get-HotFix Get-Item Get-ItemProperty Get-Job Get-Location Get-Member | |
139 Get-Module Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive | |
140 Get-PSProvider Get-PSSession Get-PSSessionConfiguration Get-PSSnapin Get-Random Get-Service | |
141 Get-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Variable Get-Verb | |
142 Get-WinEvent Get-WmiObject Group-Object | |
143 H: | |
144 help | |
145 I: | |
146 Import-Alias Import-Clixml Import-Counter Import-Csv Import-LocalizedData Import-Module | |
147 Import-PSSession ImportSystemModules Invoke-Command Invoke-Expression Invoke-History | |
148 Invoke-Item Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod | |
149 J: | |
150 Join-Path | |
151 K: | |
152 L: | |
153 Limit-EventLog | |
154 M: | |
155 Measure-Command Measure-Object mkdir more Move-Item Move-ItemProperty | |
156 N: | |
157 New-Alias New-Event New-EventLog New-Item New-ItemProperty New-Module New-ModuleManifest | |
158 New-Object New-PSDrive New-PSSession New-PSSessionConfigurationFile New-PSSessionOption | |
159 New-PSTransportOption New-Service New-TimeSpan New-Variable New-WebServiceProxy | |
160 New-WinEvent | |
161 O: | |
162 oss Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String | |
163 P: | |
164 Pause Pop-Location prompt Push-Location | |
165 Q: | |
166 R: | |
167 Read-Host Receive-Job Receive-PSSession Register-EngineEvent Register-ObjectEvent | |
168 Register-PSSessionConfiguration Register-WmiEvent Remove-Computer Remove-Event | |
169 Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-Module | |
170 Remove-PSBreakpoint Remove-PSDrive Remove-PSSession Remove-PSSnapin Remove-TypeData | |
171 Remove-Variable Remove-WmiObject Rename-Computer Rename-Item Rename-ItemProperty | |
172 Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service | |
173 Restore-Computer Resume-Job Resume-Service | |
174 S: | |
175 Save-Help Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias | |
176 Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item | |
177 Set-ItemProperty Set-Location Set-PSBreakpoint Set-PSDebug | |
178 Set-PSSessionConfiguration Set-Service Set-StrictMode Set-TraceSource Set-Variable | |
179 Set-WmiInstance Show-Command Show-ControlPanelItem Show-EventLog Sort-Object | |
180 Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-Transaction | |
181 Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Transcript | |
182 Suspend-Job Suspend-Service | |
183 T: | |
184 TabExpansion2 Tee-Object Test-ComputerSecureChannel Test-Connection | |
185 Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Trace-Command | |
186 U: | |
187 Unblock-File Undo-Transaction Unregister-Event Unregister-PSSessionConfiguration | |
188 Update-FormatData Update-Help Update-List Update-TypeData Use-Transaction | |
189 V: | |
190 W: | |
191 Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog | |
192 Write-Host Write-Output Write-Progress Write-Verbose Write-Warning | |
193 X: | |
194 Y: | |
195 Z:</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> |