Write-SpectreHost
Description
The Write-SpectreHost function writes a message to the console using Spectre Console. It supports ANSI markup and can optionally append a newline character to the end of the message. The markup language is defined at https://spectreconsole.net/markup Supported emoji are defined at https://spectreconsole.net/appendix/emojis
Examples
Example 1
This example demonstrates how to write a message to the console using Spectre Console markup.
Write-SpectreHost -Message "Hello, [blue underline]world[/]! :call_me_hand:"
Parameters
Message
The message to write to the console.
Type | Required | Position | PipelineInput |
---|---|---|---|
[Object] | true | 1 | true (ByValue) |
NoNewline
If specified, the message will not be followed by a newline character.
Type | Required | Position | PipelineInput |
---|---|---|---|
[Switch] | false | named | false |
PassThru
Type | Required | Position | PipelineInput |
---|---|---|---|
[Switch] | false | named | false |
Justify
Valid Values:
- Left
- Right
- Center
Type | Required | Position | PipelineInput |
---|---|---|---|
[String] | false | 2 | false |
Syntax
Write-SpectreHost [-Message] <Object> [-NoNewline] [-PassThru] [[-Justify] <String>] [<CommonParameters>]