mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-26 19:39:39 -08:00
fix: auto complete themes in Powershell
This commit is contained in:
parent
249c779146
commit
56a58c700a
|
@ -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 |
|
||||
|
|
Loading…
Reference in a new issue