From b35380fdb15f7469f3de6aa3bd530f8fd2175a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20=28Dibildos=29=20Gonz=C3=A1lez?= Date: Mon, 16 Feb 2026 10:53:38 +0100 Subject: [PATCH 1/2] feat(Use-Order): Control inversion on Show-ProjectItem --- public/items/use_order.ps1 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/public/items/use_order.ps1 b/public/items/use_order.ps1 index de325c9..de5394a 100644 --- a/public/items/use_order.ps1 +++ b/public/items/use_order.ps1 @@ -7,7 +7,8 @@ function Use-Order { [Parameter()][Alias("e")][switch]$OpenInEditor, [Parameter()][Alias("w")][switch]$OpenInBrowser, [Parameter()][Alias("p")][switch]$PassThru, - [Parameter()][Alias("c")][switch]$ClearScreen + [Parameter()][Alias("c")][switch]$ClearScreen, + [Parameter()][scriptblock]$ShowProjectItemScriptBlock ) begin { @@ -54,8 +55,17 @@ function Use-Order { return [PsCustomObject]$i } + # Get function to show item + $ShowProjectItemScriptBlock = $ShowProjectItemScriptBlock ?? { param($parameters) Show-ProjectItem @parameters } + # Show item in console or editor - Show-ProjectItem -Item $itemId -OpenInEditor:$OpenInEditor -OpenInBrowser:$OpenInBrowser -ClearScreen:$ClearScreen + $params = @{ + Item = $itemId + OpenInEditor = $OpenInEditor + OpenInBrowser = $OpenInBrowser + ClearScreen = $ClearScreen + } + $ShowProjectItemScriptBlock.Invoke($params) return } From fd689ee083229f9a661e0901152575eb06f5d04e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20=28Dibildos=29=20Gonz=C3=A1lez?= Date: Mon, 16 Feb 2026 10:54:27 +0100 Subject: [PATCH 2/2] fix(ShowAttribLine): Control inversion on field value --- public/items/project_item_show.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/items/project_item_show.ps1 b/public/items/project_item_show.ps1 index 2cb63dd..ee97f4f 100644 --- a/public/items/project_item_show.ps1 +++ b/public/items/project_item_show.ps1 @@ -320,13 +320,14 @@ function ShowAttribLine{ $AttributesToShow | ForEach-Object { $name = $_.Name + $value = $_.Value $color = $_.Color $prefix = $_.Prefix $BetweenQuotes = $_.BetweenQuotes $DefaultValue = $_.DefaultValue ?? "[$name]" $HideIfEmpty = $_.HideIfEmpty - $value = $item.$name + $value = $value ?? $item.$name if($HideIfEmpty -and [string]::IsNullOrEmpty($value)){ return