forked from mitchell486/nanorc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
powershell.nanorc
140 lines (128 loc) · 7.75 KB
/
powershell.nanorc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
##
syntax "powershell" "\.(ps1|psm1)$"
## Most commands
icolor cyan "\<(Add-Computer|Add-Content|Add-History|Add-Member|Add-PSSnapin|Add-Type|asnp|cat|cd|cd..|chdir|Checkpoint-Co|clc|clear|Clear-Content|Clear-EventLo|Clear-History|Clear-Host|Clear-Item|Clear-ItemPro|Clear-Variabl|clhy|cli|clp|cls|clv|compare|Compare-Objec|Complete-Tran|Connect-WSMan|ConvertFrom-C|ConvertFrom-S|ConvertFrom-S|Convert-Path|ConvertTo-Csv|ConvertTo-Htm|ConvertTo-Sec|ConvertTo-Xml|copy|Copy-Item|Copy-ItemProp|cp|cpi|cpp|cvpa|dbp|Debug-Process|del|diff|dir|Disable-Compu|Disable-PSBre|Disable-PSRem|Disable-PSSes|Disable-WSMan|Disconnect-WS|ebp|echo|Enable-Comput|Enable-PSBrea|Enable-PSRemo|Enable-PSSess|Enable-WSManC|Enter-PSSessi|epal|epcsv|epsn|erase|etsn|Exit-PSSessio|Export-Alias|Export-Clixml|Export-Consol|Export-Counte|Export-Csv|Export-Format|Export-Module|Export-PSSess|exsn|foreach|ForEach-Objec|Format-Custom|Format-List|Format-Table|Format-Wide|gal|gbp|gc|gci|gcm|gcs|gdr|Get-Acl|Get-Alias|Get-Authentic|Get-ChildItem|Get-Command|Get-ComputerR|Get-Content|Get-Counter|Get-Credentia|Get-Culture|Get-Date|Get-Event|Get-EventLog|Get-EventSubs|Get-Execution|Get-FormatDat|Get-Help|Get-History|Get-Host|Get-HotFix|Get-Item|Get-ItemPrope|Get-Job|Get-Location|Get-Member|Get-Module|Get-PfxCertif|Get-Process|Get-PSBreakpo|Get-PSCallSta|Get-PSDrive|Get-PSProvide|Get-PSSession|Get-PSSession|Get-PSSnapin|Get-Random|Get-Service|Get-TraceSour|Get-Transacti|Get-UICulture|Get-Unique|Get-Variable|Get-Verb|Get-WinEvent|Get-WmiObject|Get-WSManCred|Get-WSManInst|ghy|gjb|gmo|gps|group|Group-Object|gsn|gsnp|gsv|gwmi|help|history|icm|iex|ihy|Import-Alias|Import-Clixml|Import-Counte|Import-Csv|Import-Locali|Import-Module|Import-PSSess|ImportSystemM|Invoke-Comman|Invoke-Expres|Invoke-Histor|Invoke-Item|Invoke-WmiMet|Invoke-WSManA|ipal|ipcsv|ipmo|ipsn|ise|iwmi|Join-Path|kill|Limit-EventLo|man|measure|Measure-Comma|Measure-Objec|mkdir|more|mount|move|Move-Item|Move-ItemProp|mv|nal|ndr|New-Alias|New-Event|New-EventLog|New-Item|New-ItemPrope|New-Module|New-ModuleMan|New-Object|New-PSDrive|New-PSSession|New-PSSession|New-Service|New-TimeSpan|New-Variable|New-WebServic|New-WSManInst|New-WSManSess|nmo|nsn|ogv|Out-Default|Out-File|Out-GridView|Out-Host|Out-Null|Out-Printer|Out-String|popd|Pop-Location|prompt|pushd|Push-Location|pwd|rbp|rcjb|rdr|Read-Host|Receive-Job|Register-Engi|Register-Obje|Register-PSSe|Register-WmiE|Remove-Comput|Remove-Event|Remove-EventL|Remove-Item|Remove-ItemPr|Remove-Job|Remove-Module|Remove-PSBrea|Remove-PSDriv|Remove-PSSess|Remove-PSSnap|Remove-Variab|Remove-WmiObj|Remove-WSManI|ren|Rename-Item|Rename-ItemPr|Reset-Compute|Resolve-Path|Restart-Compu|Restart-Servi|Restore-Compu|Resume-Servic|rjb|rmdir|rmo|rni|rnp|rsn|rsnp|rvpa|rwmi|sajb|sal|saps|sasv|sbp|select|Select-Object|Select-String|Select-Xml|Send-MailMess|set|Set-Acl|Set-Alias|Set-Authentic|Set-Content|Set-Date|Set-Execution|Set-Item|Set-ItemPrope|Set-Location|Set-PSBreakpo|Set-PSDebug|Set-PSSession|Set-Service|Set-StrictMod|Set-TraceSour|Set-Variable|Set-WmiInstan|Set-WSManInst|Set-WSManQuic|Show-EventLog|sleep|sort|Sort-Object|spjb|Split-Path|spps|spsv|start|Start-Job|Start-Process|Start-Service|Start-Sleep|Start-Transac|Start-Transcr|Stop-Computer|Stop-Job|Stop-Process|Stop-Service|Stop-Transcri|Suspend-Servi|swmi|TabExpansion|tee|Tee-Object|Test-Computer|Test-Connecti|Test-ModuleMa|Test-Path|Test-WSMan|Trace-Command|type|Undo-Transact|Unregister-Ev|Unregister-PS|Update-Format|Update-List|Update-TypeDa|Use-Transacti|Wait-Event|Wait-Job|Wait-Process|where|Where-Object|wjb|write|Write-Debug|Write-Error|Write-EventLo|Write-Host|Write-Output|Write-Progres|Write-Verbose|Write-Warning|Invoke-Expression)\>"
## Functions
icolor brightyellow "\<function\>"
## Paramters
icolor brightyellow "\<param\>"
## Comparison operators
icolor brightyellow "-\<(eq|ne|gt|lt|ge|le)\>"
## Variables
icolor brightred "\$[a-zA-Z0-9_]+"
## Major statements
icolor brightcyan "\<(if|do|else|elseif|for|foreach|switch|until|while|throw)\>"
## Comments
color brightblue "#.*$"
color brightblue start="<#" end="#>"
## Quoted text
color brightwhite "\"[^\"]*\""
color brightwhite "'[^']*'"
## Text between %'s which is unique to searches
icolor brightmagenta "\%[^\%]*\%"
## Text between ['s
icolor brightmagenta "\[[^\%]*\]"
## Trailing whitespace
color ,green "[[:space:]]+$"
## Match any powershell command conforming to the allowed verbs list
icolor cyan "Get-[a-zA-Z0-9_]+"
icolor cyan "Add-[a-zA-Z0-9_]+"
icolor cyan "Clear-[a-zA-Z0-9_]+"
icolor cyan "Close-[a-zA-Z0-9_]+"
icolor cyan "Copy-[a-zA-Z0-9_]+"
icolor cyan "Enter-[a-zA-Z0-9_]+"
icolor cyan "Exit-[a-zA-Z0-9_]+"
icolor cyan "Find-[a-zA-Z0-9_]+"
icolor cyan "Format-[a-zA-Z0-9_]+"
icolor cyan "Get-[a-zA-Z0-9_]+"
icolor cyan "Hide-[a-zA-Z0-9_]+"
icolor cyan "Join-[a-zA-Z0-9_]+"
icolor cyan "Lock-[a-zA-Z0-9_]+"
icolor cyan "Move-[a-zA-Z0-9_]+"
icolor cyan "New-[a-zA-Z0-9_]+"
icolor cyan "Open-[a-zA-Z0-9_]+"
icolor cyan "Optimize-[a-zA-Z0-9_]+"
icolor cyan "Push-[a-zA-Z0-9_]+"
icolor cyan "Pop-[a-zA-Z0-9_]+"
icolor cyan "Redo-[a-zA-Z0-9_]+"
icolor cyan "Remove-[a-zA-Z0-9_]+"
icolor cyan "Rename-[a-zA-Z0-9_]+"
icolor cyan "Reset-[a-zA-Z0-9_]+"
icolor cyan "Resize-[a-zA-Z0-9_]+"
icolor cyan "Search-[a-zA-Z0-9_]+"
icolor cyan "Select-[a-zA-Z0-9_]+"
icolor cyan "Set-[a-zA-Z0-9_]+"
icolor cyan "Show-[a-zA-Z0-9_]+"
icolor cyan "Skip-[a-zA-Z0-9_]+"
icolor cyan "Split-[a-zA-Z0-9_]+"
icolor cyan "Step-[a-zA-Z0-9_]+"
icolor cyan "Switch-[a-zA-Z0-9_]+"
icolor cyan "Undo-[a-zA-Z0-9_]+"
icolor cyan "Unlock-[a-zA-Z0-9_]+"
icolor cyan "Watch-[a-zA-Z0-9_]+"
icolor cyan "Connect-[a-zA-Z0-9_]+"
icolor cyan "Disconnect-[a-zA-Z0-9_]+"
icolor cyan "Read-[a-zA-Z0-9_]+"
icolor cyan "Receive-[a-zA-Z0-9_]+"
icolor cyan "Send-[a-zA-Z0-9_]+"
icolor cyan "Write-[a-zA-Z0-9_]+"
icolor cyan "Backup-[a-zA-Z0-9_]+"
icolor cyan "Checkpoint-[a-zA-Z0-9_]+"
icolor cyan "Compare-[a-zA-Z0-9_]+"
icolor cyan "Compress-[a-zA-Z0-9_]+"
icolor cyan "Convert-[a-zA-Z0-9_]+"
icolor cyan "ConvertFrom-[a-zA-Z0-9_]+"
icolor cyan "ConvertTo-[a-zA-Z0-9_]+"
icolor cyan "Dismount-[a-zA-Z0-9_]+"
icolor cyan "Edit-[a-zA-Z0-9_]+"
icolor cyan "Expand-[a-zA-Z0-9_]+"
icolor cyan "Export-[a-zA-Z0-9_]+"
icolor cyan "Group-[a-zA-Z0-9_]+"
icolor cyan "Import-[a-zA-Z0-9_]+"
icolor cyan "Initialize-[a-zA-Z0-9_]+"
icolor cyan "Limit-[a-zA-Z0-9_]+"
icolor cyan "Merge-[a-zA-Z0-9_]+"
icolor cyan "Mount-[a-zA-Z0-9_]+"
icolor cyan "Out-[a-zA-Z0-9_]+"
icolor cyan "Publish-[a-zA-Z0-9_]+"
icolor cyan "Restore-[a-zA-Z0-9_]+"
icolor cyan "Save-[a-zA-Z0-9_]+"
icolor cyan "Sync-[a-zA-Z0-9_]+"
icolor cyan "Unpublish-[a-zA-Z0-9_]+"
icolor cyan "Update-[a-zA-Z0-9_]+"
icolor cyan "Debug-[a-zA-Z0-9_]+"
icolor cyan "Measure-[a-zA-Z0-9_]+"
icolor cyan "Ping-[a-zA-Z0-9_]+"
icolor cyan "Repair-[a-zA-Z0-9_]+"
icolor cyan "Resolve-[a-zA-Z0-9_]+"
icolor cyan "Test-[a-zA-Z0-9_]+"
icolor cyan "Trace-[a-zA-Z0-9_]+"
icolor cyan "Approve-[a-zA-Z0-9_]+"
icolor cyan "Assert-[a-zA-Z0-9_]+"
icolor cyan "Build-[a-zA-Z0-9_]+"
icolor cyan "Complete-[a-zA-Z0-9_]+"
icolor cyan "Confirm-[a-zA-Z0-9_]+"
icolor cyan "Deny-[a-zA-Z0-9_]+"
icolor cyan "Deploy-[a-zA-Z0-9_]+"
icolor cyan "Disable-[a-zA-Z0-9_]+"
icolor cyan "Enable-[a-zA-Z0-9_]+"
icolor cyan "Install-[a-zA-Z0-9_]+"
icolor cyan "Invoke-[a-zA-Z0-9_]+"
icolor cyan "Register-[a-zA-Z0-9_]+"
icolor cyan "Request-[a-zA-Z0-9_]+"
icolor cyan "Restart-[a-zA-Z0-9_]+"
icolor cyan "Resume-[a-zA-Z0-9_]+"
icolor cyan "Start-[a-zA-Z0-9_]+"
icolor cyan "Stop-[a-zA-Z0-9_]+"
icolor cyan "Submit-[a-zA-Z0-9_]+"
icolor cyan "Suspend-[a-zA-Z0-9_]+"
icolor cyan "Uninstall-[a-zA-Z0-9_]+"
icolor cyan "Unregister-[a-zA-Z0-9_]+"
icolor cyan "Wait-[a-zA-Z0-9_]+"
icolor cyan "Use-[a-zA-Z0-9_]+"
icolor cyan "Block-[a-zA-Z0-9_]+"
icolor cyan "Grant-[a-zA-Z0-9_]+"
icolor cyan "Protect-[a-zA-Z0-9_]+"
icolor cyan "Revoke-[a-zA-Z0-9_]+"
icolor cyan "Unblock-[a-zA-Z0-9_]+"
icolor cyan "Unprotect-[a-zA-Z0-9_]+"