powershell = {}

function powershell.get_keywords()
  local keywords0_set = "Add-Computer Add-Content Add-History Add-JobTrigger Add-LocalGroupMember Add-Member Add-PSSnapin Add-Type Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item Clear-ItemProperty Clear-RecycleBin Clear-Variable Compare-Object Complete-Transaction Compress-Archive Connect-PSSession Connect-WSMan Convert-Path Convert-String ConvertFrom-Csv ConvertFrom-Json ConvertFrom-Markdown ConvertFrom-SddlString ConvertFrom-SecureString ConvertFrom-String ConvertFrom-StringData ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString ConvertTo-Xml Copy-Item Copy-ItemProperty Debug-Job Debug-Process Debug-Runspace Disable-ComputerRestore Disable-ExperimentalFeature Disable-JobTrigger Disable-LocalUser Disable-PSBreakpoint Disable-PSRemoting Disable-PSSessionConfiguration Disable-PSTrace Disable-PSWSManCombinedTrace Disable-RunspaceDebug Disable-ScheduledJob Disable-WSManCredSSP Disable-WSManTrace Disconnect-PSSession Disconnect-WSMan Enable-ComputerRestore Enable-ExperimentalFeature Enable-JobTrigger Enable-LocalUser Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration Enable-PSTrace Enable-PSWSManCombinedTrace Enable-RunspaceDebug Enable-ScheduledJob Enable-WSManCredSSP Enable-WSManTrace Enter-PSHostProcess Enter-PSSession Exit-PSHostProcess Exit-PSSession Expand-Archive Export-Alias Export-BinaryMiLog Export-Clixml Export-Console Export-Counter Export-Csv Export-FormatData Export-ModuleMember Export-ODataEndpointProxy Export-PSSession Find-Command Find-DscResource Find-Module Find-Package Find-PackageProvider Find-RoleCapability Find-Script ForEach-Object Format-Custom Format-Hex Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-CimAssociatedInstance Get-CimClass Get-CimInstance Get-CimSession Get-Clipboard Get-CmsMessage Get-Command Get-ComputerInfo Get-ComputerRestorePoint Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date Get-Error Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-ExperimentalFeature Get-FileHash Get-FormatData Get-Help Get-History Get-Host Get-HotFix Get-InstalledModule Get-InstalledScript Get-Item Get-ItemProperty Get-ItemPropertyValue Get-Job Get-JobTrigger Get-LocalGroup Get-LocalGroupMember Get-LocalUser Get-Location Get-LogProperties Get-MarkdownOption Get-Member Get-Module Get-OperationValidation Get-Package Get-PackageProvider Get-PackageSource Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive Get-PSHostProcessInfo Get-PSProvider Get-PSReadLineKeyHandler Get-PSReadLineOption Get-PSRepository Get-PSSession Get-PSSessionCapability Get-PSSessionConfiguration Get-PSSnapin Get-PSSubsystem Get-Random Get-Runspace Get-RunspaceDebug Get-ScheduledJob Get-ScheduledJobOption Get-Service Get-TimeZone Get-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Uptime Get-Variable Get-Verb Get-WinEvent Get-WmiObject Get-WSManCredSSP Get-WSManInstance Group-Object Import-Alias Import-BinaryMiLog Import-Clixml Import-Counter Import-Csv Import-LocalizedData Import-Module Import-PackageProvider Import-PowerShellDataFile Import-PSSession Install-Module Install-Package Install-PackageProvider Install-Script Invoke-AsWorkflow Invoke-CimMethod Invoke-Command Invoke-Expression Invoke-History Invoke-Item Invoke-OperationValidation Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod Invoke-WSManAction Join-Path Join-String Limit-EventLog Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-CimInstance New-CimSession New-CimSessionOption New-Event New-EventLog New-FileCatalog New-Guid New-Item New-ItemProperty New-JobTrigger New-LocalGroup New-LocalUser New-Module New-ModuleManifest New-Object New-PSDrive New-PSRoleCapabilityFile New-PSSession New-PSSessionConfigurationFile New-PSSessionOption New-PSTransportOption New-PSWorkflowExecutionOption New-PSWorkflowSession New-ScheduledJobOption New-ScriptFileInfo New-Service New-TemporaryFile New-TimeSpan New-Variable New-WebServiceProxy New-WinEvent New-WSManInstance New-WSManSessionOption Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String Pop-Location Protect-CmsMessage PSConsoleHostReadLine Publish-Module Publish-Script Push-Location Read-Host Receive-Job Receive-PSSession Register-ArgumentCompleter Register-CimIndicationEvent Register-EngineEvent Register-ObjectEvent Register-PackageSource Register-PSRepository Register-PSSessionConfiguration Register-ScheduledJob Register-WmiEvent Remove-Alias Remove-CimInstance Remove-CimSession Remove-Computer Remove-Event Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-JobTrigger Remove-LocalGroup Remove-LocalGroupMember Remove-LocalUser Remove-Module Remove-PSBreakpoint Remove-PSDrive Remove-PSReadLineKeyHandler Remove-PSSession Remove-PSSnapin Remove-Service Remove-TypeData Remove-Variable Remove-WmiObject Remove-WSManInstance Rename-Computer Rename-Item Rename-ItemProperty Rename-LocalGroup Rename-LocalUser Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service Restore-Computer Resume-Job Resume-Service Save-Help Save-Module Save-Package Save-Script Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias Set-AuthenticodeSignature Set-CimInstance Set-Clipboard Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-JobTrigger Set-LocalGroup Set-LocalUser Set-Location Set-LogProperties Set-MarkdownOption Set-PackageSource Set-PSBreakpoint Set-PSDebug Set-PSReadLineKeyHandler Set-PSReadLineOption Set-PSRepository Set-PSSessionConfiguration Set-ScheduledJob Set-ScheduledJobOption Set-Service Set-StrictMode Set-TimeZone Set-TraceSource Set-Variable Set-WmiInstance Set-WSManInstance Set-WSManQuickConfig Show-Command Show-ControlPanelItem Show-EventLog Show-Markdown Sort-Object Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-ThreadJob Start-Trace Start-Transaction Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Trace Stop-Transcript Suspend-Job Suspend-Service Tee-Object Test-ComputerSecureChannel Test-Connection Test-FileCatalog Test-Json Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Test-ScriptFileInfo Test-WSMan Trace-Command Unblock-File Undo-Transaction Uninstall-Module Uninstall-Package Uninstall-Script Unprotect-CmsMessage Unregister-Event Unregister-PackageSource Unregister-PSRepository Unregister-PSSessionConfiguration Unregister-ScheduledJob Update-FormatData Update-Help Update-List Update-Module Update-ModuleManifest Update-Script Update-ScriptFileInfo Update-TypeData Use-Transaction Wait-Debugger Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog Write-Host Write-Information Write-Output Write-Progress Write-Verbose Write-Warning Description EndEegion Example ExternalHelp ForwardHelpCategory ForwardHelpTargetName Functionality Inputs Link Notes Outputs Parameter Region RemoteHelpRunspace Requires Role Synopsis default endregion global local region requires script"
  local keywords1_set = "assembly base begin break catch class clean command configuration continue data define do dynamicParam dynamicparam else elseif end enum exit filter finally for foreach from function hidden if in inlineScript inlinescript interface module namespace parallel param private process public return sequence static switch throw trap try type until using var while workflow adsi array bigint bool byte char cimclass datetime decimal double float guid hashtable int int16 int32 int64 ipaddress long mailaddress math ordered psobject psvariable ref regex runspace sbyte scriptblock short single string timespan uint uint16 uint32 uint64 ulong uri ushort version void wmi wmiclass xml"
  local keywords2_set = "ac asnp cat cd cfs chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h help history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mkdir mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh oss pause popd prompt ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm wget where wjb write Alias args ConfirmPreference ConsoleFileName DebugPreference EnabledExperimentalFeatures Env Error ErrorActionPreference ErrorView Event EventArgs EventSubscriber ExecutionContext false foreach FormatEnumerationLimit Function HOME Host InformationPreference input IsCoreCLR IsLinux IsMacOS IsWindows LastExitCode LogCommandHealthEvent LogCommandLifecycleEvent LogEngineHealthEvent LogEngineLifecycleEvent LogProviderHealthEvent LogProviderLifecycleEvent Matches MaximumHistoryCount MyInvocation NestedPromptLevel null OFS OutputEncoding PID PROFILE ProgressPreference PSBoundParameters PSCmdlet PSCommandPath PSCulture PSDebugContext PSDefaultParameterValues PSEdition PSEmailServer PSHOME PSItem PSModuleAutoLoadingPreference PSNativeCommandArgumentPassing PSScriptRoot PSSenderInfo PSSessionApplicationName PSSessionConfigurationName PSSessionOption PSStyle PSUICulture PSVersionTable PWD Sender ShellId StackTrace switch this Transcript true Variable VerbosePreference WarningPreference WhatIfPreference"
  return keywords0_set,keywords1_set,keywords2_set
