Format-SpectreTextPath
Description
Formats a path into a Spectre Console Path which supports highlighting and truncating.
See https://spectreconsole.net/widgets/text-path for more information.
Examples
Example 1
This example demonstrates how to format a PowerShell path as a Spectre Console Path with syntax highlighting.
Parameters
Path
The directory/file path to format
Type | Required | Position | PipelineInput |
---|---|---|---|
[String] | true | 1 | true (ByValue) |
Alignment
Valid Values:
- Left
- Right
- Center
Type | Required | Position | PipelineInput |
---|---|---|---|
[String] | false | 2 | false |
PathStyle
Type | Required | Position | PipelineInput |
---|---|---|---|
[Hashtable] | false | 3 | false |