diff --git a/packages/powershell/oh-my-posh/oh-my-posh.psm1 b/packages/powershell/oh-my-posh/oh-my-posh.psm1 index 46767d9829af..e345ec1ec456 100644 --- a/packages/powershell/oh-my-posh/oh-my-posh.psm1 +++ b/packages/powershell/oh-my-posh/oh-my-posh.psm1 @@ -152,7 +152,10 @@ function ThemeCompletion { $commandAst, $fakeBoundParameter ) - $themes = Get-ChildItem -Path "$PSScriptRoot\themes\*" -Include '*.omp.json' | Sort-Object Name | Select-Object -Property BaseName + $themes = Get-ChildItem -Path "$PSScriptRoot\themes\*" -Include '*.omp.json' | Sort-Object Name | Select-Object -Property @{ + label='BaseName' + expression={$_.BaseName.TrimEnd(".omp")} + } $themes | Where-Object { $_.BaseName.ToLower().StartsWith($wordToComplete.ToLower()); } | Select-Object -Unique -ExpandProperty BaseName |