Menu

PowerShell support

2009-06-09
2012-11-13
  • Nissim Salinas

    Nissim Salinas - 2009-06-09

    Microsoft has this new shell language. See: http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx

    I'm attaching the PowerShell language stuff below, with the hope that this would facilitate the creation of a PowerShell lexer for Notepad++.

    Reserved Words

    $_ $? & begin break case default do else elseif end exit filter for foreach function if param
    process prompt return switch then throw trap until while

    Built-in Functions

    Add-Content
    Add-History
    Add-Member
    Add-PSSnapin
    Clear-Content
    Clear-Item
    Clear-ItemProperty
    Clear-Variable
    Compare-Object
    ConvertFrom-SecureString
    Convert-Path
    ConvertTo-Html
    ConvertTo-SecureString
    Copy-Item
    Copy-ItemProperty
    Export-Alias
    Export-Clixml
    Export-Console
    Export-Csv
    ForEach-Object
    Format-Custom
    Format-List
    Format-Table
    Format-Wide
    Get-Acl
    Get-Alias
    Get-AuthenticodeSignature
    Get-ChildItem
    Get-Command
    Get-Content
    Get-Credential
    Get-Culture
    Get-Date
    Get-EventLog
    Get-ExecutionPolicy
    Get-Help
    Get-History
    Get-Host
    Get-Item
    Get-ItemProperty
    Get-Location
    Get-Member
    Get-PfxCertificate
    Get-Process
    Get-PSDrive
    Get-PSProvider
    Get-PSSnapin
    Get-Service
    Get-TraceSource
    Get-UICulture
    Get-Unique
    Get-Variable
    Get-WmiObject
    Group-Object
    Import-Alias
    Import-Clixml
    Import-Csv
    Invoke-Expression
    Invoke-History
    Invoke-Item
    Join-Path
    Measure-Command
    Measure-Object
    Move-Item
    Move-ItemProperty
    New-Alias
    New-Item
    New-ItemProperty
    New-Object
    New-PSDrive
    New-Service
    New-TimeSpan
    New-Variable
    Out-Default
    Out-File
    Out-Host
    Out-Null
    Out-Printer
    Out-String
    Pop-Location
    Push-Location
    Read-Host
    Remove-Item
    Remove-ItemProperty
    Remove-PSDrive
    Remove-PSSnapin
    Remove-Variable
    Rename-Item
    Rename-ItemProperty
    Resolve-Path
    Restart-Service
    Resume-Service
    Select-Object
    Select-String
    Set-Acl
    Set-Alias
    Set-AuthenticodeSignature
    Set-Content
    Set-Date
    Set-ExecutionPolicy
    Set-Item
    Set-ItemProperty
    Set-Location
    Set-PSDebug
    Set-Service
    Set-TraceSource
    Set-Variable
    Sort-Object
    Split-Path
    Start-Service
    Start-Sleep
    Start-Transcript
    Stop-Process
    Stop-Service
    Stop-Transcript
    Suspend-Service
    Tee-Object
    Test-Path
    Trace-Command
    Update-FormatData
    Update-TypeData
    Where-Object
    Write-Debug
    Write-Error
    Write-Host
    Write-Output
    Write-Progress
    Write-Verbose
    Write-Warning

    Aliases

    %
    ?
    ac asnp chdir copy cls clc cli clp clv cpi cpp cvpa cat cd clear cp del dir diff echo epal epcsv erase
    fc fl ft fw gal gc gci gcm gdr ghy gi gl gm gp gps group gsv gsnp gu gv gwmi h history iex ihy ii ipal ipcsv
    kill lp ls mi mp mount mv move nal ndr ni nv oh popd ps pushd pwd rd ren r rm rmdir rdr ri rni rnp rp rsnp rv rvpa
    set sal sasv sc select si sl sleep sort sp spps spsv sv type tee where write

    Operators

    =
    +=
    -=
    *=
    /=
    %=
    !

    Comp Operators

    -and -band -bnot -bor -ccontains -ceq -cge -cgt -cle -clike -clt -cmatch -cne -cnotcontains -cnotlike
    -cnotmatch -contains -creplace -eq -ge -gt -icontains -ieq -ige -igt -ile -ilike -ilt -imatch -ine
    -inotcontains -inotlike -inotmatch -ireplace -le -like -lt -match -ne -not -notcontains -notlike -notmatch
    -or -replace

    Powershell Drives

    alias
    cert
    env
    HKCU HKLM
    variable

    System Objects

    ** system.
    ** LoadWith

    Structures

    array bool byte char decimal double hashtable int int32 long single string void xml

     
    • Thell Fowler

      Thell Fowler - 2009-06-09

      I am VERY surprised that you went through the trouble of listing this all out but you didn't bother to do a google search for 'Notepad++ PowerShell Lexer'.

       
    • Nissim Salinas

      Nissim Salinas - 2009-06-10

      Mr./Ms. Thell,

      I am very new to computers, a newboy I think it is called.

      Are Search Goggles a hardware/machine?

      You see when I installed Notepad++ languages like Java, C++ were most magically automatically colored. I thought perhaps PowerShell would get the same honor.

      I will ask in the local Radio Shack if they have such goggles and what they can do to help me find something perhaps. I hope not too expensive.

      Most thank very much to you,

      Nissim

       
      • Bob Uncle

        Bob Uncle - 2009-06-11

        "Are Search Goggles a hardware/machine? "

        I am really hoping that this is just a language issue. You know what PowerShell, Java and C++ are, but you have no idea what Google is? If that is true, then you are an amazing anomaly.

        Try:
        http://www.google.ca/search?q=Notepad%2B%2B+PowerShell+Lexer

         
  • David Faulkner

    David Faulkner - 2010-12-10

    I believe it would be helpful to support PowerShell "Block Comment" in NotePad++ for strings encoded within  '<#' and '#>' highlighted perhaps differently than COMMENT.

    Thank you. I have the highest regard for Notepad++ and its contributors.

    Perhaps, when my I can get off the treadmill I can help you move Notepad++ to .NET or beyond. :)

     
  • cchris

    cchris - 2010-12-10

    There is a PowerShell external lexer in the Plugin Cntral page, isn't it working?

    CChris

     
  • François-R Boyer

    A lexer for PowerShell is integrated in Scintilla (don't know from which version), and is selectable in Notepad++'s Language menu.  By default, the extension associated with PowerShell is ".ps1"; it the filename has that extension, and you load it in latest version of Notepad++, it should be correctly styled.  Is it working?

     
MongoDB Logo MongoDB