|
226 | 226 | </dict>
|
227 | 227 | <dict>
|
228 | 228 | <key>match</key>
|
229 |
| - <string>-([lg][te]|[ci]?(eq|ne))</string> |
| 229 | + <string>-([ci]?[lg][te]|eq|ne)</string> |
230 | 230 | <key>name</key>
|
231 | 231 | <string>keyword.operator.logical.powershell</string>
|
232 | 232 | </dict>
|
233 | 233 | <dict>
|
234 | 234 | <key>match</key>
|
235 |
| - <string>(?i:[a-z][a-z0-9]+-?[a-z][a-z0-9]+)(?i:\.(?:exe|cmd|bat|ps1))</string> |
| 235 | + <string>(?i:(\S&&[^<>"/\|?*])+)(?i:\.(?:exe|cmd|bat|ps1))</string> |
236 | 236 | <key>name</key>
|
237 | 237 | <string>support.function.powershell</string>
|
238 | 238 | </dict>
|
239 | 239 | <dict>
|
240 | 240 | <key>match</key>
|
241 |
| - <string>\b(?<!\.)(?i:begin|break|catch|class|continue|data|define|do|dynamicparam|else|elseif|end|exit|filter|finally|for|foreach(?!=-object)|from|if|in|inlinescript|parallel|param|process|return|switch|throw|trap|try|until|using|var|while|workflow)\b</string> |
| 241 | + <string>(?<!\w)((?i:begin|break|catch|class|continue|data|define|do|dynamicparam|else|elseif|end|exit|filter|finally|for|foreach(?!=-object)|from|if|in|inlinescript|parallel|param|process|return|switch|throw|trap|try|until|using|var|where(?!=-object)|while|workflow)|%|\?)(?!\w)</string> |
242 | 242 | <key>name</key>
|
243 | 243 | <string>keyword.control.powershell</string>
|
244 | 244 | </dict>
|
|
250 | 250 | </dict>
|
251 | 251 | <dict>
|
252 | 252 | <key>match</key>
|
253 |
| - <string>-(?i:[ic]?(?:eq|ne|[gl][te]|(?:not)?(?:like|match|contains)|replace))\b</string> |
| 253 | + <string>-(?i:[ic]?(?:eq|ne|[gl][te]|(?:not)?(?:like|match|contains|in)|replace))(?!\p{L})</string> |
254 | 254 | <key>name</key>
|
255 | 255 | <string>keyword.operator.comparison.powershell</string>
|
256 | 256 | </dict>
|
257 | 257 | <dict>
|
258 | 258 | <key>match</key>
|
259 |
| - <string>-(?i:join|split)|!</string> |
| 259 | + <string>-(?i:join|split)(?!\p{L})|!</string> |
260 | 260 | <key>name</key>
|
261 | 261 | <string>keyword.operator.unary.powershell</string>
|
262 | 262 | </dict>
|
263 | 263 | <dict>
|
264 | 264 | <key>match</key>
|
265 |
| - <string>-(?i:and|or|not|xor)|!</string> |
| 265 | + <string>-(?i:and|or|not|xor)(?!\p{L})|!</string> |
266 | 266 | <key>name</key>
|
267 | 267 | <string>keyword.operator.logical.powershell</string>
|
268 | 268 | </dict>
|
269 | 269 | <dict>
|
270 | 270 | <key>match</key>
|
271 |
| - <string>-(?i:band|bor|bnot|bxor)\b</string> |
| 271 | + <string>-(?i:band|bor|bnot|bxor)(?!\p{L})</string> |
272 | 272 | <key>name</key>
|
273 | 273 | <string>keyword.operator.bitwise.powershell</string>
|
274 | 274 | </dict>
|
275 | 275 | <dict>
|
276 | 276 | <key>match</key>
|
277 |
| - <string>-f\b</string> |
| 277 | + <string>-(?i:f)(?!\p{L})</string> |
278 | 278 | <key>name</key>
|
279 | 279 | <string>keyword.operator.string-format.powershell</string>
|
280 | 280 | </dict>
|
|
390 | 390 | <key>comment</key>
|
391 | 391 | <string>Verb-Noun pattern:</string>
|
392 | 392 | <key>match</key>
|
393 |
| - <string>(?:[a-zA-Z.]*\\)?(?i:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)\-.+?(?:\.(?:exe|cmd|bat|ps1))?\b</string> |
| 393 | + <string>(?:(\p{L}|\d|_|-|\\|\:)*\\)?\b(?i:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)\-.+?(?:\.(?:exe|cmd|bat|ps1))?\b</string> |
394 | 394 | <key>name</key>
|
395 | 395 | <string>support.function.powershell</string>
|
396 | 396 | </dict>
|
|
0 commit comments