end

function powershell.get_autocomplete()
  local autocomplete_set = "Add-Computer Add-Content Add-History Add-JobTrigger Add-LocalGroupMember Add-Member Add-PSSnapin Add-Type Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item Clear-ItemProperty Clear-RecycleBin Clear-Variable Compare-Object Complete-Transaction Compress-Archive Connect-PSSession Connect-WSMan Convert-Path Convert-String ConvertFrom-Csv ConvertFrom-Json ConvertFrom-Markdown ConvertFrom-SddlString ConvertFrom-SecureString ConvertFrom-String ConvertFrom-StringData ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString ConvertTo-Xml Copy-Item Copy-ItemProperty Debug-Job Debug-Process Debug-Runspace Disable-ComputerRestore Disable-ExperimentalFeature Disable-JobTrigger Disable-LocalUser Disable-PSBreakpoint Disable-PSRemoting Disable-PSSessionConfiguration Disable-PSTrace Disable-PSWSManCombinedTrace Disable-RunspaceDebug Disable-ScheduledJob Disable-WSManCredSSP Disable-WSManTrace Disconnect-PSSession Disconnect-WSMan Enable-ComputerRestore Enable-ExperimentalFeature Enable-JobTrigger Enable-LocalUser Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration Enable-PSTrace Enable-PSWSManCombinedTrace Enable-RunspaceDebug Enable-ScheduledJob Enable-WSManCredSSP Enable-WSManTrace Enter-PSHostProcess Enter-PSSession Exit-PSHostProcess Exit-PSSession Expand-Archive Export-Alias Export-BinaryMiLog Export-Clixml Export-Console Export-Counter Export-Csv Export-FormatData Export-ModuleMember Export-ODataEndpointProxy Export-PSSession Find-Command Find-DscResource Find-Module Find-Package Find-PackageProvider Find-RoleCapability Find-Script ForEach-Object Format-Custom Format-Hex Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-CimAssociatedInstance Get-CimClass Get-CimInstance Get-CimSession Get-Clipboard Get-CmsMessage Get-Command Get-ComputerInfo Get-ComputerRestorePoint Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date Get-Error Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-ExperimentalFeature Get-FileHash Get-FormatData Get-Help Get-History Get-Host Get-HotFix Get-InstalledModule Get-InstalledScript Get-Item Get-ItemProperty Get-ItemPropertyValue Get-Job Get-JobTrigger Get-LocalGroup Get-LocalGroupMember Get-LocalUser Get-Location Get-LogProperties Get-MarkdownOption Get-Member Get-Module Get-OperationValidation Get-Package Get-PackageProvider Get-PackageSource Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive Get-PSHostProcessInfo Get-PSProvider Get-PSReadLineKeyHandler Get-PSReadLineOption Get-PSRepository Get-PSSession Get-PSSessionCapability Get-PSSessionConfiguration Get-PSSnapin Get-PSSubsystem Get-Random Get-Runspace Get-RunspaceDebug Get-ScheduledJob Get-ScheduledJobOption Get-Service Get-TimeZone Get-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Uptime Get-Variable Get-Verb Get-WinEvent Get-WmiObject Get-WSManCredSSP Get-WSManInstance Group-Object Import-Alias Import-BinaryMiLog Import-Clixml Import-Counter Import-Csv Import-LocalizedData Import-Module Import-PackageProvider Import-PowerShellDataFile Import-PSSession Install-Module Install-Package Install-PackageProvider Install-Script Invoke-AsWorkflow Invoke-CimMethod Invoke-Command Invoke-Expression Invoke-History Invoke-Item Invoke-OperationValidation Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod Invoke-WSManAction Join-Path Join-String Limit-EventLog Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-CimInstance New-CimSession New-CimSessionOption New-Event New-EventLog New-FileCatalog New-Guid New-Item New-ItemProperty New-JobTrigger New-LocalGroup New-LocalUser New-Module New-ModuleManifest New-Object New-PSDrive New-PSRoleCapabilityFile New-PSSession New-PSSessionConfigurationFile New-PSSessionOption New-PSTransportOption New-PSWorkflowExecutionOption New-PSWorkflowSession New-ScheduledJobOption New-ScriptFileInfo New-Service New-TemporaryFile New-TimeSpan New-Variable New-WebServiceProxy New-WinEvent New-WSManInstance New-WSManSessionOption Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String Pop-Location Protect-CmsMessage PSConsoleHostReadLine Publish-Module Publish-Script Push-Location Read-Host Receive-Job Receive-PSSession Register-ArgumentCompleter Register-CimIndicationEvent Register-EngineEvent Register-ObjectEvent Register-PackageSource Register-PSRepository Register-PSSessionConfiguration Register-ScheduledJob Register-WmiEvent Remove-Alias Remove-CimInstance Remove-CimSession Remove-Computer Remove-Event Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-JobTrigger Remove-LocalGroup Remove-LocalGroupMember Remove-LocalUser Remove-Module Remove-PSBreakpoint Remove-PSDrive Remove-PSReadLineKeyHandler Remove-PSSession Remove-PSSnapin Remove-Service Remove-TypeData Remove-Variable Remove-WmiObject Remove-WSManInstance Rename-Computer Rename-Item Rename-ItemProperty Rename-LocalGroup Rename-LocalUser Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service Restore-Computer Resume-Job Resume-Service Save-Help Save-Module Save-Package Save-Script Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias Set-AuthenticodeSignature Set-CimInstance Set-Clipboard Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-JobTrigger Set-LocalGroup Set-LocalUser Set-Location Set-LogProperties Set-MarkdownOption Set-PackageSource Set-PSBreakpoint Set-PSDebug Set-PSReadLineKeyHandler Set-PSReadLineOption Set-PSRepository Set-PSSessionConfiguration Set-ScheduledJob Set-ScheduledJobOption Set-Service Set-StrictMode Set-TimeZone Set-TraceSource Set-Variable Set-WmiInstance Set-WSManInstance Set-WSManQuickConfig Show-Command Show-ControlPanelItem Show-EventLog Show-Markdown Sort-Object Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-ThreadJob Start-Trace Start-Transaction Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Trace Stop-Transcript Suspend-Job Suspend-Service Tee-Object Test-ComputerSecureChannel Test-Connection Test-FileCatalog Test-Json Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Test-ScriptFileInfo Test-WSMan Trace-Command Unblock-File Undo-Transaction Uninstall-Module Uninstall-Package Uninstall-Script Unprotect-CmsMessage Unregister-Event Unregister-PackageSource Unregister-PSRepository Unregister-PSSessionConfiguration Unregister-ScheduledJob Update-FormatData Update-Help Update-List Update-Module Update-ModuleManifest Update-Script Update-ScriptFileInfo Update-TypeData Use-Transaction Wait-Debugger Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog Write-Host Write-Information Write-Output Write-Progress Write-Verbose Write-Warning Description EndEegion Example ExternalHelp ForwardHelpCategory ForwardHelpTargetName Functionality Inputs Link Notes Outputs Parameter Region RemoteHelpRunspace Requires Role Synopsis default endregion global local region requires script assembly base begin break catch class clean command configuration continue data define do dynamicParam dynamicparam else elseif end enum exit filter finally for foreach from function hidden if in inlineScript inlinescript interface module namespace parallel param private process public return sequence static switch throw trap try type until using var while workflow adsi array bigint bool byte char cimclass datetime decimal double float guid hashtable int int16 int32 int64 ipaddress long mailaddress math ordered psobject psvariable ref regex runspace sbyte scriptblock short single string timespan uint uint16 uint32 uint64 ulong uri ushort version void wmi wmiclass xml ac asnp cat cd cfs chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h help history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mkdir mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh oss pause popd prompt ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm wget where wjb write Alias args ConfirmPreference ConsoleFileName DebugPreference EnabledExperimentalFeatures Env Error ErrorActionPreference ErrorView Event EventArgs EventSubscriber ExecutionContext false foreach FormatEnumerationLimit Function HOME Host InformationPreference input IsCoreCLR IsLinux IsMacOS IsWindows LastExitCode LogCommandHealthEvent LogCommandLifecycleEvent LogEngineHealthEvent LogEngineLifecycleEvent LogProviderHealthEvent LogProviderLifecycleEvent Matches MaximumHistoryCount MyInvocation NestedPromptLevel null OFS OutputEncoding PID PROFILE ProgressPreference PSBoundParameters PSCmdlet PSCommandPath PSCulture PSDebugContext PSDefaultParameterValues PSEdition PSEmailServer PSHOME PSItem PSModuleAutoLoadingPreference PSNativeCommandArgumentPassing PSScriptRoot PSSenderInfo PSSessionApplicationName PSSessionConfigurationName PSSessionOption PSStyle PSUICulture PSVersionTable PWD Sender ShellId StackTrace switch this Transcript true Variable VerbosePreference WarningPreference WhatIfPreference"
  return autocomplete_set
