More failing tests, hope this will end it :(
@@ -52,7 +52,8 @@ Register-ArgumentCompleter -Native -CommandName 'my_app' -ScriptBlock {
$element = $commandElements[$i]
if ($element -isnot [StringConstantExpressionAst] -or
$element.StringConstantType -ne [StringConstantType]::BareWord -or
- $element.Value.StartsWith('-')) {
+ $element.Value.StartsWith('-') -or
+ $element.Value -eq $wordToComplete) {
break
}
$element.Value
@@ -223,7 +224,8 @@ Register-ArgumentCompleter -Native -CommandName 'cmd' -ScriptBlock {
$element = $commandElements[$i]
if ($element -isnot [StringConstantExpressionAst] -or
$element.StringConstantType -ne [StringConstantType]::BareWord -or
- $element.Value.StartsWith('-')) {
+ $element.Value.StartsWith('-') -or
+ $element.Value -eq $wordToComplete) {
break
}
$element.Value
