@@ -172,9 +172,9 @@ function Set-MappedKeyHandler {
172
172
173
173
function Get-KeywordCompletionResult (
174
174
$Keyword ,
175
- $Description = $null
175
+ $Description = $Keyword
176
176
) {
177
- [System.Management.Automation.CompletionResult ]::new($Keyword , $Keyword , [System.Management.Automation.CompletionResultType ]::Keyword, $null -ne $ Description ? $Description : $Keyword )
177
+ [System.Management.Automation.CompletionResult ]::new($Keyword , $Keyword , [System.Management.Automation.CompletionResultType ]::Keyword, $Description )
178
178
}
179
179
180
180
function Set-MappedKeyHandlers {
@@ -360,7 +360,7 @@ function Send-Completions {
360
360
# completions are consistent regardless of where it was requested
361
361
elseif ($lastWord -match ' [/\\]' ) {
362
362
$lastSlashIndex = $completionPrefix.LastIndexOfAny (@ (' /' , ' \' ))
363
- if ($lastSlashIndex -ne -1 && $lastSlashIndex -lt $cursorIndex ) {
363
+ if ($lastSlashIndex -ne -1 -and $lastSlashIndex -lt $cursorIndex ) {
364
364
$newCursorIndex = $lastSlashIndex + 1
365
365
$completionPrefix = $completionPrefix.Substring (0 , $newCursorIndex )
366
366
$prefixCursorDelta = $cursorIndex - $newCursorIndex
@@ -430,7 +430,7 @@ function Send-Completions {
430
430
# completions are consistent regardless of where it was requested
431
431
if ($completionPrefix -match ' [/\\]' ) {
432
432
$lastSlashIndex = $completionPrefix.LastIndexOfAny (@ (' /' , ' \' ))
433
- if ($lastSlashIndex -ne -1 && $lastSlashIndex -lt $cursorIndex ) {
433
+ if ($lastSlashIndex -ne -1 -and $lastSlashIndex -lt $cursorIndex ) {
434
434
$newCursorIndex = $lastSlashIndex + 1
435
435
$completionPrefix = $completionPrefix.Substring (0 , $newCursorIndex )
436
436
$prefixCursorDelta = $cursorIndex - $newCursorIndex
0 commit comments