end

function powershell.get_reqular()
  local symbol_reqular_exp = "^\\s*(?:function|filter)\\s+(.+?)\\s*[\\({\\r\\n]"
  return symbol_reqular_exp
end

function powershell.create_bakup(path)
  local m_code = {
    "user_powershell = {}\n",
    "function user_powershell.get_keywords()\n",
    "  local keywords0_set = \"Add-Computer Add-Content Add-History Add-JobTrigger Add-LocalGroupMember Add-Member Add-PSSnapin Add-Type Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item Clear-ItemProperty Clear-RecycleBin Clear-Variable Compare-Object Complete-Transaction Compress-Archive Connect-PSSession Connect-WSMan Convert-Path Convert-String ConvertFrom-Csv ConvertFrom-Json ConvertFrom-Markdown ConvertFrom-SddlString ConvertFrom-SecureString ConvertFrom-String ConvertFrom-StringData ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString ConvertTo-Xml Copy-Item Copy-ItemProperty Debug-Job Debug-Process Debug-Runspace Disable-ComputerRestore Disable-ExperimentalFeature Disable-JobTrigger Disable-LocalUser Disable-PSBreakpoint Disable-PSRemoting Disable-PSSessionConfiguration Disable-PSTrace Disable-PSWSManCombinedTrace Disable-RunspaceDebug Disable-ScheduledJob Disable-WSManCredSSP Disable-WSManTrace Disconnect-PSSession Disconnect-WSMan Enable-ComputerRestore Enable-ExperimentalFeature Enable-JobTrigger Enable-LocalUser Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration Enable-PSTrace Enable-PSWSManCombinedTrace Enable-RunspaceDebug Enable-ScheduledJob Enable-WSManCredSSP Enable-WSManTrace Enter-PSHostProcess Enter-PSSession Exit-PSHostProcess Exit-PSSession Expand-Archive Export-Alias Export-BinaryMiLog Export-Clixml Export-Console Export-Counter Export-Csv Export-FormatData Export-ModuleMember Export-ODataEndpointProxy Export-PSSession Find-Command Find-DscResource Find-Module Find-Package Find-PackageProvider Find-RoleCapability Find-Script ForEach-Object Format-Custom Format-Hex Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-CimAssociatedInstance Get-CimClass Get-CimInstance Get-CimSession Get-Clipboard Get-CmsMessage Get-Command Get-ComputerInfo Get-ComputerRestorePoint Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date Get-Error Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-ExperimentalFeature Get-FileHash Get-FormatData Get-Help Get-History Get-Host Get-HotFix Get-InstalledModule Get-InstalledScript Get-Item Get-ItemProperty Get-ItemPropertyValue Get-Job Get-JobTrigger Get-LocalGroup Get-LocalGroupMember Get-LocalUser Get-Location Get-LogProperties Get-MarkdownOption Get-Member Get-Module Get-OperationValidation Get-Package Get-PackageProvider Get-PackageSource Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive Get-PSHostProcessInfo Get-PSProvider Get-PSReadLineKeyHandler Get-PSReadLineOption Get-PSRepository Get-PSSession Get-PSSessionCapability Get-PSSessionConfiguration Get-PSSnapin Get-PSSubsystem Get-Random Get-Runspace Get-RunspaceDebug Get-ScheduledJob Get-ScheduledJobOption Get-Service Get-TimeZone Get-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Uptime Get-Variable Get-Verb Get-WinEvent Get-WmiObject Get-WSManCredSSP Get-WSManInstance Group-Object Import-Alias Import-BinaryMiLog Import-Clixml Import-Counter Import-Csv Import-LocalizedData Import-Module Import-PackageProvider Import-PowerShellDataFile Import-PSSession Install-Module Install-Package Install-PackageProvider Install-Script Invoke-AsWorkflow Invoke-CimMethod Invoke-Command Invoke-Expression Invoke-History Invoke-Item Invoke-OperationValidation Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod Invoke-WSManAction Join-Path Join-String Limit-EventLog Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-CimInstance New-CimSession New-CimSessionOption New-Event New-EventLog New-FileCatalog New-Guid New-Item New-ItemProperty New-JobTrigger New-LocalGroup New-LocalUser New-Module New-ModuleManifest New-Object New-PSDrive New-PSRoleCapabilityFile New-PSSession New-PSSessionConfigurationFile New-PSSessionOption New-PSTransportOption New-PSWorkflowExecutionOption New-PSWorkflowSession New-ScheduledJobOption New-ScriptFileInfo New-Service New-TemporaryFile New-TimeSpan New-Variable New-WebServiceProxy New-WinEvent New-WSManInstance New-WSManSessionOption Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String Pop-Location Protect-CmsMessage PSConsoleHostReadLine Publish-Module Publish-Script Push-Location Read-Host Receive-Job Receive-PSSession Register-ArgumentCompleter Register-CimIndicationEvent Register-EngineEvent Register-ObjectEvent Register-PackageSource Register-PSRepository Register-PSSessionConfiguration Register-ScheduledJob Register-WmiEvent Remove-Alias Remove-CimInstance Remove-CimSession Remove-Computer Remove-Event Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-JobTrigger Remove-LocalGroup Remove-LocalGroupMember Remove-LocalUser Remove-Module Remove-PSBreakpoint Remove-PSDrive Remove-PSReadLineKeyHandler Remove-PSSession Remove-PSSnapin Remove-Service Remove-TypeData Remove-Variable Remove-WmiObject Remove-WSManInstance Rename-Computer Rename-Item Rename-ItemProperty Rename-LocalGroup Rename-LocalUser Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service Restore-Computer Resume-Job Resume-Service Save-Help Save-Module Save-Package Save-Script Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias Set-AuthenticodeSignature Set-CimInstance Set-Clipboard Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-JobTrigger Set-LocalGroup Set-LocalUser Set-Location Set-LogProperties Set-MarkdownOption Set-PackageSource Set-PSBreakpoint Set-PSDebug Set-PSReadLineKeyHandler Set-PSReadLineOption Set-PSRepository Set-PSSessionConfiguration Set-ScheduledJob Set-ScheduledJobOption Set-Service Set-StrictMode Set-TimeZone Set-TraceSource Set-Variable Set-WmiInstance Set-WSManInstance Set-WSManQuickConfig Show-Command Show-ControlPanelItem Show-EventLog Show-Markdown Sort-Object Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-ThreadJob Start-Trace Start-Transaction Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Trace Stop-Transcript Suspend-Job Suspend-Service Tee-Object Test-ComputerSecureChannel Test-Connection Test-FileCatalog Test-Json Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Test-ScriptFileInfo Test-WSMan Trace-Command Unblock-File Undo-Transaction Uninstall-Module Uninstall-Package Uninstall-Script Unprotect-CmsMessage Unregister-Event Unregister-PackageSource Unregister-PSRepository Unregister-PSSessionConfiguration Unregister-ScheduledJob Update-FormatData Update-Help Update-List Update-Module Update-ModuleManifest Update-Script Update-ScriptFileInfo Update-TypeData Use-Transaction Wait-Debugger Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog Write-Host Write-Information Write-Output Write-Progress Write-Verbose Write-Warning Description EndEegion Example ExternalHelp ForwardHelpCategory ForwardHelpTargetName Functionality Inputs Link Notes Outputs Parameter Region RemoteHelpRunspace Requires Role Synopsis default endregion global local region requires script\"\n",
    "  local keywords1_set = \"assembly base begin break catch class clean command configuration continue data define do dynamicParam dynamicparam else elseif end enum exit filter finally for foreach from function hidden if in inlineScript inlinescript interface module namespace parallel param private process public return sequence static switch throw trap try type until using var while workflow adsi array bigint bool byte char cimclass datetime decimal double float guid hashtable int int16 int32 int64 ipaddress long mailaddress math ordered psobject psvariable ref regex runspace sbyte scriptblock short single string timespan uint uint16 uint32 uint64 ulong uri ushort version void wmi wmiclass xml\"\n",
    "  local keywords2_set = \"ac asnp cat cd cfs chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h help history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mkdir mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh oss pause popd prompt ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm wget where wjb write Alias args ConfirmPreference ConsoleFileName DebugPreference EnabledExperimentalFeatures Env Error ErrorActionPreference ErrorView Event EventArgs EventSubscriber ExecutionContext false foreach FormatEnumerationLimit Function HOME Host InformationPreference input IsCoreCLR IsLinux IsMacOS IsWindows LastExitCode LogCommandHealthEvent LogCommandLifecycleEvent LogEngineHealthEvent LogEngineLifecycleEvent LogProviderHealthEvent LogProviderLifecycleEvent Matches MaximumHistoryCount MyInvocation NestedPromptLevel null OFS OutputEncoding PID PROFILE ProgressPreference PSBoundParameters PSCmdlet PSCommandPath PSCulture PSDebugContext PSDefaultParameterValues PSEdition PSEmailServer PSHOME PSItem PSModuleAutoLoadingPreference PSNativeCommandArgumentPassing PSScriptRoot PSSenderInfo PSSessionApplicationName PSSessionConfigurationName PSSessionOption PSStyle PSUICulture PSVersionTable PWD Sender ShellId StackTrace switch this Transcript true Variable VerbosePreference WarningPreference WhatIfPreference\"\n",
    "  return keywords0_set,keywords1_set,keywords2_set\n",
    "end\n",
    "\n",
    "function user_powershell.get_autocomplete()\n",
    "  local autocomplete_set = \"Add-Computer Add-Content Add-History Add-JobTrigger Add-LocalGroupMember Add-Member Add-PSSnapin Add-Type Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item Clear-ItemProperty Clear-RecycleBin Clear-Variable Compare-Object Complete-Transaction Compress-Archive Connect-PSSession Connect-WSMan Convert-Path Convert-String ConvertFrom-Csv ConvertFrom-Json ConvertFrom-Markdown ConvertFrom-SddlString ConvertFrom-SecureString ConvertFrom-String ConvertFrom-StringData ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString ConvertTo-Xml Copy-Item Copy-ItemProperty Debug-Job Debug-Process Debug-Runspace Disable-ComputerRestore Disable-ExperimentalFeature Disable-JobTrigger Disable-LocalUser Disable-PSBreakpoint Disable-PSRemoting Disable-PSSessionConfiguration Disable-PSTrace Disable-PSWSManCombinedTrace Disable-RunspaceDebug Disable-ScheduledJob Disable-WSManCredSSP Disable-WSManTrace Disconnect-PSSession Disconnect-WSMan Enable-ComputerRestore Enable-ExperimentalFeature Enable-JobTrigger Enable-LocalUser Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration Enable-PSTrace Enable-PSWSManCombinedTrace Enable-RunspaceDebug Enable-ScheduledJob Enable-WSManCredSSP Enable-WSManTrace Enter-PSHostProcess Enter-PSSession Exit-PSHostProcess Exit-PSSession Expand-Archive Export-Alias Export-BinaryMiLog Export-Clixml Export-Console Export-Counter Export-Csv Export-FormatData Export-ModuleMember Export-ODataEndpointProxy Export-PSSession Find-Command Find-DscResource Find-Module Find-Package Find-PackageProvider Find-RoleCapability Find-Script ForEach-Object Format-Custom Format-Hex Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-CimAssociatedInstance Get-CimClass Get-CimInstance Get-CimSession Get-Clipboard Get-CmsMessage Get-Command Get-ComputerInfo Get-ComputerRestorePoint Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date Get-Error Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-ExperimentalFeature Get-FileHash Get-FormatData Get-Help Get-History Get-Host Get-HotFix Get-InstalledModule Get-InstalledScript Get-Item Get-ItemProperty Get-ItemPropertyValue Get-Job Get-JobTrigger Get-LocalGroup Get-LocalGroupMember Get-LocalUser Get-Location Get-LogProperties Get-MarkdownOption Get-Member Get-Module Get-OperationValidation Get-Package Get-PackageProvider Get-PackageSource Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive Get-PSHostProcessInfo Get-PSProvider Get-PSReadLineKeyHandler Get-PSReadLineOption Get-PSRepository Get-PSSession Get-PSSessionCapability Get-PSSessionConfiguration Get-PSSnapin Get-PSSubsystem Get-Random Get-Runspace Get-RunspaceDebug Get-ScheduledJob Get-ScheduledJobOption Get-Service Get-TimeZone Get-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Uptime Get-Variable Get-Verb Get-WinEvent Get-WmiObject Get-WSManCredSSP Get-WSManInstance Group-Object Import-Alias Import-BinaryMiLog Import-Clixml Import-Counter Import-Csv Import-LocalizedData Import-Module Import-PackageProvider Import-PowerShellDataFile Import-PSSession Install-Module Install-Package Install-PackageProvider Install-Script Invoke-AsWorkflow Invoke-CimMethod Invoke-Command Invoke-Expression Invoke-History Invoke-Item Invoke-OperationValidation Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod Invoke-WSManAction Join-Path Join-String Limit-EventLog Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-CimInstance New-CimSession New-CimSessionOption New-Event New-EventLog New-FileCatalog New-Guid New-Item New-ItemProperty New-JobTrigger New-LocalGroup New-LocalUser New-Module New-ModuleManifest New-Object New-PSDrive New-PSRoleCapabilityFile New-PSSession New-PSSessionConfigurationFile New-PSSessionOption New-PSTransportOption New-PSWorkflowExecutionOption New-PSWorkflowSession New-ScheduledJobOption New-ScriptFileInfo New-Service New-TemporaryFile New-TimeSpan New-Variable New-WebServiceProxy New-WinEvent New-WSManInstance New-WSManSessionOption Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String Pop-Location Protect-CmsMessage PSConsoleHostReadLine Publish-Module Publish-Script Push-Location Read-Host Receive-Job Receive-PSSession Register-ArgumentCompleter Register-CimIndicationEvent Register-EngineEvent Register-ObjectEvent Register-PackageSource Register-PSRepository Register-PSSessionConfiguration Register-ScheduledJob Register-WmiEvent Remove-Alias Remove-CimInstance Remove-CimSession Remove-Computer Remove-Event Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-JobTrigger Remove-LocalGroup Remove-LocalGroupMember Remove-LocalUser Remove-Module Remove-PSBreakpoint Remove-PSDrive Remove-PSReadLineKeyHandler Remove-PSSession Remove-PSSnapin Remove-Service Remove-TypeData Remove-Variable Remove-WmiObject Remove-WSManInstance Rename-Computer Rename-Item Rename-ItemProperty Rename-LocalGroup Rename-LocalUser Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service Restore-Computer Resume-Job Resume-Service Save-Help Save-Module Save-Package Save-Script Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias Set-AuthenticodeSignature Set-CimInstance Set-Clipboard Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-JobTrigger Set-LocalGroup Set-LocalUser Set-Location Set-LogProperties Set-MarkdownOption Set-PackageSource Set-PSBreakpoint Set-PSDebug Set-PSReadLineKeyHandler Set-PSReadLineOption Set-PSRepository Set-PSSessionConfiguration Set-ScheduledJob Set-ScheduledJobOption Set-Service Set-StrictMode Set-TimeZone Set-TraceSource Set-Variable Set-WmiInstance Set-WSManInstance Set-WSManQuickConfig Show-Command Show-ControlPanelItem Show-EventLog Show-Markdown Sort-Object Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-ThreadJob Start-Trace Start-Transaction Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Trace Stop-Transcript Suspend-Job Suspend-Service Tee-Object Test-ComputerSecureChannel Test-Connection Test-FileCatalog Test-Json Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Test-ScriptFileInfo Test-WSMan Trace-Command Unblock-File Undo-Transaction Uninstall-Module Uninstall-Package Uninstall-Script Unprotect-CmsMessage Unregister-Event Unregister-PackageSource Unregister-PSRepository Unregister-PSSessionConfiguration Unregister-ScheduledJob Update-FormatData Update-Help Update-List Update-Module Update-ModuleManifest Update-Script Update-ScriptFileInfo Update-TypeData Use-Transaction Wait-Debugger Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog Write-Host Write-Information Write-Output Write-Progress Write-Verbose Write-Warning Description EndEegion Example ExternalHelp ForwardHelpCategory ForwardHelpTargetName Functionality Inputs Link Notes Outputs Parameter Region RemoteHelpRunspace Requires Role Synopsis default endregion global local region requires script assembly base begin break catch class clean command configuration continue data define do dynamicParam dynamicparam else elseif end enum exit filter finally for foreach from function hidden if in inlineScript inlinescript interface module namespace parallel param private process public return sequence static switch throw trap try type until using var while workflow adsi array bigint bool byte char cimclass datetime decimal double float guid hashtable int int16 int32 int64 ipaddress long mailaddress math ordered psobject psvariable ref regex runspace sbyte scriptblock short single string timespan uint uint16 uint32 uint64 ulong uri ushort version void wmi wmiclass xml ac asnp cat cd cfs chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h help history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mkdir mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh oss pause popd prompt ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm wget where wjb write Alias args ConfirmPreference ConsoleFileName DebugPreference EnabledExperimentalFeatures Env Error ErrorActionPreference ErrorView Event EventArgs EventSubscriber ExecutionContext false foreach FormatEnumerationLimit Function HOME Host InformationPreference input IsCoreCLR IsLinux IsMacOS IsWindows LastExitCode LogCommandHealthEvent LogCommandLifecycleEvent LogEngineHealthEvent LogEngineLifecycleEvent LogProviderHealthEvent LogProviderLifecycleEvent Matches MaximumHistoryCount MyInvocation NestedPromptLevel null OFS OutputEncoding PID PROFILE ProgressPreference PSBoundParameters PSCmdlet PSCommandPath PSCulture PSDebugContext PSDefaultParameterValues PSEdition PSEmailServer PSHOME PSItem PSModuleAutoLoadingPreference PSNativeCommandArgumentPassing PSScriptRoot PSSenderInfo PSSessionApplicationName PSSessionConfigurationName PSSessionOption PSStyle PSUICulture PSVersionTable PWD Sender ShellId StackTrace switch this Transcript true Variable VerbosePreference WarningPreference WhatIfPreference\"\n",
    "  return autocomplete_set\n",
    "end\n",
    "\n",
    "function user_powershell.get_reqular()\n",
    "  local symbol_reqular_exp = \"^\\\\s*(?:function|filter)\\\\s+(.+?)\\\\s*[\\\\({\\\\r\\\\n]\"\n",
    "  return symbol_reqular_exp\n",
    "end\n",
    "return user_powershell",
  }
  local powershell_code = table.concat(m_code)
  eu_core.save_file(path, powershell_code)
  powershell_code = nil
  m_code = nil
end

return powershell