From 1c58d0d5aefb50a14efed6a02a7659ec76ebdd4c Mon Sep 17 00:00:00 2001 From: kzrnm Date: Mon, 5 Aug 2024 23:02:47 +0900 Subject: [PATCH] Update README.md --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5bc29f4..820f0f3 100644 --- a/README.md +++ b/README.md @@ -141,15 +141,14 @@ Register-ArgumentCompleter -CommandName Start-KurukuruSleep -ParameterName Patte $commandAst, $fakeBoundParameter ) - $Names = $KurukuruPatterns.Name - if ($wordToComplete.Length -eq 0) { return $Names } - foreach ($item in $Names) { - if ($item.ToLower().StartsWith($wordToComplete.ToLower())) { + foreach ($p in ($KurukuruPatterns)) { + if ($p.Name.ToLower().StartsWith($wordToComplete.ToLower())) { [System.Management.Automation.CompletionResult]::new( - $item, - $item, + $p.Name, + $p.Name, [System.Management.Automation.CompletionResultType]::ParameterValue, - $item) + "$($p.Frames) Interval=$($p.Interval)" + ) } } }