From ab0724f192b4b378c0ca0046767fba20e4918eb8 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 14 Dec 2022 15:26:26 -0800 Subject: [PATCH 01/25] Format-RichText: Supporting -Hyperlink (Fixes #93) --- Format-RichText.ps1 | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/Format-RichText.ps1 b/Format-RichText.ps1 index 0f6356a..e39dde1 100644 --- a/Format-RichText.ps1 +++ b/Format-RichText.ps1 @@ -27,7 +27,7 @@ function Format-RichText [Parameter(ValueFromPipeline)] [PSObject] $InputObject, - + # The foreground color [string]$ForegroundColor, @@ -62,6 +62,12 @@ function Format-RichText # If set, will invert text [switch]$Invert, + + # If provided, will create a hyperlink to a given uri + [Alias('Link')] + [uri] + $Hyperlink, + # If set, will not clear formatting [switch]$NoClear ) @@ -78,7 +84,7 @@ function Format-RichText $brightColors = 'BrightBlack', 'BrightRed', 'BrightGreen', 'BrightYellow', 'BrightBlue','BrightMagenta', 'BrightCyan', 'BrightWhite' $n =0 - $cssClasses = @() + $cssClasses = @() $colorAttributes = @(:nextColor foreach ($hc in $ForegroundColor,$BackgroundColor) { $n++ @@ -255,6 +261,17 @@ function Format-RichText if ($canUseHTML) { "border-bottom: 3px double;"} elseif ($canUseANSI) {'' +$esc + "[21m" } } + + if ($Hyperlink) { + if ($canUseHTML) { + # Hyperlinks need to be a nested element + # so we will not add it to style attributes for HTML + } + elseif ($canUseANSI) { + # For ANSI, + '' + $esc + ']8m;;' + $Hyperlink + $esc + '\' + } + } ) @@ -264,7 +281,11 @@ function Format-RichText if ($styleAttributes) { " style='$($styleAttributes -join ';')'"} )$( if ($cssClasses) { " class='$($cssClasses -join ' ')'"} - )>" + )>" + $( + if ($Hyperlink) { + "" + } + ) } elseif ($canUseANSI) { $styleAttributes -join '' } @@ -283,6 +304,9 @@ function Format-RichText if (-not $NoClear) { if ($canUseHTML) { + if ($Hyperlink) { + "" + } "" } elseif ($canUseANSI) { @@ -313,6 +337,10 @@ function Format-RichText if ($BackgroundColor) { "$esc[49m" } + + if ($Hyperlink) { + "$esc]8;;$esc\" + } if (-not ($Underline -or $Bold -or $Invert -or $ForegroundColor -or $BackgroundColor)) { '' + $esc + '[0m' From 7a11715ed907854ea0faedf5a3adef56df0073ad Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 14 Dec 2022 23:27:22 +0000 Subject: [PATCH 02/25] Format-RichText: Supporting -Hyperlink (Fixes #93) --- EZOut.format.ps1xml | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/EZOut.format.ps1xml b/EZOut.format.ps1xml index 9a5f261..909f76b 100644 --- a/EZOut.format.ps1xml +++ b/EZOut.format.ps1xml @@ -989,7 +989,7 @@ if ($Request -or $Host.UI.SupportsHTML) { [Parameter(ValueFromPipeline)] [PSObject] $InputObject, - + # The foreground color [string]$ForegroundColor, @@ -1024,6 +1024,12 @@ if ($Request -or $Host.UI.SupportsHTML) { # If set, will invert text [switch]$Invert, + + # If provided, will create a hyperlink to a given uri + [Alias('Link')] + [uri] + $Hyperlink, + # If set, will not clear formatting [switch]$NoClear ) @@ -1040,7 +1046,7 @@ if ($Request -or $Host.UI.SupportsHTML) { $brightColors = 'BrightBlack', 'BrightRed', 'BrightGreen', 'BrightYellow', 'BrightBlue','BrightMagenta', 'BrightCyan', 'BrightWhite' $n =0 - $cssClasses = @() + $cssClasses = @() $colorAttributes = @(:nextColor foreach ($hc in $ForegroundColor,$BackgroundColor) { $n++ @@ -1217,6 +1223,17 @@ if ($Request -or $Host.UI.SupportsHTML) { if ($canUseHTML) { "border-bottom: 3px double;"} elseif ($canUseANSI) {'' +$esc + "[21m" } } + + if ($Hyperlink) { + if ($canUseHTML) { + # Hyperlinks need to be a nested element + # so we will not add it to style attributes for HTML + } + elseif ($canUseANSI) { + # For ANSI, + '' + $esc + ']8m;;' + $Hyperlink + $esc + '\' + } + } ) @@ -1226,7 +1243,11 @@ if ($Request -or $Host.UI.SupportsHTML) { if ($styleAttributes) { " style='$($styleAttributes -join ';')'"} )$( if ($cssClasses) { " class='$($cssClasses -join ' ')'"} - )>" + )>" + $( + if ($Hyperlink) { + "<a href='$hyperLink'>" + } + ) } elseif ($canUseANSI) { $styleAttributes -join '' } @@ -1245,6 +1266,9 @@ if ($Request -or $Host.UI.SupportsHTML) { if (-not $NoClear) { if ($canUseHTML) { + if ($Hyperlink) { + "</a>" + } "</span>" } elseif ($canUseANSI) { @@ -1275,6 +1299,10 @@ if ($Request -or $Host.UI.SupportsHTML) { if ($BackgroundColor) { "$esc[49m" } + + if ($Hyperlink) { + "$esc]8;;$esc\" + } if (-not ($Underline -or $Bold -or $Invert -or $ForegroundColor -or $BackgroundColor)) { '' + $esc + '[0m' From 68b22257ce68a907896a984ce9be34e472570ef8 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 14 Dec 2022 23:27:27 +0000 Subject: [PATCH 03/25] Format-RichText: Supporting -Hyperlink (Fixes #93) --- docs/Format-RichText.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/Format-RichText.md b/docs/Format-RichText.md index 1a1a8d4..6444db4 100644 --- a/docs/Format-RichText.md +++ b/docs/Format-RichText.md @@ -218,6 +218,23 @@ If set, will invert text +--- +#### **Hyperlink** + +If provided, will create a hyperlink to a given uri + + + +> **Type**: ```[Uri]``` + +> **Required**: false + +> **Position**: 4 + +> **PipelineInput**:false + + + --- #### **NoClear** @@ -238,7 +255,7 @@ If set, will not clear formatting --- ### Syntax ```PowerShell -Format-RichText [[-InputObject] ] [[-ForegroundColor] ] [[-BackgroundColor] ] [-Bold] [-Italic] [-Faint] [-Hide] [-Blink] [-Strikethru] [-Underline] [-DoubleUnderline] [-Invert] [-NoClear] [] +Format-RichText [[-InputObject] ] [[-ForegroundColor] ] [[-BackgroundColor] ] [-Bold] [-Italic] [-Faint] [-Hide] [-Blink] [-Strikethru] [-Underline] [-DoubleUnderline] [-Invert] [[-Hyperlink] ] [-NoClear] [] ``` --- ### Notes From 887521564e9a4b3f20fa4298eb9846927a9743a2 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 14 Dec 2022 23:27:29 +0000 Subject: [PATCH 04/25] Format-RichText: Supporting -Hyperlink (Fixes #93) --- docs/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/README.md b/docs/README.md index 874d807..9060b67 100644 --- a/docs/README.md +++ b/docs/README.md @@ -163,7 +163,7 @@ Ever wanted to see a nice file tree in PowerShell? With EZOut, it's a snap. Ju ~~~PowerShell Get-Module EZOut | Split-Path | Get-ChildItem | Format-Custom ~~~ -![File Tree Formatter](/Assets/FileTreeFormatter.gif) +![File Tree Formatter](Assets/FileTreeFormatter.gif) ##### Colorized XML Formatter Wish you could see more of any XML node you're working with? EZOut ships with a colorized XML formatter! (colors are supported in PowerShell.exe and pwsh.exe, but not in the PowerShell ISE) @@ -194,5 +194,4 @@ Get-Module EZOut | Format-Custom - - + From a2dc9040388ca5e0a96e16fa086c05b61f104a30 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 14 Dec 2022 23:27:29 +0000 Subject: [PATCH 05/25] Format-RichText: Supporting -Hyperlink (Fixes #93) --- docs/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/README.md b/docs/README.md index 9060b67..491b576 100644 --- a/docs/README.md +++ b/docs/README.md @@ -195,3 +195,4 @@ Get-Module EZOut | Format-Custom + From 2cdaee9c8a1555c0e96cc9e91ba0d388e116a9b1 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 14 Dec 2022 23:27:30 +0000 Subject: [PATCH 06/25] Format-RichText: Supporting -Hyperlink (Fixes #93) --- docs/Assets/EZOut.svg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Assets/EZOut.svg b/docs/Assets/EZOut.svg index a7481e6..31eec34 100644 --- a/docs/Assets/EZOut.svg +++ b/docs/Assets/EZOut.svg @@ -1,4 +1,4 @@ - + @@ -8,4 +8,4 @@ EZ OUT - + \ No newline at end of file From cf062e2a2afb13b4b330c6440274a72c8900dd85 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 14 Dec 2022 16:34:23 -0800 Subject: [PATCH 07/25] Format-RichText: Outputting a single string (Fixes #95) --- Format-RichText.ps1 | 99 ++++++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 46 deletions(-) diff --git a/Format-RichText.ps1 b/Format-RichText.ps1 index e39dde1..71b70be 100644 --- a/Format-RichText.ps1 +++ b/Format-RichText.ps1 @@ -22,6 +22,7 @@ function Format-RichText if (-not ($canUseANSI -or $canUseHTML)) { return $false} return $true })] + [OutputType([string])] param( # The input object [Parameter(ValueFromPipeline)] @@ -83,6 +84,8 @@ function Format-RichText $standardColors = 'Black', 'Red', 'Green', 'Yellow', 'Blue','Magenta', 'Cyan', 'White' $brightColors = 'BrightBlack', 'BrightRed', 'BrightGreen', 'BrightYellow', 'BrightBlue','BrightMagenta', 'BrightCyan', 'BrightWhite' + $allOutput = @() + $n =0 $cssClasses = @() $colorAttributes = @@ -292,60 +295,64 @@ function Format-RichText } process { - if ($header) { - "$header" + "$(if ($inputObject) { $inputObject | Out-String})".Trim() - } - elseif ($inputObject) { - ($inputObject | Out-String).Trim() - } + $allOutput += + if ($header) { + "$header" + "$(if ($inputObject) { $inputObject | Out-String})".Trim() + } + elseif ($inputObject) { + ($inputObject | Out-String).Trim() + } } end { if (-not $NoClear) { - if ($canUseHTML) { - if ($Hyperlink) { - "" - } - "" - } - elseif ($canUseANSI) { - if ($Bold -or $Faint -or $colorAttributes -match '\[1;') { - "$esc[22m" - } - if ($Italic) { - "$esc[23m" - } - if ($Underline -or $doubleUnderline) { - "$esc[24m" - } - if ($Blink) { - "$esc[25m" - } - if ($Invert) { - "$esc[27m" - } - if ($hide) { - "$esc[28m" - } - if ($Strikethru) { - "$esc[29m" - } - if ($ForegroundColor) { - "$esc[39m" - } - if ($BackgroundColor) { - "$esc[49m" + $allOutput += + if ($canUseHTML) { + if ($Hyperlink) { + "" + } + "" } + elseif ($canUseANSI) { + if ($Bold -or $Faint -or $colorAttributes -match '\[1;') { + "$esc[22m" + } + if ($Italic) { + "$esc[23m" + } + if ($Underline -or $doubleUnderline) { + "$esc[24m" + } + if ($Blink) { + "$esc[25m" + } + if ($Invert) { + "$esc[27m" + } + if ($hide) { + "$esc[28m" + } + if ($Strikethru) { + "$esc[29m" + } + if ($ForegroundColor) { + "$esc[39m" + } + if ($BackgroundColor) { + "$esc[49m" + } - if ($Hyperlink) { - "$esc]8;;$esc\" - } - - if (-not ($Underline -or $Bold -or $Invert -or $ForegroundColor -or $BackgroundColor)) { - '' + $esc + '[0m' + if ($Hyperlink) { + "$esc]8;;$esc\" + } + + if (-not ($Underline -or $Bold -or $Invert -or $ForegroundColor -or $BackgroundColor)) { + '' + $esc + '[0m' + } } - } } + + $allOutput -join '' } } From 0de32bf1493ab2a6079f98ccb732825e62aa8e75 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 00:35:04 +0000 Subject: [PATCH 08/25] Format-RichText: Outputting a single string (Fixes #95) --- EZOut.format.ps1xml | 99 ++++++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 46 deletions(-) diff --git a/EZOut.format.ps1xml b/EZOut.format.ps1xml index 909f76b..e2e1c4a 100644 --- a/EZOut.format.ps1xml +++ b/EZOut.format.ps1xml @@ -984,6 +984,7 @@ if ($Request -or $Host.UI.SupportsHTML) { if (-not ($canUseANSI -or $canUseHTML)) { return $false} return $true })] + [OutputType([string])] param( # The input object [Parameter(ValueFromPipeline)] @@ -1045,6 +1046,8 @@ if ($Request -or $Host.UI.SupportsHTML) { $standardColors = 'Black', 'Red', 'Green', 'Yellow', 'Blue','Magenta', 'Cyan', 'White' $brightColors = 'BrightBlack', 'BrightRed', 'BrightGreen', 'BrightYellow', 'BrightBlue','BrightMagenta', 'BrightCyan', 'BrightWhite' + $allOutput = @() + $n =0 $cssClasses = @() $colorAttributes = @@ -1254,61 +1257,65 @@ if ($Request -or $Host.UI.SupportsHTML) { } process { - if ($header) { - "$header" + "$(if ($inputObject) { $inputObject | Out-String})".Trim() - } - elseif ($inputObject) { - ($inputObject | Out-String).Trim() - } + $allOutput += + if ($header) { + "$header" + "$(if ($inputObject) { $inputObject | Out-String})".Trim() + } + elseif ($inputObject) { + ($inputObject | Out-String).Trim() + } } end { if (-not $NoClear) { - if ($canUseHTML) { - if ($Hyperlink) { - "</a>" - } - "</span>" - } - elseif ($canUseANSI) { - if ($Bold -or $Faint -or $colorAttributes -match '\[1;') { - "$esc[22m" - } - if ($Italic) { - "$esc[23m" - } - if ($Underline -or $doubleUnderline) { - "$esc[24m" - } - if ($Blink) { - "$esc[25m" - } - if ($Invert) { - "$esc[27m" - } - if ($hide) { - "$esc[28m" - } - if ($Strikethru) { - "$esc[29m" - } - if ($ForegroundColor) { - "$esc[39m" - } - if ($BackgroundColor) { - "$esc[49m" + $allOutput += + if ($canUseHTML) { + if ($Hyperlink) { + "</a>" + } + "</span>" } + elseif ($canUseANSI) { + if ($Bold -or $Faint -or $colorAttributes -match '\[1;') { + "$esc[22m" + } + if ($Italic) { + "$esc[23m" + } + if ($Underline -or $doubleUnderline) { + "$esc[24m" + } + if ($Blink) { + "$esc[25m" + } + if ($Invert) { + "$esc[27m" + } + if ($hide) { + "$esc[28m" + } + if ($Strikethru) { + "$esc[29m" + } + if ($ForegroundColor) { + "$esc[39m" + } + if ($BackgroundColor) { + "$esc[49m" + } - if ($Hyperlink) { - "$esc]8;;$esc\" - } - - if (-not ($Underline -or $Bold -or $Invert -or $ForegroundColor -or $BackgroundColor)) { - '' + $esc + '[0m' + if ($Hyperlink) { + "$esc]8;;$esc\" + } + + if (-not ($Underline -or $Bold -or $Invert -or $ForegroundColor -or $BackgroundColor)) { + '' + $esc + '[0m' + } } - } } + + $allOutput -join '' } From 6d60dbbbc61f6a009dab7e6aa23be02d62f20173 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 00:35:09 +0000 Subject: [PATCH 09/25] Format-RichText: Outputting a single string (Fixes #95) --- docs/Format-RichText.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/Format-RichText.md b/docs/Format-RichText.md index 6444db4..6bb5ff6 100644 --- a/docs/Format-RichText.md +++ b/docs/Format-RichText.md @@ -252,6 +252,13 @@ If set, will not clear formatting +--- +### Outputs +* [String](https://learn.microsoft.com/en-us/dotnet/api/System.String) + + + + --- ### Syntax ```PowerShell From cab84ae7fb726e920189e30ce4c009945cbb06e5 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 00:35:11 +0000 Subject: [PATCH 10/25] Format-RichText: Outputting a single string (Fixes #95) --- docs/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 491b576..9060b67 100644 --- a/docs/README.md +++ b/docs/README.md @@ -195,4 +195,3 @@ Get-Module EZOut | Format-Custom - From 6c3f7e9358dd39ef0670db5efe1359d3a4a06822 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 00:35:11 +0000 Subject: [PATCH 11/25] Format-RichText: Outputting a single string (Fixes #95) --- docs/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/README.md b/docs/README.md index 9060b67..491b576 100644 --- a/docs/README.md +++ b/docs/README.md @@ -195,3 +195,4 @@ Get-Module EZOut | Format-Custom + From 9e370a8a161b3dcb52e2c9d9f64579f2e9fdd9d5 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 14 Dec 2022 19:14:57 -0800 Subject: [PATCH 12/25] Updating Module Version [1.9.8] and CHANGELOG --- CHANGELOG.md | 7 +++++++ EZOut.psd1 | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0502bb..05bba5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.9.8: + +* Format-RichText now -Hyperlinks (Fixes #93) +* Format-RichText now outputs a single string (Fixes #95) + +--- + ## 1.9.7: * Format-RichText now unbolds bright colors (Fixes #88) * Now Blogging with GitPub (Fixes #89) diff --git a/EZOut.psd1 b/EZOut.psd1 index adfae1d..0828835 100644 --- a/EZOut.psd1 +++ b/EZOut.psd1 @@ -1,6 +1,6 @@ @{ ModuleToProcess = 'EZOut.psm1' - ModuleVersion = '1.9.7' + ModuleVersion = '1.9.8' GUID = 'cef786f0-8a0b-4a5d-a2c6-b433095354cd' Author = 'James Brundage' CompanyName = 'Start-Automating' @@ -65,6 +65,14 @@ Tags = '.ps1xml', 'Format','Output','Types', 'Colorized' ReleaseNotes = @' +## 1.9.8: + +* Format-RichText now -Hyperlinks (Fixes #93) +* Format-RichText now outputs a single string (Fixes #95) + +--- + + ## 1.9.7: * Format-RichText now unbolds bright colors (Fixes #88) * Now Blogging with GitPub (Fixes #89) From 655f0856c9f9e2391ce70c23c0c8643be4c8a099 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 03:15:39 +0000 Subject: [PATCH 13/25] Updating Module Version [1.9.8] and CHANGELOG --- EZOut.format.ps1xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EZOut.format.ps1xml b/EZOut.format.ps1xml index e2e1c4a..a7b7379 100644 --- a/EZOut.format.ps1xml +++ b/EZOut.format.ps1xml @@ -1,5 +1,5 @@ - + From 8d7d9410d0fbcfb60785b504e442d4c7e4f39ff1 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 03:15:45 +0000 Subject: [PATCH 14/25] Updating Module Version [1.9.8] and CHANGELOG --- docs/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 491b576..9060b67 100644 --- a/docs/README.md +++ b/docs/README.md @@ -195,4 +195,3 @@ Get-Module EZOut | Format-Custom - From b5cb866f8604b39cd9b690a664b996f19d06f6cf Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 03:15:45 +0000 Subject: [PATCH 15/25] Updating Module Version [1.9.8] and CHANGELOG --- docs/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/README.md b/docs/README.md index 9060b67..491b576 100644 --- a/docs/README.md +++ b/docs/README.md @@ -195,3 +195,4 @@ Get-Module EZOut | Format-Custom + From 1e37abb45cd01085de089bb39a97883741be83bc Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 03:15:45 +0000 Subject: [PATCH 16/25] Updating Module Version [1.9.8] and CHANGELOG --- docs/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index b99b52c..80c9c5f 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.9.8: + +* Format-RichText now -Hyperlinks (Fixes #93) +* Format-RichText now outputs a single string (Fixes #95) + +--- + ## 1.9.7: * Format-RichText now unbolds bright colors (Fixes #88) * Now Blogging with GitPub (Fixes #89) From 482bf8d544ca6131083c501d3e25dca8ebf75443 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 14 Dec 2022 19:17:12 -0800 Subject: [PATCH 17/25] Updating Module Version [1.9.8] and CHANGELOG --- CHANGELOG.md | 2 +- EZOut.psd1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05bba5f..3ec4107 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## 1.9.8: -* Format-RichText now -Hyperlinks (Fixes #93) +* Format-RichText now supports -Hyperlink (Fixes #93) * Format-RichText now outputs a single string (Fixes #95) --- diff --git a/EZOut.psd1 b/EZOut.psd1 index 0828835..8530b21 100644 --- a/EZOut.psd1 +++ b/EZOut.psd1 @@ -67,7 +67,7 @@ ReleaseNotes = @' ## 1.9.8: -* Format-RichText now -Hyperlinks (Fixes #93) +* Format-RichText now supports -Hyperlink (Fixes #93) * Format-RichText now outputs a single string (Fixes #95) --- From 27d5a0ccd43c51785fe10d707557ef5e108f6524 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 03:18:06 +0000 Subject: [PATCH 18/25] Merge branch 'EZ-Hyperlinks' of https://github.com/StartAutomating/EZOut into EZ-Hyperlinks --- docs/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 491b576..9060b67 100644 --- a/docs/README.md +++ b/docs/README.md @@ -195,4 +195,3 @@ Get-Module EZOut | Format-Custom - From 8bc097aabe61cc0076a5d78fbb6211fc8b9e0431 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 03:18:06 +0000 Subject: [PATCH 19/25] Merge branch 'EZ-Hyperlinks' of https://github.com/StartAutomating/EZOut into EZ-Hyperlinks --- docs/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/README.md b/docs/README.md index 9060b67..491b576 100644 --- a/docs/README.md +++ b/docs/README.md @@ -195,3 +195,4 @@ Get-Module EZOut | Format-Custom + From 3fce8e316e1be0da9e3ca140f722874fb017c1a7 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 03:18:06 +0000 Subject: [PATCH 20/25] Merge branch 'EZ-Hyperlinks' of https://github.com/StartAutomating/EZOut into EZ-Hyperlinks --- docs/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 80c9c5f..0c93ea7 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,6 @@ ## 1.9.8: -* Format-RichText now -Hyperlinks (Fixes #93) +* Format-RichText now supports -Hyperlink (Fixes #93) * Format-RichText now outputs a single string (Fixes #95) --- From 035ed93623e1b3dc8f6a2cb0172d7fc38f10feb0 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 14 Dec 2022 19:23:30 -0800 Subject: [PATCH 21/25] Format-RichText/Format-Markdown: Standardizing parameter names --- Format-Markdown.ps1 | 1 + Format-RichText.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Format-Markdown.ps1 b/Format-Markdown.ps1 index 1f06189..1d3e13a 100644 --- a/Format-Markdown.ps1 +++ b/Format-Markdown.ps1 @@ -57,6 +57,7 @@ function Format-Markdown # If set, will create a link. The -InputObject will be used as the link content [Parameter(ValueFromPipelineByPropertyName)] + [Alias('Hyperlink', 'Href')] [string] $Link, diff --git a/Format-RichText.ps1 b/Format-RichText.ps1 index 71b70be..2cc00eb 100644 --- a/Format-RichText.ps1 +++ b/Format-RichText.ps1 @@ -65,9 +65,9 @@ function Format-RichText [switch]$Invert, # If provided, will create a hyperlink to a given uri - [Alias('Link')] + [Alias('Hyperlink', 'Href')] [uri] - $Hyperlink, + $Link, # If set, will not clear formatting [switch]$NoClear From 006b23a1a7a129a7c76fee1fc32fe813f4b0cba3 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 03:24:12 +0000 Subject: [PATCH 22/25] Merge branch 'EZ-Hyperlinks' of https://github.com/StartAutomating/EZOut into EZ-Hyperlinks --- EZOut.format.ps1xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/EZOut.format.ps1xml b/EZOut.format.ps1xml index a7b7379..eb0d3ad 100644 --- a/EZOut.format.ps1xml +++ b/EZOut.format.ps1xml @@ -1027,9 +1027,9 @@ if ($Request -or $Host.UI.SupportsHTML) { [switch]$Invert, # If provided, will create a hyperlink to a given uri - [Alias('Link')] + [Alias('Hyperlink', 'Href')] [uri] - $Hyperlink, + $Link, # If set, will not clear formatting [switch]$NoClear @@ -1650,6 +1650,7 @@ $BackgroundColor # If set, will create a link. The -InputObject will be used as the link content [Parameter(ValueFromPipelineByPropertyName)] + [Alias('Hyperlink', 'Href')] [string] $Link, From 1327040a528971aeeb308ab474f037fc30c717ec Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 03:24:16 +0000 Subject: [PATCH 23/25] Merge branch 'EZ-Hyperlinks' of https://github.com/StartAutomating/EZOut into EZ-Hyperlinks --- docs/Format-RichText.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Format-RichText.md b/docs/Format-RichText.md index 6bb5ff6..936644a 100644 --- a/docs/Format-RichText.md +++ b/docs/Format-RichText.md @@ -219,7 +219,7 @@ If set, will invert text --- -#### **Hyperlink** +#### **Link** If provided, will create a hyperlink to a given uri @@ -262,7 +262,7 @@ If set, will not clear formatting --- ### Syntax ```PowerShell -Format-RichText [[-InputObject] ] [[-ForegroundColor] ] [[-BackgroundColor] ] [-Bold] [-Italic] [-Faint] [-Hide] [-Blink] [-Strikethru] [-Underline] [-DoubleUnderline] [-Invert] [[-Hyperlink] ] [-NoClear] [] +Format-RichText [[-InputObject] ] [[-ForegroundColor] ] [[-BackgroundColor] ] [-Bold] [-Italic] [-Faint] [-Hide] [-Blink] [-Strikethru] [-Underline] [-DoubleUnderline] [-Invert] [[-Link] ] [-NoClear] [] ``` --- ### Notes From fdb02525d5db4a27340d468995bf9997898b9227 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 03:24:18 +0000 Subject: [PATCH 24/25] Merge branch 'EZ-Hyperlinks' of https://github.com/StartAutomating/EZOut into EZ-Hyperlinks --- docs/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 491b576..9060b67 100644 --- a/docs/README.md +++ b/docs/README.md @@ -195,4 +195,3 @@ Get-Module EZOut | Format-Custom - From 49cf978f110ff377e20fe8ebe3d53c9470cda0d1 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 15 Dec 2022 03:24:18 +0000 Subject: [PATCH 25/25] Merge branch 'EZ-Hyperlinks' of https://github.com/StartAutomating/EZOut into EZ-Hyperlinks --- docs/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/README.md b/docs/README.md index 9060b67..491b576 100644 --- a/docs/README.md +++ b/docs/README.md @@ -195,3 +195,4 @@ Get-Module EZOut | Format-Custom +