branch: elpa/powershell
commit 87cba2c5e0510bda3915b8324ae67ac52adcae31
Merge: c9a20e5a8b0 f7f085f2119
Author: Joe Schafer <[email protected]>
Commit: GitHub <[email protected]>

    Merge pull request #24 from NeoISE/master
    
    added some missing keywords, operators, etc.
---
 powershell.el | 35 ++++++++++++++++++++++++-----------
 1 file changed, 24 insertions(+), 11 deletions(-)

diff --git a/powershell.el b/powershell.el
index 6875b41e289..04c773c1bf3 100644
--- a/powershell.el
+++ b/powershell.el
@@ -313,10 +313,12 @@ The text is assumed to be `regexp-opt' output."
 (defvar powershell-keywords
   (concat "\\_<"
           (regexp-opt
-           '("begin" "break" "catch" "class" "continue" "data" "do" "default"
+           '("begin" "break" "catch" "class" "continue" "data" "define" "do" 
"default"
              "dynamicparam" "else" "elseif" "end" "enum" "exit" "filter" 
"finally"
-             "for" "foreach" "from" "function" "if" "in" "param" "process"
-             "return" "switch" "throw" "trap" "try" "until" "where" "while")
+             "for" "foreach" "from" "function" "hidden" "if" "in" "param" 
"process"
+             "return" "static" "switch" "throw" "trap" "try" "until" "using" 
"var" "where" "while"
+             ;; Questionable, specific to workflow sessions
+             "inlinescript")
            t)
           "\\_>")
   "PowerShell keywords.")
@@ -330,14 +332,18 @@ The text is assumed to be `regexp-opt' output."
              "-ceq" "-cne" "-cgt" "-cge" "-clt" "-cle"
              ;; explicitly case insensitive
              "-ieq" "-ine" "-igt" "-ige" "-ilt" "-ile"
-             "-band" "-bor" "-bxor"
-             "-and" "-or" "-xor"
+             "-band" "-bor" "-bxor" "-bnot"
+             "-and" "-or" "-xor" "-not" "!"
              "-like" "-notlike" "-clike" "-cnotlike" "-ilike" "-inotlike"
              "-match" "-notmatch" "-cmatch" "-cnotmatch" "-imatch" "-inotmatch"
              "-contains" "-notcontains" "-ccontains" "-cnotcontains"
              "-icontains" "-inotcontains"
              "-replace" "-creplace" "-ireplace"
-             "-is" "-as" "-f"
+             "-is" "-isnot" "-as" "-f"
+             "-in" "-cin" "-iin" "-notin" "-cnotin" "-inotin"
+             "-split" "-csplit" "-isplit"
+             "-join"
+             "-shl" "-shr"
              ;; Questionable --> specific to certain contexts
              "-casesensitive" "-wildcard" "-regex" "-exact" ;specific to case
              "-begin" "-process" "-end" ;specific to scriptblock
@@ -350,7 +356,7 @@ The text is assumed to be `regexp-opt' output."
   "Names of scopes in PowerShell mode.")
 
 (defvar powershell-variable-drive-names
-  (append '("env" "function" "variable" "alias") powershell-scope-names)
+  (append '("env" "function" "variable" "alias" "hklm" "hkcu" "wsman") 
powershell-scope-names)
   "Names of scopes in PowerShell mode.")
 
 (defconst powershell-variables-regexp
@@ -394,16 +400,21 @@ The text is assumed to be `regexp-opt' output."
      "^"                              "_"
      "args"                           "ConsoleFileName"
      "Error"                          "Event"
+     "EventArgs"
      "EventSubscriber"                "ExecutionContext"
      "false"                          "Foreach"
      "HOME"                           "Host"
-     "input"                          "LASTEXITCODE"
+     "input"                          "lsCoreCLR"
+     "lsLinux"                        "lsMacOS"
+     "lsWindows"                      "LASTEXITCODE"
      "Matches"                        "MyInvocation"
      "NestedPromptLevel"              "null"
      "PID"                            "PROFILE"
      "PSBoundParameters"              "PSCmdlet"
+     "PSCommandPath"
      "PSCulture"                      "PSDebugContext"
-     "PSHOME"                         "PSScriptRoot"
+     "PSHOME"                         "PSITEM"
+     "PSScriptRoot"                   "PSSenderInfo"
      "PSUICulture"                    "PSVersionTable"
      "PWD"                            "ReportErrorShowExceptionClass"
      "ReportErrorShowInnerException"  "ReportErrorShowSource"
@@ -418,7 +429,8 @@ They are highlighted differently from the other variables.")
   (regexp-opt
    '("ConfirmPreference"           "DebugPreference"
      "ErrorActionPreference"       "ErrorView"
-     "FormatEnumerationLimit"      "LogCommandHealthEvent"
+     "FormatEnumerationLimit"      "InformationPreference"
+     "LogCommandHealthEvent"
      "LogCommandLifecycleEvent"    "LogEngineHealthEvent"
      "LogEngineLifecycleEvent"     "LogProviderHealthEvent"
      "LogProviderLifecycleEvent"   "MaximumAliasCount"
@@ -426,7 +438,8 @@ They are highlighted differently from the other variables.")
      "MaximumFunctionCount"        "MaximumHistoryCount"
      "MaximumVariableCount"        "OFS"
      "OutputEncoding"              "ProgressPreference"
-     "PSEmailServer"               "PSSessionApplicationName"
+     "PSDefaultParameterValues"    "PSEmailServer"
+     "PSModuleAutoLoadingPreference" "PSSessionApplicationName"
      "PSSessionConfigurationName"  "PSSessionOption"
      "VerbosePreference"           "WarningPreference"
      "WhatIfPreference"            ) t)

Reply via email to