| external help file | PSTextMate.dll-Help.xml |
|---|---|
| Module Name | TextMate |
| online version | https://github.com/trackd/TextMate/blob/main/docs/en-us |
| schema | 2.0.0 |
Tests whether a language, extension, or file is supported by the module's TextMate grammars. Returns a boolean or diagnostic object indicating support.
Test-TextMate -File <string> [<CommonParameters>]
Test-TextMate -Extension <string> [<CommonParameters>]
Test-TextMate -Language <string> [<CommonParameters>]
This cmdlet has the following aliases, None
Test-TextMate verifies support for TextMate languages and extensions.
Use the -File parameter to check a specific file path, -Extension to verify a file extension, or -Language to test a language identifier.
The cmdlet returns true or false
Example: test a file path for support
Test-TextMate -File .\src\Program.cs
Example: test by extension
Test-TextMate -Extension .ps1
Example: test by language identifier
Test-TextMate -Language powershell
File extension to test (for example .ps1, .cs).
When used the cmdlet returns whether the module has a grammar associated with that extension.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ExtensionSet
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Path to a file to test for grammar support. The path is resolved and existence is validated before checking support.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: FileSet
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''TextMate language ID to test (for example powershell, csharp, markdown).
Returns whether that language ID is supported.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: LanguageSet
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Returns bool results for support checks. In error cases or file-not-found scenarios the cmdlet may write errors or diagnostic objects to the pipeline.
Use Get-TextMate to discover available language IDs and their extensions before calling this cmdlet.
See Get-TextMate and Format-TextMate for discovery and rendering workflows.