You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<!doctype html><html> <head> <meta charset="utf-8"> <title>CodeMirror: Powershell mode</title> <link rel="stylesheet" href="../../doc/docs.css"> <link rel="stylesheet" href="../../lib/codemirror.css"> <script src="../../lib/codemirror.js"></script> <script src="../../addon/edit/matchbrackets.js"></script> <script src="powershell.js"></script> <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> </head> <body> <div id=nav> <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a>
<ul> <li><a href="../../index.html">Home</a> <li><a href="../../doc/manual.html">Manual</a> <li><a href="https://github.com/codemirror/codemirror">Code</a> </ul> <ul> <li><a href="../index.html">Language modes</a> <li><a class=active href="#">JavaScript</a> </ul> </div> <article> <h2>PowerShell mode</h2>
<div><textarea id="code" name="code"># Pathscd c:\c:\windows\calc.exe
# Number Literals0 1234512kb 12mb 12gB 12Tb 12PB 12L 12D 12lkb 12dtb1.234 1.234e56 1. 1.e2 .2 .2e341.2MB 1.kb .1dTb 1.e1gb0x1 0xabcdef 0x3tb 0xelmb
# String Literals'Literal escaping''''Literal $variable'"Escaping 1`"""Escaping 2""""Escaped `$variable""Text, $variable and more text""Text, ${variable with spaces} and more text.""Text, $($expression + 3) and more text.""Text, $("interpolation $("inception")") and more text."
@"Multilinestring"@# --@"Multilinestring with quotes "'"@# --@'Multiline literalstring with quotes "''@
# Array and Hash literals@( 'a','b','c' )@{ 'key': 'value' }
# Variables$Variable = 5$global:variable = 5${Variable with spaces} = 5
# Operators= += -= *= /= %=++ -- .. -f * / % + --not ! -bnot-split -isplit -csplit-join-is -isnot -as-eq -ieq -ceq -ne -ine -cne-gt -igt -cgt -ge -ige -cge-lt -ilt -clt -le -ile -cle-like -ilike -clike -notlike -inotlike -cnotlike-match -imatch -cmatch -notmatch -inotmatch -cnotmatch-contains -icontains -ccontains -notcontains -inotcontains -cnotcontains-replace -ireplace -creplace-band -bor -bxor-and -or -xor
# Punctuation() [] {} , : ` = ; .
# Keywordselseif begin function for foreach return else trap while do data dynamicparamuntil end break if throw param continue finally in switch exit filter from tryprocess catch
# Built-in variables$$ $? $^ $_$args $ConfirmPreference $ConsoleFileName $DebugPreference $Error$ErrorActionPreference $ErrorView $ExecutionContext $false $FormatEnumerationLimit$HOME $Host $input $MaximumAliasCount $MaximumDriveCount $MaximumErrorCount$MaximumFunctionCount $MaximumHistoryCount $MaximumVariableCount $MyInvocation$NestedPromptLevel $null $OutputEncoding $PID $PROFILE $ProgressPreference$PSBoundParameters $PSCommandPath $PSCulture $PSDefaultParameterValues$PSEmailServer $PSHOME $PSScriptRoot $PSSessionApplicationName$PSSessionConfigurationName $PSSessionOption $PSUICulture $PSVersionTable $PWD$ShellId $StackTrace $true $VerbosePreference $WarningPreference $WhatIfPreference$true $false $null
# Built-in functionsA:Add-Computer Add-Content Add-History Add-Member Add-PSSnapin Add-TypeB:C:Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-ItemClear-ItemProperty Clear-Variable Compare-Object Complete-Transaction Connect-PSSessionConvertFrom-Csv ConvertFrom-Json ConvertFrom-SecureString ConvertFrom-StringDataConvert-Path ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureStringConvertTo-Xml Copy-Item Copy-ItemPropertyD:Debug-Process Disable-ComputerRestore Disable-PSBreakpoint Disable-PSRemotingDisable-PSSessionConfiguration Disconnect-PSSessionE:Enable-ComputerRestore Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfigurationEnter-PSSession Exit-PSSession Export-Alias Export-Clixml Export-Console Export-CounterExport-Csv Export-FormatData Export-ModuleMember Export-PSSessionF:ForEach-Object Format-Custom Format-List Format-Table Format-WideG:Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-ComputerRestorePointGet-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-DateGet-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-FormatData Get-HelpGet-History Get-Host Get-HotFix Get-Item Get-ItemProperty Get-Job Get-Location Get-MemberGet-Module Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDriveGet-PSProvider Get-PSSession Get-PSSessionConfiguration Get-PSSnapin Get-Random Get-ServiceGet-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Variable Get-VerbGet-WinEvent Get-WmiObject Group-ObjectH:helpI:Import-Alias Import-Clixml Import-Counter Import-Csv Import-LocalizedData Import-ModuleImport-PSSession ImportSystemModules Invoke-Command Invoke-Expression Invoke-HistoryInvoke-Item Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethodJ:Join-PathK:L:Limit-EventLogM:Measure-Command Measure-Object mkdir more Move-Item Move-ItemPropertyN:New-Alias New-Event New-EventLog New-Item New-ItemProperty New-Module New-ModuleManifestNew-Object New-PSDrive New-PSSession New-PSSessionConfigurationFile New-PSSessionOptionNew-PSTransportOption New-Service New-TimeSpan New-Variable New-WebServiceProxyNew-WinEventO:oss Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-StringP:Pause Pop-Location prompt Push-LocationQ:R:Read-Host Receive-Job Receive-PSSession Register-EngineEvent Register-ObjectEventRegister-PSSessionConfiguration Register-WmiEvent Remove-Computer Remove-EventRemove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-ModuleRemove-PSBreakpoint Remove-PSDrive Remove-PSSession Remove-PSSnapin Remove-TypeDataRemove-Variable Remove-WmiObject Rename-Computer Rename-Item Rename-ItemPropertyReset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-ServiceRestore-Computer Resume-Job Resume-ServiceS:Save-Help Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-AliasSet-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-ItemSet-ItemProperty Set-Location Set-PSBreakpoint Set-PSDebugSet-PSSessionConfiguration Set-Service Set-StrictMode Set-TraceSource Set-VariableSet-WmiInstance Show-Command Show-ControlPanelItem Show-EventLog Sort-ObjectSplit-Path Start-Job Start-Process Start-Service Start-Sleep Start-TransactionStart-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-TranscriptSuspend-Job Suspend-ServiceT:TabExpansion2 Tee-Object Test-ComputerSecureChannel Test-ConnectionTest-ModuleManifest Test-Path Test-PSSessionConfigurationFile Trace-CommandU:Unblock-File Undo-Transaction Unregister-Event Unregister-PSSessionConfigurationUpdate-FormatData Update-Help Update-List Update-TypeData Use-TransactionV:W:Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLogWrite-Host Write-Output Write-Progress Write-Verbose Write-WarningX:Y:Z:</textarea></div> <script> var editor = CodeMirror.fromTextArea(document.getElementById("code"), { mode: "powershell", lineNumbers: true, indentUnit: 4, tabMode: "shift", matchBrackets: true }); </script>
<p><strong>MIME types defined:</strong> <code>application/x-powershell</code>.</p> </article> </body></html>
|