Skip to content

Commit cf622e7

Browse files
authored
Compensate of missing descriptions
Some commands and flags are missing descriptions which breaks autocomplete. compensate for those
1 parent b7fe924 commit cf622e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sfdx-autocomplete.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ $scriptBlock = {
3131
if ($commandAst.CommandElements.Count -eq 1) {
3232
<# List all commands #>
3333
$script:sfdxCommands | ForEach-Object {
34-
[System.Management.Automation.CompletionResult]::new($_.id, $_.id, 'Method', $_.description)
34+
[System.Management.Automation.CompletionResult]::new($_.id, $_.id, 'Method', $_.description??'No description available')
3535
}
3636
}
3737
elseif ($commandAst.CommandElements.Count -eq 2 -and $wordToComplete -ne "") {
3838
<# Completing a command #>
3939
$commandPattern = ".*" + $commandAst.CommandElements[1].Value + ".*" <# Complete if force: is not specified too #>
4040
$script:sfdxCommands | Where-Object id -match $commandPattern | ForEach-Object {
41-
[System.Management.Automation.CompletionResult]::new($_.id, $_.id, 'Method', $_.description)
41+
[System.Management.Automation.CompletionResult]::new($_.id, $_.id, 'Method', $_.description??'No description available')
4242
}
4343
}
4444
elseif ($commandAst.CommandElements.Count -gt 2) {

0 commit comments

Comments
 (0)